diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:34:32 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:34:32 +0200 |
commit | 49120f48474fc8fdc2448c75d961bc238213cfac (patch) | |
tree | 05bcdb95d65a807cf0f1ffffd066c09074b5cf56 /plugins | |
parent | 2492891f112caac6076ce49721d9d5d78a152c3a (diff) |
New upstream version 0.28.2upstream/0.28.2
Diffstat (limited to 'plugins')
78 files changed, 16986 insertions, 43166 deletions
diff --git a/plugins/authenticator/meson.build b/plugins/authenticator/meson.build new file mode 100644 index 0000000..5b5fc73 --- /dev/null +++ b/plugins/authenticator/meson.build @@ -0,0 +1 @@ +subdir('shotwell') diff --git a/plugins/authenticator/shotwell-authenticator.vapi b/plugins/authenticator/shotwell-authenticator.vapi index ed10082..8adc56c 100644 --- a/plugins/authenticator/shotwell-authenticator.vapi +++ b/plugins/authenticator/shotwell-authenticator.vapi @@ -9,6 +9,10 @@ namespace Publishing { } namespace Google { } + namespace OAuth1 { + } + namespace Tumblr { + } } [CCode (cheader_filename = "shotwell-authenticator.h")] public class Factory : Spit.Publishing.AuthenticatorFactory, GLib.Object { diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c index ab19db3..cfeb019 100644 --- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c +++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.c @@ -11,36 +11,13 @@ #include <glib-object.h> #include <stdlib.h> #include <string.h> +#include <glib/gi18n-lib.h> #include "shotwell-plugin-common.h" -#include "shotwell-plugin-dev-1.0.h" +#include <webkit2/webkit2.h> #include <libsoup/soup.h> -#include <glib/gi18n-lib.h> -#include <gtk/gtk.h> - - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION (publishing_authenticator_shotwell_flickr_transaction_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransaction)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransactionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransactionClass)) - -typedef struct _PublishingAuthenticatorShotwellFlickrTransaction PublishingAuthenticatorShotwellFlickrTransaction; -typedef struct _PublishingAuthenticatorShotwellFlickrTransactionClass PublishingAuthenticatorShotwellFlickrTransactionClass; -typedef struct _PublishingAuthenticatorShotwellFlickrTransactionPrivate PublishingAuthenticatorShotwellFlickrTransactionPrivate; - -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION (publishing_authenticator_shotwell_flickr_session_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionClass)) +#include <gio/gio.h> +#include "shotwell-plugin-dev-1.0.h" -typedef struct _PublishingAuthenticatorShotwellFlickrSession PublishingAuthenticatorShotwellFlickrSession; -typedef struct _PublishingAuthenticatorShotwellFlickrSessionClass PublishingAuthenticatorShotwellFlickrSessionClass; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) -typedef struct _PublishingAuthenticatorShotwellFlickrSessionPrivate PublishingAuthenticatorShotwellFlickrSessionPrivate; #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION (publishing_authenticator_shotwell_flickr_authentication_request_transaction_get_type ()) #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction)) @@ -63,24 +40,38 @@ typedef struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransa typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction; typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass; typedef struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE (publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type ()) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPaneClass)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE)) -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPaneClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE (publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass)) -typedef struct _PublishingAuthenticatorShotwellFlickrPinEntryPane PublishingAuthenticatorShotwellFlickrPinEntryPane; -typedef struct _PublishingAuthenticatorShotwellFlickrPinEntryPaneClass PublishingAuthenticatorShotwellFlickrPinEntryPaneClass; -typedef struct _PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate; +typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane PublishingAuthenticatorShotwellFlickrWebAuthenticationPane; +typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass; +typedef struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) +#define __vala_SoupURI_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupURI_free (var), NULL))) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_PROCEED_SIGNAL, - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_LAST_SIGNAL + PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL, + PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL, + PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LAST_SIGNAL }; -static guint publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_LAST_SIGNAL] = {0}; +static guint publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LAST_SIGNAL] = {0}; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) + +typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR (publishing_authenticator_shotwell_flickr_flickr_get_type ()) #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr)) @@ -92,138 +83,73 @@ static guint publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUB typedef struct _PublishingAuthenticatorShotwellFlickrFlickr PublishingAuthenticatorShotwellFlickrFlickr; typedef struct _PublishingAuthenticatorShotwellFlickrFlickrClass PublishingAuthenticatorShotwellFlickrFlickrClass; typedef struct _PublishingAuthenticatorShotwellFlickrFlickrPrivate PublishingAuthenticatorShotwellFlickrFlickrPrivate; -#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) #define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _PublishingAuthenticatorShotwellFlickrTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingAuthenticatorShotwellFlickrTransactionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFlickrSession { - PublishingRESTSupportSession parent_instance; - PublishingAuthenticatorShotwellFlickrSessionPrivate * priv; -}; - -struct _PublishingAuthenticatorShotwellFlickrSessionClass { - PublishingRESTSupportSessionClass parent_class; -}; - -struct _PublishingAuthenticatorShotwellFlickrSessionPrivate { - gchar* request_phase_token; - gchar* request_phase_token_secret; - gchar* access_phase_token; - gchar* access_phase_token_secret; - gchar* username; - gchar* consumer_key; - gchar* consumer_secret; -}; struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction { - PublishingAuthenticatorShotwellFlickrTransaction parent_instance; + PublishingRESTSupportOAuth1Transaction parent_instance; PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionPrivate * priv; }; struct _PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass { - PublishingAuthenticatorShotwellFlickrTransactionClass parent_class; + PublishingRESTSupportOAuth1TransactionClass parent_class; }; struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction { - PublishingAuthenticatorShotwellFlickrTransaction parent_instance; + PublishingRESTSupportOAuth1Transaction parent_instance; PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionPrivate * priv; }; struct _PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass { - PublishingAuthenticatorShotwellFlickrTransactionClass parent_class; + PublishingRESTSupportOAuth1TransactionClass parent_class; }; -struct _PublishingAuthenticatorShotwellFlickrPinEntryPane { - GObject parent_instance; - PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate * priv; +struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPane { + ShotwellPluginsCommonWebAuthenticationPane parent_instance; + PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate * priv; }; -struct _PublishingAuthenticatorShotwellFlickrPinEntryPaneClass { - GObjectClass parent_class; +struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass { + ShotwellPluginsCommonWebAuthenticationPaneClass parent_class; }; -struct _PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate { - GtkBox* pane_widget; - GtkButton* continue_button; - GtkEntry* pin_entry; - GtkLabel* pin_entry_caption; - GtkLabel* explanatory_text; - GtkBuilder* builder; +struct _PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate { + gchar* auth_code; }; -struct _PublishingAuthenticatorShotwellFlickrFlickr { +struct _PublishingAuthenticatorShotwellOAuth1Authenticator { GObject parent_instance; - PublishingAuthenticatorShotwellFlickrFlickrPrivate * priv; + PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; + GHashTable* params; + PublishingRESTSupportOAuth1Session* session; + SpitPublishingPluginHost* host; }; -struct _PublishingAuthenticatorShotwellFlickrFlickrClass { +struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { GObjectClass parent_class; + void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); }; -struct _PublishingAuthenticatorShotwellFlickrFlickrPrivate { - GHashTable* params; - PublishingAuthenticatorShotwellFlickrSession* session; - SpitPublishingPluginHost* host; +struct _PublishingAuthenticatorShotwellFlickrFlickr { + PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance; + PublishingAuthenticatorShotwellFlickrFlickrPrivate * priv; +}; + +struct _PublishingAuthenticatorShotwellFlickrFlickrClass { + PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class; }; -static gpointer publishing_authenticator_shotwell_flickr_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_flickr_session_parent_class = NULL; static gpointer publishing_authenticator_shotwell_flickr_authentication_request_transaction_parent_class = NULL; static gpointer publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_parent_class = NULL; -static gpointer publishing_authenticator_shotwell_flickr_pin_entry_pane_parent_class = NULL; -static SpitPublishingDialogPaneIface * publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class = NULL; static gpointer publishing_authenticator_shotwell_flickr_flickr_parent_class = NULL; -static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_parent_iface = NULL; #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENDPOINT_URL "https://api.flickr.com/services/rest" #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_EXPIRED_SESSION_ERROR_CODE "98" -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" -GType publishing_authenticator_shotwell_flickr_transaction_get_type (void) G_GNUC_CONST; -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TRANSACTION_DUMMY_PROPERTY -}; -GType publishing_authenticator_shotwell_flickr_session_get_type (void) G_GNUC_CONST; -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method); -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method); -static void publishing_authenticator_shotwell_flickr_transaction_setup_arguments (PublishingAuthenticatorShotwellFlickrTransaction* self); -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new_with_uri (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (PublishingAuthenticatorShotwellFlickrSession* self); -gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (PublishingAuthenticatorShotwellFlickrSession* self); -gchar* publishing_authenticator_shotwell_flickr_session_get_consumer_key (PublishingAuthenticatorShotwellFlickrSession* self); -static void publishing_authenticator_shotwell_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); -void publishing_authenticator_shotwell_flickr_session_sign_transaction (PublishingAuthenticatorShotwellFlickrSession* self, PublishingRESTSupportTransaction* txn); -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSessionPrivate)) -enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_DUMMY_PROPERTY -}; -PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_new (void); -PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_construct (GType object_type); -static gboolean publishing_authenticator_shotwell_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base); -void publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username); -void publishing_authenticator_shotwell_flickr_session_deauthenticate (PublishingAuthenticatorShotwellFlickrSession* self); -void publishing_authenticator_shotwell_flickr_session_set_api_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret); -void publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret); -void publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username); -gchar* publishing_authenticator_shotwell_flickr_session_get_request_phase_token (PublishingAuthenticatorShotwellFlickrSession* self); -gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token (PublishingAuthenticatorShotwellFlickrSession* self); -gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrSession* self); -gchar* publishing_authenticator_shotwell_flickr_session_get_username (PublishingAuthenticatorShotwellFlickrSession* self); -static void publishing_authenticator_shotwell_flickr_session_finalize (PublishingRESTSupportSession * obj); #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY "60dd96d4a2ad04888b09c9e18d82c26f" #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET "d0960565e03547c1" #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Flickr.\n" \ @@ -234,58 +160,48 @@ GType publishing_authenticator_shotwell_flickr_authentication_request_transactio enum { PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_DUMMY_PROPERTY }; -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session); -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session); +PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingRESTSupportOAuth1Session* session); +PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session); GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; enum { PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY }; -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier); -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier); -GType publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate)) +PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* user_verifier); +PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* user_verifier); +GType publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type (void) G_GNUC_CONST; +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate)) enum { - PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_DUMMY_PROPERTY + PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY }; -PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_new (GtkBuilder* builder); -PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder); -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingAuthenticatorShotwellFlickrPinEntryPane* self); -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked (PublishingAuthenticatorShotwellFlickrPinEntryPane* self); -static GtkWidget* publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base); -static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base); -static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); -static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_finalize (GObject * obj); +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LOGIN_URI "https://www.flickr.com/services/oauth/authorize?oauth_token=%s&perms=w" \ +"rite" +PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_new (const gchar* token); +PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (GType object_type, const gchar* token); +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed (GObject* base); +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* self, WebKitURISchemeRequest* request); +static void _publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, gpointer self); +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base); +static void _vala_SoupURI_free (SoupURI* self); +static guint8* _vala_array_dup1 (guint8* self, int length); +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize (GObject * obj); +GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; GType publishing_authenticator_shotwell_flickr_flickr_get_type (void) G_GNUC_CONST; -#define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrPrivate)) enum { PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_DUMMY_PROPERTY }; -static void publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self); PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host); PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, SpitPublishingPluginHost* host); -static void _g_free0_ (gpointer var); -static void _g_variant_unref0_ (gpointer var); -static GVariant* _variant_new1 (const gchar* value); -static GVariant* _variant_new2 (const gchar* value); -void publishing_authenticator_shotwell_flickr_flickr_invalidate_persistent_session (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token); -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* secret); -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* username); -static gboolean publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (PublishingAuthenticatorShotwellFlickrFlickr* self); -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self); -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self); -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (SpitPublishingAuthenticator* base); +PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host); +static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self); static void publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (PublishingAuthenticatorShotwellFlickrFlickr* self); -static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (SpitPublishingAuthenticator* base); -static GHashTable* publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_flickr_flickr_real_logout (SpitPublishingAuthenticator* base); -static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (SpitPublishingAuthenticator* base); +static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +static void publishing_authenticator_shotwell_flickr_flickr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base); static void publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked (PublishingAuthenticatorShotwellFlickrFlickr* self); static void _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self); static void publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (PublishingAuthenticatorShotwellFlickrFlickr* self); @@ -295,1303 +211,46 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_ static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); static void publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* response); static void publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token, const gchar* token_secret); -static void publishing_authenticator_shotwell_flickr_flickr_do_launch_system_browser (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token); -static void publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (PublishingAuthenticatorShotwellFlickrFlickr* self); -static void publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* pin); -static void _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed (PublishingAuthenticatorShotwellFlickrPinEntryPane* _sender, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self); +static void publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token); static void publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* pin); +static void _publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self); +static void publishing_authenticator_shotwell_flickr_flickr_on_web_login_error (PublishingAuthenticatorShotwellFlickrFlickr* self); +static void _publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, gpointer self); static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingRESTSupportTransaction* txn); static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingRESTSupportTransaction* txn, GError* err); static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); static void publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* response); -static GVariant* _variant_new3 (gchar* value); -static GVariant* _variant_new4 (gchar* value); -static GVariant* _variant_new5 (gchar* value); -static void publishing_authenticator_shotwell_flickr_flickr_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - - -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method) { - PublishingAuthenticatorShotwellFlickrTransaction* self = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL); -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = session; -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = method; -#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_); -#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_transaction_setup_arguments (self); -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 331 "FlickrPublishingAuthenticator.c" -} -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, PublishingRESTSupportHttpMethod method) { -#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, session, method); -#line 338 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { - PublishingAuthenticatorShotwellFlickrTransaction* self = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; - const gchar* _tmp1_; - PublishingRESTSupportHttpMethod _tmp2_; -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (uri != NULL, NULL); +PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session) { + PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* self = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); #line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = session; #line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = uri; -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = method; -#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); -#line 22 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_transaction_setup_arguments (self); -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 363 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrTransaction* publishing_authenticator_shotwell_flickr_transaction_new_with_uri (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { -#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, session, uri, method); -#line 370 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_transaction_setup_arguments (PublishingAuthenticatorShotwellFlickrTransaction* self) { - PublishingAuthenticatorShotwellFlickrSession* session = NULL; - PublishingRESTSupportSession* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_TRANSACTION (self)); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - session = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (session); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp2_); -#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp2_); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); -#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "oob"); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (session); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp4_); -#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp4_); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_flickr_session_get_consumer_key (session); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = _tmp5_; -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", _tmp6_); -#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp6_); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_session_unref0 (session); -#line 421 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { - PublishingAuthenticatorShotwellFlickrTransaction * self; - PublishingRESTSupportSession* _tmp0_; - PublishingAuthenticatorShotwellFlickrSession* _tmp1_; - GError * _inner_error_ = NULL; -#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, PublishingAuthenticatorShotwellFlickrTransaction); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_session_unref0 (_tmp1_); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_authenticator_shotwell_flickr_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_propagate_error (error, _inner_error_); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 450 "FlickrPublishingAuthenticator.c" - } else { -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 458 "FlickrPublishingAuthenticator.c" - } - } -} - - -static void publishing_authenticator_shotwell_flickr_transaction_class_init (PublishingAuthenticatorShotwellFlickrTransactionClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_transaction_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_authenticator_shotwell_flickr_transaction_real_execute; -#line 469 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_transaction_instance_init (PublishingAuthenticatorShotwellFlickrTransaction * self) { -} - - -GType publishing_authenticator_shotwell_flickr_transaction_get_type (void) { - static volatile gsize publishing_authenticator_shotwell_flickr_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_transaction_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_transaction_type_id; - publishing_authenticator_shotwell_flickr_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_transaction_type_id); - } - return publishing_authenticator_shotwell_flickr_transaction_type_id__volatile; -} - - -PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_construct (GType object_type) { - PublishingAuthenticatorShotwellFlickrSession* self = NULL; -#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrSession*) publishing_rest_support_session_construct (object_type, NULL); -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self; -#line 495 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrSession* publishing_authenticator_shotwell_flickr_session_new (void) { -#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_session_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION); -#line 502 "FlickrPublishingAuthenticator.c" -} - - -static gboolean publishing_authenticator_shotwell_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base) { - PublishingAuthenticatorShotwellFlickrSession * self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - const gchar* _tmp2_; -#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession); -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->access_phase_token; -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp2_ != NULL) { -#line 518 "FlickrPublishingAuthenticator.c" - const gchar* _tmp3_; -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = self->priv->access_phase_token_secret; -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp3_ != NULL; -#line 524 "FlickrPublishingAuthenticator.c" - } else { -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = FALSE; -#line 528 "FlickrPublishingAuthenticator.c" - } -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp1_) { -#line 532 "FlickrPublishingAuthenticator.c" - const gchar* _tmp4_; -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = self->priv->username; -#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = _tmp4_ != NULL; -#line 538 "FlickrPublishingAuthenticator.c" - } else { -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = FALSE; -#line 542 "FlickrPublishingAuthenticator.c" - } -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp0_; -#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 548 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (secret != NULL); -#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (username != NULL); -#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = token; -#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token); -#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token = _tmp1_; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = secret; -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token_secret = _tmp3_; -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = username; -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->username); -#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->username = _tmp5_; -#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 593 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_deauthenticate (PublishingAuthenticatorShotwellFlickrSession* self) { -#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token); -#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token = NULL; -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token_secret = NULL; -#line 74 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->username); -#line 74 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->username = NULL; -#line 612 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_set_api_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (consumer_key != NULL); -#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (consumer_secret != NULL); -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = consumer_key; -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->consumer_key); -#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->consumer_key = _tmp1_; -#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = consumer_secret; -#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->consumer_secret); -#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->consumer_secret = _tmp3_; -#line 643 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_sign_transaction (PublishingAuthenticatorShotwellFlickrSession* self, PublishingRESTSupportTransaction* txn) { - gchar* http_method = NULL; - PublishingRESTSupportTransaction* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; - gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - PublishingRESTSupportArgument** base_string_arguments = NULL; - PublishingRESTSupportTransaction* _tmp6_; - gint _tmp7_; - PublishingRESTSupportArgument** _tmp8_; - gint base_string_arguments_length1; - gint _base_string_arguments_size_; - PublishingRESTSupportArgument** sorted_args = NULL; - PublishingRESTSupportArgument** _tmp9_; - gint _tmp9__length1; - gint _tmp10_; - PublishingRESTSupportArgument** _tmp11_; - gint sorted_args_length1; - gint _sorted_args_size_; - gchar* arguments_string = NULL; - gchar* _tmp12_; - gchar* signing_key = NULL; - const gchar* _tmp35_; - gchar* signature_base_string = NULL; - const gchar* _tmp49_; - gchar* _tmp50_; - gchar* _tmp51_; - PublishingRESTSupportTransaction* _tmp52_; - gchar* _tmp53_; - gchar* _tmp54_; - gchar* _tmp55_; - gchar* _tmp56_; - gchar* _tmp57_; - gchar* _tmp58_; - gchar* _tmp59_; - gchar* _tmp60_; - const gchar* _tmp61_; - gchar* _tmp62_; - gchar* _tmp63_; - gchar* _tmp64_; - gchar* _tmp65_; - const gchar* _tmp66_; - gchar* signature = NULL; - const gchar* _tmp67_; - gchar* _tmp68_; - const gchar* _tmp69_; - gchar* _tmp70_; - const gchar* _tmp71_; - PublishingRESTSupportTransaction* _tmp72_; - const gchar* _tmp73_; -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = txn; -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); -#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - http_method = _tmp2_; -#line 85 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:85: signing transaction with parame" \ -"ters:"); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = http_method; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:86: %s", _tmp5_); -#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp5_); -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = txn; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_); -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - base_string_arguments = _tmp8_; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - base_string_arguments_length1 = _tmp7_; -#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _base_string_arguments_size_ = base_string_arguments_length1; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = base_string_arguments; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9__length1 = base_string_arguments_length1; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = publishing_rest_support_argument_sort (_tmp9_, _tmp9__length1, &_tmp10_); -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - sorted_args = _tmp11_; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - sorted_args_length1 = _tmp10_; -#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _sorted_args_size_ = sorted_args_length1; -#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = g_strdup (""); -#line 93 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - arguments_string = _tmp12_; -#line 749 "FlickrPublishingAuthenticator.c" - { - gint i = 0; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - i = 0; -#line 754 "FlickrPublishingAuthenticator.c" - { - gboolean _tmp13_ = FALSE; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = TRUE; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - while (TRUE) { -#line 761 "FlickrPublishingAuthenticator.c" - gint _tmp15_; - PublishingRESTSupportArgument** _tmp16_; - gint _tmp16__length1; - const gchar* _tmp17_; - PublishingRESTSupportArgument** _tmp18_; - gint _tmp18__length1; - gint _tmp19_; - PublishingRESTSupportArgument* _tmp20_; - const gchar* _tmp21_; - gchar* _tmp22_; - gchar* _tmp23_; - PublishingRESTSupportArgument** _tmp24_; - gint _tmp24__length1; - gint _tmp25_; - PublishingRESTSupportArgument* _tmp26_; - const gchar* _tmp27_; - gchar* _tmp28_; - gchar* _tmp29_; - gchar* _tmp30_; - gint _tmp31_; - PublishingRESTSupportArgument** _tmp32_; - gint _tmp32__length1; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (!_tmp13_) { -#line 786 "FlickrPublishingAuthenticator.c" - gint _tmp14_; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = i; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - i = _tmp14_ + 1; -#line 792 "FlickrPublishingAuthenticator.c" - } -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = FALSE; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp15_ = i; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp16_ = sorted_args; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp16__length1 = sorted_args_length1; -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (!(_tmp15_ < _tmp16__length1)) { -#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - break; -#line 806 "FlickrPublishingAuthenticator.c" - } -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp17_ = arguments_string; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp18_ = sorted_args; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp18__length1 = sorted_args_length1; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp19_ = i; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp20_ = _tmp18_[_tmp19_]; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp21_ = _tmp20_->key; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp22_ = g_strconcat (_tmp21_, "=", NULL); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp23_ = _tmp22_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp24_ = sorted_args; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp24__length1 = sorted_args_length1; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp25_ = i; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp26_ = _tmp24_[_tmp25_]; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp27_ = _tmp26_->value; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp28_ = g_strconcat (_tmp23_, _tmp27_, NULL); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp29_ = _tmp28_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp30_ = g_strconcat (_tmp17_, _tmp29_, NULL); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (arguments_string); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - arguments_string = _tmp30_; -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp29_); -#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp23_); -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp31_ = i; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp32_ = sorted_args; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp32__length1 = sorted_args_length1; -#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp31_ < (_tmp32__length1 - 1)) { -#line 856 "FlickrPublishingAuthenticator.c" - const gchar* _tmp33_; - gchar* _tmp34_; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp33_ = arguments_string; -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp34_ = g_strconcat (_tmp33_, "&", NULL); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (arguments_string); -#line 97 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - arguments_string = _tmp34_; -#line 867 "FlickrPublishingAuthenticator.c" - } - } - } - } -#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signing_key = NULL; -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp35_ = self->priv->access_phase_token_secret; -#line 101 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp35_ != NULL) { -#line 878 "FlickrPublishingAuthenticator.c" - const gchar* _tmp36_; - gchar* _tmp37_; - gchar* _tmp38_; - const gchar* _tmp39_; - gchar* _tmp40_; -#line 102 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:102: access phase token secret avai" \ -"lable; using it as signing key"); -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp36_ = self->priv->consumer_secret; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp37_ = g_strconcat (_tmp36_, "&", NULL); -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp38_ = _tmp37_; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp39_ = self->priv->access_phase_token_secret; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp40_ = g_strconcat (_tmp38_, _tmp39_, NULL); -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signing_key); -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signing_key = _tmp40_; -#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp38_); -#line 902 "FlickrPublishingAuthenticator.c" - } else { - const gchar* _tmp41_; -#line 105 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp41_ = self->priv->request_phase_token_secret; -#line 105 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp41_ != NULL) { -#line 909 "FlickrPublishingAuthenticator.c" - const gchar* _tmp42_; - gchar* _tmp43_; - gchar* _tmp44_; - const gchar* _tmp45_; - gchar* _tmp46_; -#line 106 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:106: request phase token secret ava" \ -"ilable; using it as signing key"); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp42_ = self->priv->consumer_secret; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp43_ = g_strconcat (_tmp42_, "&", NULL); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp44_ = _tmp43_; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp45_ = self->priv->request_phase_token_secret; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp46_ = g_strconcat (_tmp44_, _tmp45_, NULL); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signing_key); -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signing_key = _tmp46_; -#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp44_); -#line 933 "FlickrPublishingAuthenticator.c" - } else { - const gchar* _tmp47_; - gchar* _tmp48_; -#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:110: %s", "neither access phase nor request phase token secrets available; using " \ -"API " "key as signing key"); -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp47_ = self->priv->consumer_secret; -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp48_ = g_strconcat (_tmp47_, "&", NULL); -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signing_key); -#line 113 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signing_key = _tmp48_; -#line 947 "FlickrPublishingAuthenticator.c" - } - } -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp49_ = http_method; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp50_ = g_strconcat (_tmp49_, "&", NULL); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp51_ = _tmp50_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp52_ = txn; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp53_ = publishing_rest_support_transaction_get_endpoint_url (_tmp52_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp54_ = _tmp53_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp55_ = soup_uri_encode (_tmp54_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp56_ = _tmp55_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp57_ = g_strconcat (_tmp51_, _tmp56_, NULL); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp58_ = _tmp57_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp59_ = g_strconcat (_tmp58_, "&", NULL); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp60_ = _tmp59_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp61_ = arguments_string; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp62_ = soup_uri_encode (_tmp61_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp63_ = _tmp62_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp64_ = g_strconcat (_tmp60_, _tmp63_, NULL); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp65_ = _tmp64_; -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp63_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp60_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp58_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp56_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp54_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp51_); -#line 116 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signature_base_string = _tmp65_; -#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:120: signature base string = '%s'", signature_base_string); -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp66_ = signing_key; -#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:122: signing key = '%s'", _tmp66_); -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp67_ = signing_key; -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp68_ = publishing_rest_support_hmac_sha1 (_tmp67_, signature_base_string); -#line 125 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signature = _tmp68_; -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp69_ = signature; -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp70_ = soup_uri_encode (_tmp69_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signature); -#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - signature = _tmp70_; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp71_ = signature; -#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:128: signature = '%s'", _tmp71_); -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp72_ = txn; -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp73_ = signature; -#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_rest_support_transaction_add_argument (_tmp72_, "oauth_signature", _tmp73_); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signature); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signature_base_string); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (signing_key); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (arguments_string); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (http_method); -#line 1042 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (secret != NULL); -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = token; -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->request_phase_token); -#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->request_phase_token = _tmp1_; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = secret; -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->request_phase_token_secret); -#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->request_phase_token_secret = _tmp3_; -#line 1073 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (PublishingAuthenticatorShotwellFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self)); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (secret != NULL); -#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (username != NULL); -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = token; -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token); -#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token = _tmp1_; -#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = secret; -#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token_secret = _tmp3_; -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = username; -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->username); -#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->username = _tmp5_; -#line 143 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 1118 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_nonce (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - GTimeVal currtime = {0}; - GTimeVal _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - GTimeVal _tmp4_; - glong _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 146 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_get_current_time (&currtime); -#line 148 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_get_current_time (&currtime); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = currtime; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp0_.tv_sec; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup_printf ("%li", _tmp1_); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = currtime; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _tmp4_.tv_usec; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_strdup_printf ("%li", _tmp5_); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = _tmp6_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = _tmp8_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = _tmp10_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp9_); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp7_); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp3_); -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp11_; -#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1177 "FlickrPublishingAuthenticator.c" -} - - -static glong string_strnlen (gchar* str, glong maxlen) { - glong result = 0L; - gchar* end = NULL; - gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 1200 "FlickrPublishingAuthenticator.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1208 "FlickrPublishingAuthenticator.c" - } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1220 "FlickrPublishingAuthenticator.c" - } -} - - -static gchar* string_substring (const gchar* self, glong offset, glong len) { - gchar* result = NULL; - glong string_length = 0L; - gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 1244 "FlickrPublishingAuthenticator.c" - glong _tmp2_; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = len; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = _tmp2_ >= ((glong) 0); -#line 1250 "FlickrPublishingAuthenticator.c" - } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 1254 "FlickrPublishingAuthenticator.c" - } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 1258 "FlickrPublishingAuthenticator.c" - glong _tmp3_; - glong _tmp4_; - glong _tmp5_; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = offset; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = len; -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); -#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = _tmp5_; -#line 1270 "FlickrPublishingAuthenticator.c" - } else { - gint _tmp6_; - gint _tmp7_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = strlen (self); -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = _tmp6_; -#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = (glong) _tmp7_; -#line 1280 "FlickrPublishingAuthenticator.c" - } -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = offset; -#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp8_ < ((glong) 0)) { -#line 1286 "FlickrPublishingAuthenticator.c" - glong _tmp9_; - glong _tmp10_; - glong _tmp11_; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = string_length; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = offset; -#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - offset = _tmp9_ + _tmp10_; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = offset; -#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); -#line 1300 "FlickrPublishingAuthenticator.c" - } else { - glong _tmp12_; - glong _tmp13_; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = offset; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = string_length; -#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); -#line 1310 "FlickrPublishingAuthenticator.c" - } -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = len; -#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp14_ < ((glong) 0)) { -#line 1316 "FlickrPublishingAuthenticator.c" - glong _tmp15_; - glong _tmp16_; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = offset; -#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp15_ - _tmp16_; -#line 1325 "FlickrPublishingAuthenticator.c" - } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1345 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_oauth_timestamp (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - gint64 _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 154 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = g_get_real_time (); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp2_); -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp4_; -#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1374 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_consumer_key (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->consumer_key; -#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp0_ != NULL, "consumer_key != null"); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->consumer_key; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp2_; -#line 160 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1397 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_request_phase_token (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 163 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->request_phase_token; -#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp0_ != NULL, "request_phase_token != null"); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->request_phase_token; -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp2_; -#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1420 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->access_phase_token; -#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp0_ != NULL, "access_phase_token != null"); -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->access_phase_token; -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp2_; -#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1443 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->access_phase_token_secret; -#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp0_ != NULL, "access_phase_token_secret != null"); -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->access_phase_token_secret; -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp2_; -#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1466 "FlickrPublishingAuthenticator.c" -} - - -gchar* publishing_authenticator_shotwell_flickr_session_get_username (PublishingAuthenticatorShotwellFlickrSession* self) { - gchar* result = NULL; - gboolean _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (self), NULL); -#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 179 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp0_, "is_authenticated()"); -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->username; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp2_; -#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1489 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_session_class_init (PublishingAuthenticatorShotwellFlickrSessionClass * klass) { -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_parent_class = g_type_class_peek_parent (klass); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_authenticator_shotwell_flickr_session_finalize; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrSessionPrivate)); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_authenticator_shotwell_flickr_session_real_is_authenticated; -#line 1502 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_session_instance_init (PublishingAuthenticatorShotwellFlickrSession * self) { -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SESSION_GET_PRIVATE (self); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->request_phase_token = NULL; -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->request_phase_token_secret = NULL; -#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token = NULL; -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->access_phase_token_secret = NULL; -#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->username = NULL; -#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->consumer_key = NULL; -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->consumer_secret = NULL; -#line 1523 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_session_finalize (PublishingRESTSupportSession * obj) { - PublishingAuthenticatorShotwellFlickrSession * self; -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_SESSION, PublishingAuthenticatorShotwellFlickrSession); -#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->request_phase_token); -#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->request_phase_token_secret); -#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token); -#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->username); -#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->consumer_key); -#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (self->priv->consumer_secret); -#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_authenticator_shotwell_flickr_session_parent_class)->finalize (obj); -#line 1547 "FlickrPublishingAuthenticator.c" -} - - -GType publishing_authenticator_shotwell_flickr_session_get_type (void) { - static volatile gsize publishing_authenticator_shotwell_flickr_session_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_session_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrSession), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_session_instance_init, NULL }; - GType publishing_authenticator_shotwell_flickr_session_type_id; - publishing_authenticator_shotwell_flickr_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingAuthenticatorShotwellFlickrSession", &g_define_type_info, 0); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_session_type_id__volatile, publishing_authenticator_shotwell_flickr_session_type_id); - } - return publishing_authenticator_shotwell_flickr_session_type_id__volatile; -} - - -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session) { - PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* self = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL); -#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = session; -#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction*) publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/request_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/request_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return self; -#line 1574 "FlickrPublishingAuthenticator.c" +#line 236 "FlickrPublishingAuthenticator.c" } -PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session) { -#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (PublishingRESTSupportOAuth1Session* session) { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return publishing_authenticator_shotwell_flickr_authentication_request_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, session); -#line 1581 "FlickrPublishingAuthenticator.c" +#line 243 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_authentication_request_transaction_class_init (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass * klass) { -#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_authentication_request_transaction_parent_class = g_type_class_peek_parent (klass); -#line 1588 "FlickrPublishingAuthenticator.c" +#line 250 "FlickrPublishingAuthenticator.c" } @@ -1604,59 +263,61 @@ GType publishing_authenticator_shotwell_flickr_authentication_request_transactio if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_authentication_request_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_authentication_request_transaction_instance_init, NULL }; GType publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id; - publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction", &g_define_type_info, 0); + publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction", &g_define_type_info, 0); g_once_init_leave (&publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id); } return publishing_authenticator_shotwell_flickr_authentication_request_transaction_type_id__volatile; } -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier) { +PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* user_verifier) { PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* self = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp0_; const gchar* _tmp1_; - PublishingAuthenticatorShotwellFlickrSession* _tmp2_; + PublishingRESTSupportOAuth1Session* _tmp2_; gchar* _tmp3_; gchar* _tmp4_; -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_SESSION (session), NULL); -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_val_if_fail (user_verifier != NULL, NULL); -#line 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = session; -#line 198 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction*) publishing_authenticator_shotwell_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); -#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp1_ = user_verifier; -#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_verifier", _tmp1_); -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = session; -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_request_phase_token (_tmp2_); -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp3_ = publishing_rest_support_oauth1_session_get_request_phase_token (_tmp2_); +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp4_ = _tmp3_; -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp4_); -#line 201 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp4_); -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return self; -#line 1639 "FlickrPublishingAuthenticator.c" +#line 303 "FlickrPublishingAuthenticator.c" } -PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingAuthenticatorShotwellFlickrSession* session, const gchar* user_verifier) { -#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* user_verifier) { +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, user_verifier); -#line 1646 "FlickrPublishingAuthenticator.c" +#line 310 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass * klass) { -#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 1653 "FlickrPublishingAuthenticator.c" +#line 317 "FlickrPublishingAuthenticator.c" } @@ -1669,843 +330,509 @@ GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_ge if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_instance_init, NULL }; GType publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id; - publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction", &g_define_type_info, 0); + publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction", &g_define_type_info, 0); g_once_init_leave (&publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id); } return publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_type_id__volatile; } -static gpointer _g_object_ref0 (gpointer self) { -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self ? g_object_ref (self) : NULL; -#line 1676 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self = NULL; - GtkBuilder* _tmp0_; - GtkBuilder* _tmp1_; - GtkBuilder* _tmp2_; - GtkBuilder* _tmp3_; - GSList* _tmp4_; - GSList* _tmp5_; - guint _tmp6_; - GtkBuilder* _tmp7_; - GObject* _tmp8_; - GtkLabel* _tmp9_; - GtkBuilder* _tmp10_; - GObject* _tmp11_; - GtkLabel* _tmp12_; - GtkBuilder* _tmp13_; - GObject* _tmp14_; - GtkEntry* _tmp15_; - GtkBuilder* _tmp16_; - GObject* _tmp17_; - GtkButton* _tmp18_; - GtkBuilder* _tmp19_; - GObject* _tmp20_; - GtkBox* _tmp21_; - GtkBox* _tmp22_; -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrPinEntryPane*) g_object_new (object_type, NULL); -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = builder; -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->builder); -#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->builder = _tmp1_; -#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = builder; -#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp2_ != NULL, "builder != null"); -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = builder; -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = gtk_builder_get_objects (_tmp3_); -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _tmp4_; -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_slist_length (_tmp5_); -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0"); -#line 218 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_slist_free0 (_tmp5_); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = builder; -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = gtk_builder_get_object (_tmp7_, "explanatory_text"); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->explanatory_text); -#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->explanatory_text = _tmp9_; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = builder; -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = gtk_builder_get_object (_tmp10_, "pin_entry_caption"); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp11_) : NULL); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pin_entry_caption); -#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pin_entry_caption = _tmp12_; -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = builder; -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = gtk_builder_get_object (_tmp13_, "pin_entry"); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp14_) : NULL); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pin_entry); -#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pin_entry = _tmp15_; -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp16_ = builder; -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp17_ = gtk_builder_get_object (_tmp16_, "continue_button"); -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, gtk_button_get_type ()) ? ((GtkButton*) _tmp17_) : NULL); -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->continue_button); -#line 223 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->continue_button = _tmp18_; -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp19_ = builder; -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp20_ = gtk_builder_get_object (_tmp19_, "pane_widget"); -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, gtk_box_get_type ()) ? ((GtkBox*) _tmp20_) : NULL); -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pane_widget = _tmp21_; -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp22_ = self->priv->pane_widget; -#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget)); -#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (self); -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (GType object_type, const gchar* token) { + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; +#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_return_val_if_fail (token != NULL, NULL); +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = token; +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = g_strdup_printf (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_LOGIN_URI, _tmp0_); +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = _tmp1_; +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane*) g_object_new (object_type, "login-uri", _tmp2_, NULL); +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_free0 (_tmp2_); +#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return self; -#line 1791 "FlickrPublishingAuthenticator.c" -} - - -PublishingAuthenticatorShotwellFlickrPinEntryPane* publishing_authenticator_shotwell_flickr_pin_entry_pane_new (GtkBuilder* builder) { -#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return publishing_authenticator_shotwell_flickr_pin_entry_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, builder); -#line 1798 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked (PublishingAuthenticatorShotwellFlickrPinEntryPane* self) { - GtkEntry* _tmp0_; - const gchar* _tmp1_; -#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (self)); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->pin_entry; -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = gtk_entry_get_text (_tmp0_); -#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit (self, publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_PROCEED_SIGNAL], 0, self, _tmp1_); -#line 1813 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingAuthenticatorShotwellFlickrPinEntryPane* self) { - GtkButton* _tmp0_; - GtkEntry* _tmp1_; - guint _tmp2_; - guint _tmp3_; -#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (self)); -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->continue_button; -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->pin_entry; -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = gtk_entry_get_text_length (_tmp1_); -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), _tmp3_ > ((guint) 0)); -#line 1834 "FlickrPublishingAuthenticator.c" -} - - -static GtkWidget* publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self; - GtkWidget* result = NULL; - GtkBox* _tmp0_; - GtkWidget* _tmp1_; -#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane); -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->pane_widget; -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp1_; -#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1853 "FlickrPublishingAuthenticator.c" +#line 356 "FlickrPublishingAuthenticator.c" } -static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self; - SpitPublishingDialogPaneGeometryOptions result = 0; -#line 244 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane); -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; -#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 1866 "FlickrPublishingAuthenticator.c" +PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* publishing_authenticator_shotwell_flickr_web_authentication_pane_new (const gchar* token) { +#line 44 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + return publishing_authenticator_shotwell_flickr_web_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, token); +#line 363 "FlickrPublishingAuthenticator.c" } -static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked ((PublishingAuthenticatorShotwellFlickrPinEntryPane*) self); -#line 1873 "FlickrPublishingAuthenticator.c" +static gpointer _g_object_ref0 (gpointer self) { +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + return self ? g_object_ref (self) : NULL; +#line 370 "FlickrPublishingAuthenticator.c" } -static void _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { -#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed ((PublishingAuthenticatorShotwellFlickrPinEntryPane*) self); -#line 1880 "FlickrPublishingAuthenticator.c" +static void _publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback (WebKitURISchemeRequest* request, gpointer self) { +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb ((PublishingAuthenticatorShotwellFlickrWebAuthenticationPane*) self, request); +#line 377 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self; - GtkButton* _tmp0_; - GtkEntry* _tmp1_; -#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane); -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->continue_button; -#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (_tmp0_, "clicked", (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self, 0); -#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->pin_entry; -#line 250 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self, 0); -#line 1898 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed (GObject* base) { + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; + WebKitWebContext* ctx = NULL; + WebKitWebContext* _tmp0_; + WebKitWebContext* _tmp1_; +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); +#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class)->constructed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane), G_TYPE_OBJECT, GObject)); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = webkit_web_context_get_default (); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ctx = _tmp1_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + webkit_web_context_register_uri_scheme (ctx, "shotwell-auth", _publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb_web_kit_uri_scheme_request_callback, g_object_ref (self), g_object_unref); +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_object_unref0 (ctx); +#line 400 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self; - GtkButton* _tmp0_; - guint _tmp1_; - GtkEntry* _tmp2_; - guint _tmp3_; -#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane); -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->continue_button; -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp1_, NULL, FALSE); -#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self); -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->pin_entry; -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("changed", GTK_TYPE_EDITABLE, &_tmp3_, NULL, FALSE); -#line 255 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_EDITABLE, GtkEditable), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self); -#line 1922 "FlickrPublishingAuthenticator.c" +static void _vala_SoupURI_free (SoupURI* self) { +#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_boxed_free (soup_uri_get_type (), self); +#line 407 "FlickrPublishingAuthenticator.c" } -static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer data2); - register GMarshalFunc_VOID__OBJECT_STRING callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (n_param_values == 3); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data1 = closure->data; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data2 = param_values->data[0].v_pointer; -#line 1941 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* base) { + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; + SoupURI* uri = NULL; + WebKitWebView* _tmp0_; + WebKitWebView* _tmp1_; + const gchar* _tmp2_; + SoupURI* _tmp3_; + SoupURI* _tmp4_; + gboolean _tmp5_ = FALSE; + SoupURI* _tmp6_; + const gchar* _tmp7_; + const gchar* _tmp9_; +#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = shotwell_plugins_common_web_authentication_pane_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane)); +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = _tmp0_; +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = webkit_web_view_get_uri (_tmp1_); +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp3_ = soup_uri_new (_tmp2_); +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = _tmp3_; +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_object_unref0 (_tmp1_); +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + uri = _tmp4_; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp6_ = uri; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp7_ = _tmp6_->scheme; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + if (g_strcmp0 (_tmp7_, "shotwell-auth") == 0) { +#line 445 "FlickrPublishingAuthenticator.c" + const gchar* _tmp8_; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp8_ = self->priv->auth_code; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp5_ = _tmp8_ == NULL; +#line 451 "FlickrPublishingAuthenticator.c" } else { -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data1 = param_values->data[0].v_pointer; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - data2 = closure->data; -#line 1947 "FlickrPublishingAuthenticator.c" +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp5_ = FALSE; +#line 455 "FlickrPublishingAuthenticator.c" } -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), data2); -#line 1953 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_class_init (PublishingAuthenticatorShotwellFlickrPinEntryPaneClass * klass) { -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_parent_class = g_type_class_peek_parent (klass); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPanePrivate)); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_pin_entry_pane_finalize; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_PROCEED_SIGNAL] = g_signal_new ("proceed", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, G_TYPE_STRING); -#line 1966 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_widget; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_get_preferred_geometry; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_installed; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_flickr_pin_entry_pane_real_on_pane_uninstalled; -#line 1981 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_instance_init (PublishingAuthenticatorShotwellFlickrPinEntryPane * self) { -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE (self); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pane_widget = NULL; -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->continue_button = NULL; -#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pin_entry = NULL; -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->pin_entry_caption = NULL; -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->explanatory_text = NULL; -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->builder = NULL; -#line 2000 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_pin_entry_pane_finalize (GObject * obj) { - PublishingAuthenticatorShotwellFlickrPinEntryPane * self; -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingAuthenticatorShotwellFlickrPinEntryPane); -#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->continue_button); -#line 208 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pin_entry); -#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->pin_entry_caption); -#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->explanatory_text); -#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->builder); -#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_pin_entry_pane_parent_class)->finalize (obj); -#line 2022 "FlickrPublishingAuthenticator.c" +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + if (_tmp5_) { +#line 58 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_signal_emit (self, publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL], 0); +#line 461 "FlickrPublishingAuthenticator.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp9_ = self->priv->auth_code; +#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + if (_tmp9_ != NULL) { +#line 467 "FlickrPublishingAuthenticator.c" + const gchar* _tmp10_; +#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp10_ = self->priv->auth_code; +#line 62 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_signal_emit (self, publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL], 0, _tmp10_); +#line 473 "FlickrPublishingAuthenticator.c" + } +#line 55 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + __vala_SoupURI_free0 (uri); +#line 477 "FlickrPublishingAuthenticator.c" +} + + +static guint8* string_get_data (const gchar* self, int* result_length1) { + guint8* result; + guint8* res = NULL; + gint res_length1; + gint _res_size_; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; +#line 1428 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res = (guint8*) self; +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res_length1 = -1; +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _res_size_ = res_length1; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res_length1 = (gint) _tmp1_; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = res_length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = res; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3__length1 = res_length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4__length1 = _tmp3__length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (result_length1) { +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + *result_length1 = _tmp4__length1; +#line 521 "FlickrPublishingAuthenticator.c" + } +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 527 "FlickrPublishingAuthenticator.c" } -GType publishing_authenticator_shotwell_flickr_pin_entry_pane_get_type (void) { - static volatile gsize publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrPinEntryPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id; - publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellFlickrPinEntryPane", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); - g_once_init_leave (&publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile, publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id); - } - return publishing_authenticator_shotwell_flickr_pin_entry_pane_type_id__volatile; +static guint8* _vala_array_dup1 (guint8* self, int length) { +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + return g_memdup (self, length * sizeof (guint8)); +#line 534 "FlickrPublishingAuthenticator.c" } -static void _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self) { -#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated ((PublishingAuthenticatorShotwellFlickrFlickr*) self); -#line 2043 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_on_shotwell_auth_request_cb (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* self, WebKitURISchemeRequest* request) { + SoupURI* uri = NULL; + WebKitURISchemeRequest* _tmp0_; + const gchar* _tmp1_; + SoupURI* _tmp2_; + GHashTable* form_data = NULL; + const gchar* _tmp3_; + GHashTable* _tmp4_; + gconstpointer _tmp5_; + gchar* _tmp6_; + gchar* response = NULL; + gchar* _tmp7_; + GMemoryInputStream* mins = NULL; + guint8* _tmp8_; + gint _tmp8__length1; + guint8* _tmp9_; + gint _tmp9__length1; + guint8* _tmp10_; + gint _tmp10__length1; + GMemoryInputStream* _tmp11_; + WebKitURISchemeRequest* _tmp12_; +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_WEB_AUTHENTICATION_PANE (self)); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_return_if_fail (WEBKIT_IS_URI_SCHEME_REQUEST (request)); +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = request; +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = webkit_uri_scheme_request_get_uri (_tmp0_); +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = soup_uri_new (_tmp1_); +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + uri = _tmp2_; +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp3_ = uri->query; +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = soup_form_decode (_tmp3_); +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + form_data = _tmp4_; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp5_ = g_hash_table_lookup (form_data, "oauth_verifier"); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp6_ = g_strdup ((const gchar*) _tmp5_); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_free0 (self->priv->auth_code); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self->priv->auth_code = _tmp6_; +#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp7_ = g_strdup (""); +#line 71 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + response = _tmp7_; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp8_ = string_get_data (response, &_tmp8__length1); +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp9_ = _tmp8_; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp9__length1 = _tmp8__length1; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup1 (_tmp9_, _tmp9__length1) : ((gpointer) _tmp9_); +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp10__length1 = _tmp9__length1; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp11_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp10_, _tmp10__length1, NULL); +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + mins = _tmp11_; +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp12_ = request; +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + webkit_uri_scheme_request_finish (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (mins, g_input_stream_get_type (), GInputStream), (gint64) -1, "text/plain"); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_object_unref0 (mins); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_free0 (response); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_hash_table_unref0 (form_data); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + __vala_SoupURI_free0 (uri); +#line 615 "FlickrPublishingAuthenticator.c" } -static void _g_free0_ (gpointer var) { -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - var = (g_free (var), NULL); -#line 2050 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_class_init (PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass * klass) { +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class = g_type_class_peek_parent (klass); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPanePrivate)); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((GObjectClass *) klass)->constructed = (void (*) (GObject *)) publishing_authenticator_shotwell_flickr_web_authentication_pane_real_constructed; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((ShotwellPluginsCommonWebAuthenticationPaneClass *) klass)->on_page_load = (void (*) (ShotwellPluginsCommonWebAuthenticationPane *)) publishing_authenticator_shotwell_flickr_web_authentication_pane_real_on_page_load; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_AUTHORIZED_SIGNAL] = g_signal_new ("authorized", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_web_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_ERROR_SIGNAL] = g_signal_new ("error", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 634 "FlickrPublishingAuthenticator.c" } -static void _g_variant_unref0_ (gpointer var) { -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); -#line 2057 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_instance_init (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self) { +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self->priv->auth_code = NULL; +#line 643 "FlickrPublishingAuthenticator.c" } -static GVariant* _variant_new1 (const gchar* value) { -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 2064 "FlickrPublishingAuthenticator.c" +static void publishing_authenticator_shotwell_flickr_web_authentication_pane_finalize (GObject * obj) { + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane * self; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_WEB_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellFlickrWebAuthenticationPane); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_free0 (self->priv->auth_code); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_web_authentication_pane_parent_class)->finalize (obj); +#line 655 "FlickrPublishingAuthenticator.c" } -static GVariant* _variant_new2 (const gchar* value) { -#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 2071 "FlickrPublishingAuthenticator.c" +GType publishing_authenticator_shotwell_flickr_web_authentication_pane_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_web_authentication_pane_instance_init, NULL }; + GType publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id; + publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id = g_type_register_static (SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, "PublishingAuthenticatorShotwellFlickrWebAuthenticationPane", &g_define_type_info, 0); + g_once_init_leave (&publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id); + } + return publishing_authenticator_shotwell_flickr_web_authentication_pane_type_id__volatile; } PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, SpitPublishingPluginHost* host) { PublishingAuthenticatorShotwellFlickrFlickr * self = NULL; SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - GHashFunc _tmp2_; - GEqualFunc _tmp3_; - GHashTable* _tmp4_; - GHashTable* _tmp5_; - gchar* _tmp6_; - GVariant* _tmp7_; - GHashTable* _tmp8_; - gchar* _tmp9_; - GVariant* _tmp10_; - PublishingAuthenticatorShotwellFlickrSession* _tmp11_; - PublishingAuthenticatorShotwellFlickrSession* _tmp12_; - PublishingAuthenticatorShotwellFlickrSession* _tmp13_; -#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 266 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = (PublishingAuthenticatorShotwellFlickrFlickr*) g_object_new (object_type, NULL); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = host; -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 268 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->host = _tmp1_; -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = g_str_hash; -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_str_equal; -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_variant_unref0_); -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 269 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->params = _tmp4_; -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = self->priv->params; -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = g_strdup ("ConsumerKey"); -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = _variant_new1 (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY); -#line 270 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_insert (_tmp5_, _tmp6_, _tmp7_); -#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = self->priv->params; -#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = g_strdup ("ConsumerSecret"); -#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = _variant_new2 (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET); -#line 271 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_insert (_tmp8_, _tmp9_, _tmp10_); -#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = publishing_authenticator_shotwell_flickr_session_new (); -#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 273 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv->session = _tmp11_; -#line 274 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = self->priv->session; -#line 274 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_set_api_credentials (_tmp12_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET); -#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = self->priv->session; -#line 275 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0); -#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 79 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + self = (PublishingAuthenticatorShotwellFlickrFlickr*) publishing_authenticator_shotwell_oauth1_authenticator_construct (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_API_SECRET, _tmp0_); +#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return self; -#line 2145 "FlickrPublishingAuthenticator.c" +#line 682 "FlickrPublishingAuthenticator.c" } PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host) { -#line 265 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 78 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return publishing_authenticator_shotwell_flickr_flickr_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, host); -#line 2152 "FlickrPublishingAuthenticator.c" -} - - -void publishing_authenticator_shotwell_flickr_flickr_invalidate_persistent_session (PublishingAuthenticatorShotwellFlickrFlickr* self) { -#line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (self, ""); -#line 284 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (self, ""); -#line 285 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (self, ""); -#line 2165 "FlickrPublishingAuthenticator.c" -} - - -static gboolean publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (PublishingAuthenticatorShotwellFlickrFlickr* self) { - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - gchar* _tmp2_; - gchar* _tmp3_; - gboolean _tmp4_; -#line 288 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), FALSE); -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (self); -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_; -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_ != NULL; -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp3_); -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp4_) { -#line 2188 "FlickrPublishingAuthenticator.c" - gchar* _tmp5_; - gchar* _tmp6_; -#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (self); -#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = _tmp5_; -#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _tmp6_ != NULL; -#line 290 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp6_); -#line 2199 "FlickrPublishingAuthenticator.c" - } else { -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = FALSE; -#line 2203 "FlickrPublishingAuthenticator.c" - } -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_tmp1_) { -#line 2207 "FlickrPublishingAuthenticator.c" - gchar* _tmp7_; - gchar* _tmp8_; -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (self); -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = _tmp8_ != NULL; -#line 291 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp8_); -#line 2218 "FlickrPublishingAuthenticator.c" - } else { -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = FALSE; -#line 2222 "FlickrPublishingAuthenticator.c" - } -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp0_; -#line 289 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 2228 "FlickrPublishingAuthenticator.c" +#line 689 "FlickrPublishingAuthenticator.c" } -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self) { - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 294 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL); -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp1_; -#line 295 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 2246 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* username) { - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 298 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (username != NULL); -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = username; -#line 299 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", _tmp1_); -#line 2263 "FlickrPublishingAuthenticator.c" -} - - -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self) { - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 302 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL); -#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL); -#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp1_; -#line 303 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 2281 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) { - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 306 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (token != NULL); -#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = token; -#line 307 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", _tmp1_); -#line 2298 "FlickrPublishingAuthenticator.c" -} - - -static gchar* publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self) { - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 310 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self), NULL); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", NULL); -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp1_; -#line 311 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 2316 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* secret) { - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (secret != NULL); -#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = secret; -#line 315 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", _tmp1_); -#line 2333 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (SpitPublishingAuthenticator* base) { +static void publishing_authenticator_shotwell_flickr_flickr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { PublishingAuthenticatorShotwellFlickrFlickr * self; gboolean _tmp0_; -#line 318 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 319 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = publishing_authenticator_shotwell_flickr_flickr_is_persistent_session_valid (self); -#line 319 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp0_) { -#line 2346 "FlickrPublishingAuthenticator.c" - PublishingAuthenticatorShotwellFlickrSession* _tmp1_; +#line 702 "FlickrPublishingAuthenticator.c" + PublishingRESTSupportOAuth1Session* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; -#line 320 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:320: attempt start: a persistent se" \ -"ssion is available; using it"); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->session; -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token (self); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:84: attempt start: a persistent ses" \ +"sion is available; using it"); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp3_ = _tmp2_; -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_token_secret (self); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = _tmp4_; -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = publishing_authenticator_shotwell_flickr_flickr_get_persistent_access_phase_username (self); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp6_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp7_ = _tmp6_; -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, _tmp7_); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, _tmp7_); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp7_); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp5_); -#line 322 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp3_); -#line 2378 "FlickrPublishingAuthenticator.c" +#line 734 "FlickrPublishingAuthenticator.c" } else { -#line 325 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:325: attempt start: no persistent s" \ -"ession available; showing login welcome pane"); -#line 326 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 89 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:89: attempt start: no persistent se" \ +"ssion available; showing login welcome pane"); +#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (self); -#line 2384 "FlickrPublishingAuthenticator.c" +#line 740 "FlickrPublishingAuthenticator.c" } } -static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (SpitPublishingAuthenticator* base) { +static gboolean publishing_authenticator_shotwell_flickr_flickr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { PublishingAuthenticatorShotwellFlickrFlickr * self; gboolean result = FALSE; -#line 330 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" result = TRUE; -#line 331 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return result; -#line 2398 "FlickrPublishingAuthenticator.c" -} - - -static gpointer _g_hash_table_ref0 (gpointer self) { -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return self ? g_hash_table_ref (self) : NULL; -#line 2405 "FlickrPublishingAuthenticator.c" -} - - -static GHashTable* publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter (SpitPublishingAuthenticator* base) { - PublishingAuthenticatorShotwellFlickrFlickr * self; - GHashTable* result = NULL; - GHashTable* _tmp0_; - GHashTable* _tmp1_; -#line 334 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->params; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = _g_hash_table_ref0 (_tmp0_); -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - result = _tmp1_; -#line 335 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return result; -#line 2424 "FlickrPublishingAuthenticator.c" +#line 754 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_flickr_real_logout (SpitPublishingAuthenticator* base) { +static void publishing_authenticator_shotwell_flickr_flickr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { PublishingAuthenticatorShotwellFlickrFlickr * self; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; -#line 338 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 98 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->session; -#line 339 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_deauthenticate (_tmp0_); -#line 340 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_invalidate_persistent_session (self); -#line 2439 "FlickrPublishingAuthenticator.c" +#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_oauth1_session_deauthenticate (_tmp0_); +#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 769 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (SpitPublishingAuthenticator* base) { +static void publishing_authenticator_shotwell_flickr_flickr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { PublishingAuthenticatorShotwellFlickrFlickr * self; -#line 343 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 2447 "FlickrPublishingAuthenticator.c" +#line 777 "FlickrPublishingAuthenticator.c" } static void _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self) { -#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked ((PublishingAuthenticatorShotwellFlickrFlickr*) self); -#line 2454 "FlickrPublishingAuthenticator.c" +#line 784 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_flickr_do_show_login_welcome_pane (PublishingAuthenticatorShotwellFlickrFlickr* self) { SpitPublishingPluginHost* _tmp0_; SpitPublishingPluginHost* _tmp1_; -#line 347 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 348 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:348: ACTION: installing login welco" \ +#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:108: ACTION: installing login welco" \ "me pane"); -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 350 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->host; -#line 351 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_install_welcome_pane (_tmp1_, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_SERVICE_WELCOME_MESSAGE, _publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked_spit_publishing_login_callback, self); -#line 2473 "FlickrPublishingAuthenticator.c" +#line 803 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_flickr_on_welcome_pane_login_clicked (PublishingAuthenticatorShotwellFlickrFlickr* self) { -#line 354 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 355 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:355: EVENT: user clicked 'Login' bu" \ +#line 115 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:115: EVENT: user clicked 'Login' bu" \ "tton in the welcome pane"); -#line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 117 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_do_run_authentication_request_transaction (self); -#line 2484 "FlickrPublishingAuthenticator.c" +#line 814 "FlickrPublishingAuthenticator.c" } static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { -#line 367 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender); -#line 2491 "FlickrPublishingAuthenticator.c" +#line 821 "FlickrPublishingAuthenticator.c" } static void _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { -#line 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender, err); -#line 2498 "FlickrPublishingAuthenticator.c" +#line 828 "FlickrPublishingAuthenticator.c" } @@ -2513,52 +840,52 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_run_authenticatio SpitPublishingPluginHost* _tmp0_; SpitPublishingPluginHost* _tmp1_; PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* txn = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp2_; + PublishingRESTSupportOAuth1Session* _tmp2_; PublishingAuthenticatorShotwellFlickrAuthenticationRequestTransaction* _tmp3_; GError * _inner_error_ = NULL; -#line 360 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 361 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:361: ACTION: running authentication" \ +#line 121 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:121: ACTION: running authentication" \ " request transaction"); -#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->host; -#line 363 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 364 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->host; -#line 364 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_install_static_message_pane (_tmp1_, _ ("Preparing for login…"), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->session; -#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp3_ = publishing_authenticator_shotwell_flickr_authentication_request_transaction_new (_tmp2_); -#line 366 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 126 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" txn = _tmp3_; -#line 367 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 127 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 368 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 2531 "FlickrPublishingAuthenticator.c" +#line 861 "FlickrPublishingAuthenticator.c" { -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2539 "FlickrPublishingAuthenticator.c" +#line 869 "FlickrPublishingAuthenticator.c" goto __catch1_spit_publishing_publishing_error; } -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_clear_error (&_inner_error_); -#line 371 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 131 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return; -#line 2550 "FlickrPublishingAuthenticator.c" +#line 880 "FlickrPublishingAuthenticator.c" } } goto __finally1; @@ -2567,36 +894,36 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_run_authenticatio GError* err = NULL; SpitPublishingPluginHost* _tmp4_; GError* _tmp5_; -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" err = _inner_error_; -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _inner_error_ = NULL; -#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = err; -#line 373 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_error_free0 (err); -#line 2571 "FlickrPublishingAuthenticator.c" +#line 901 "FlickrPublishingAuthenticator.c" } __finally1: -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_clear_error (&_inner_error_); -#line 370 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return; -#line 2584 "FlickrPublishingAuthenticator.c" +#line 914 "FlickrPublishingAuthenticator.c" } -#line 360 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 2588 "FlickrPublishingAuthenticator.c" +#line 918 "FlickrPublishingAuthenticator.c" } @@ -2611,44 +938,44 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_ PublishingRESTSupportTransaction* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; -#line 377 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 377 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = txn; -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 378 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 138 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = txn; -#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 379 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 139 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp4_ = txn; -#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); -#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp6_ = _tmp5_; -#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:381: EVENT: OAuth authentication re" \ +#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:141: EVENT: OAuth authentication re" \ "quest transaction completed; response = '%s'", _tmp6_); -#line 381 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 141 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp6_); -#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp7_ = txn; -#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_); -#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp9_ = _tmp8_; -#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_from_auth_request (self, _tmp9_); -#line 384 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 144 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp9_); -#line 2639 "FlickrPublishingAuthenticator.c" +#line 969 "FlickrPublishingAuthenticator.c" } @@ -2659,34 +986,34 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_ guint _tmp3_; SpitPublishingPluginHost* _tmp4_; GError* _tmp5_; -#line 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 387 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = txn; -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 389 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 149 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = txn; -#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 390 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 392 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:392: EVENT: OAuth authentication re" \ +#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:152: EVENT: OAuth authentication re" \ "quest transaction caused a network error"); -#line 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = err; -#line 393 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 153 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 395 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 2676 "FlickrPublishingAuthenticator.c" +#line 1006 "FlickrPublishingAuthenticator.c" } @@ -2707,412 +1034,207 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_parse_token_info_ const gchar* _tmp10_; const gchar* _tmp16_; const gchar* _tmp17_; -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (response != NULL); -#line 399 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = response; -#line 399 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:399: ACTION: parsing authorization " \ +#line 159 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:159: ACTION: parsing authorization " \ "request response '%s' into token and secret", _tmp0_); -#line 401 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 161 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" oauth_token = NULL; -#line 402 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 162 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" oauth_token_secret = NULL; -#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp1_ = response; -#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = soup_form_decode (_tmp1_); -#line 404 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 164 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" data = _tmp2_; -#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp3_ = data; -#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_); -#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (oauth_token); -#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = g_strdup (_tmp4_); -#line 405 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 165 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" oauth_token = _tmp5_; -#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp6_ = data; -#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_); -#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (oauth_token_secret); -#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp8_ = g_strdup (_tmp7_); -#line 406 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 166 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" oauth_token_secret = _tmp8_; -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp10_ = oauth_token; -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp10_ == NULL) { -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp9_ = TRUE; -#line 2741 "FlickrPublishingAuthenticator.c" +#line 1071 "FlickrPublishingAuthenticator.c" } else { const gchar* _tmp11_; -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp11_ = oauth_token_secret; -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp9_ = _tmp11_ == NULL; -#line 2748 "FlickrPublishingAuthenticator.c" +#line 1078 "FlickrPublishingAuthenticator.c" } -#line 408 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 168 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp9_) { -#line 2752 "FlickrPublishingAuthenticator.c" +#line 1082 "FlickrPublishingAuthenticator.c" SpitPublishingPluginHost* _tmp12_; const gchar* _tmp13_; GError* _tmp14_; GError* _tmp15_; -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = self->priv->host; -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp13_ = response; -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp14_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "'%s' isn't a valid response to an OAuth authentication request", _tmp13_); -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp15_ = _tmp14_; -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp12_, _tmp15_); -#line 409 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 169 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_error_free0 (_tmp15_); -#line 2769 "FlickrPublishingAuthenticator.c" +#line 1099 "FlickrPublishingAuthenticator.c" } -#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp16_ = oauth_token; -#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp17_ = oauth_token_secret; -#line 413 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (self, _tmp16_, _tmp17_); -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_hash_table_unref0 (data); -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (oauth_token_secret); -#line 398 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 158 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (oauth_token); -#line 2783 "FlickrPublishingAuthenticator.c" +#line 1113 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_flickr_on_authentication_token_available (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token, const gchar* token_secret) { const gchar* _tmp0_; const gchar* _tmp1_; - PublishingAuthenticatorShotwellFlickrSession* _tmp2_; + PublishingRESTSupportOAuth1Session* _tmp2_; const gchar* _tmp3_; const gchar* _tmp4_; const gchar* _tmp5_; -#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (token != NULL); -#line 416 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (token_secret != NULL); -#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = token; -#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp1_ = token_secret; -#line 417 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:417: EVENT: OAuth authentication to" \ +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:177: EVENT: OAuth authentication to" \ "ken (%s) and token secret (%s) available", _tmp0_, _tmp1_); -#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->session; -#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp3_ = token; -#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp4_ = token_secret; -#line 420 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_set_request_phase_credentials (_tmp2_, _tmp3_, _tmp4_); -#line 422 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 180 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_oauth1_session_set_request_phase_credentials (_tmp2_, _tmp3_, _tmp4_); +#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = token; -#line 422 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_launch_system_browser (self, _tmp5_); -#line 2818 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (PublishingAuthenticatorShotwellFlickrFlickr* self) { -#line 425 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 426 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:426: EVENT: system browser launched" \ -"."); -#line 428 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (self); -#line 2829 "FlickrPublishingAuthenticator.c" +#line 182 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (self, _tmp5_); +#line 1148 "FlickrPublishingAuthenticator.c" } -static void _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed (PublishingAuthenticatorShotwellFlickrPinEntryPane* _sender, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self) { -#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, sender, authorization_pin); -#line 2836 "FlickrPublishingAuthenticator.c" +static void _publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, const gchar* auth_code, gpointer self) { +#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_flickr_do_verify_pin ((PublishingAuthenticatorShotwellFlickrFlickr*) self, auth_code); +#line 1155 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed (PublishingAuthenticatorShotwellFlickrFlickr* self, PublishingAuthenticatorShotwellFlickrPinEntryPane* sender, const gchar* pin) { - PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp0_; - guint _tmp1_; - const gchar* _tmp2_; -#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_PIN_ENTRY_PANE (sender)); -#line 431 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (pin != NULL); -#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = sender; -#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("proceed", PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_PIN_ENTRY_PANE, &_tmp1_, NULL, FALSE); -#line 432 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed, self); -#line 434 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:434: EVENT: user clicked 'Continue'" \ -" in PIN entry pane."); -#line 436 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = pin; -#line 436 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (self, _tmp2_); -#line 2862 "FlickrPublishingAuthenticator.c" +static void _publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error (PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _sender, gpointer self) { +#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_authenticator_shotwell_flickr_flickr_on_web_login_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self); +#line 1162 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_flickr_do_launch_system_browser (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) { - gchar* login_uri = NULL; +static void publishing_authenticator_shotwell_flickr_flickr_do_web_authentication (PublishingAuthenticatorShotwellFlickrFlickr* self, const gchar* token) { + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* pane = NULL; const gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - const gchar* _tmp5_; - GError * _inner_error_ = NULL; -#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + PublishingAuthenticatorShotwellFlickrWebAuthenticationPane* _tmp1_; + SpitPublishingPluginHost* _tmp2_; +#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (token != NULL); -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = token; -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strconcat ("https://www.flickr.com/services/oauth/authorize?oauth_token=", _tmp0_, NULL); -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = _tmp1_; -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = g_strconcat (_tmp2_, "&perms=write", NULL); -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp2_); -#line 440 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - login_uri = _tmp4_; -#line 443 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = login_uri; -#line 443 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:443: ACTION: launching system brows" \ -"er with uri = '%s'", _tmp5_); -#line 2897 "FlickrPublishingAuthenticator.c" - { - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = login_uri; -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = g_strconcat ("xdg-open ", _tmp6_, NULL); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = _tmp7_; -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_spawn_command_line_async (_tmp8_, &_inner_error_); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp8_); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (_inner_error_->domain == G_SPAWN_ERROR) { -#line 2916 "FlickrPublishingAuthenticator.c" - goto __catch2_g_spawn_error; - } -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (login_uri); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 446 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 2927 "FlickrPublishingAuthenticator.c" - } - } - goto __finally2; - __catch2_g_spawn_error: - { - GError* e = NULL; - SpitPublishingPluginHost* _tmp9_; - GError* _tmp10_; - GError* _tmp11_; -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - e = _inner_error_; -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _inner_error_ = NULL; -#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = self->priv->host; -#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, "couldn't launch system web browser to complete Flickr login"); -#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = _tmp10_; -#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp9_, _tmp11_); -#line 448 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (_tmp11_); -#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (e); -#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (login_uri); -#line 450 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 2957 "FlickrPublishingAuthenticator.c" - } - __finally2: -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (login_uri); -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 445 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 2970 "FlickrPublishingAuthenticator.c" - } -#line 453 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_on_system_browser_launched (self); -#line 439 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (login_uri); -#line 2976 "FlickrPublishingAuthenticator.c" +#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = publishing_authenticator_shotwell_flickr_web_authentication_pane_new (_tmp0_); +#line 186 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + pane = _tmp1_; +#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 187 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 188 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_signal_connect_object (pane, "authorized", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_do_verify_pin_publishing_authenticator_shotwell_flickr_web_authentication_pane_authorized, self, 0); +#line 189 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_signal_connect_object (pane, "error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_web_login_error_publishing_authenticator_shotwell_flickr_web_authentication_pane_error, self, 0); +#line 185 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_object_unref0 (pane); +#line 1191 "FlickrPublishingAuthenticator.c" } -static void publishing_authenticator_shotwell_flickr_flickr_do_show_pin_entry_pane (PublishingAuthenticatorShotwellFlickrFlickr* self) { - GtkBuilder* builder = NULL; - GtkBuilder* _tmp0_; - PublishingAuthenticatorShotwellFlickrPinEntryPane* pin_entry_pane = NULL; - GtkBuilder* _tmp7_; - PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp8_; - PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp9_; - SpitPublishingPluginHost* _tmp10_; - PublishingAuthenticatorShotwellFlickrPinEntryPane* _tmp11_; - GError * _inner_error_ = NULL; -#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +static void publishing_authenticator_shotwell_flickr_flickr_on_web_login_error (PublishingAuthenticatorShotwellFlickrFlickr* self) { + SpitPublishingPluginHost* _tmp0_; + GError* _tmp1_; + GError* _tmp2_; +#line 192 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 457 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:457: ACTION: showing PIN entry pane"); -#line 459 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = gtk_builder_new (); -#line 459 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - builder = _tmp0_; -#line 2998 "FlickrPublishingAuthenticator.c" - { - GtkBuilder* _tmp1_; -#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = builder; -#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - gtk_builder_add_from_resource (_tmp1_, PLUGIN_RESOURCE_PATH "/" "flickr_pin_entry_pane.ui", &_inner_error_); -#line 462 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 3007 "FlickrPublishingAuthenticator.c" - goto __catch3_g_error; - } - } - goto __finally3; - __catch3_g_error: - { - GError* e = NULL; - GError* _tmp2_; - const gchar* _tmp3_; - SpitPublishingPluginHost* _tmp4_; - GError* _tmp5_; - GError* _tmp6_; -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - e = _inner_error_; -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _inner_error_ = NULL; -#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = e; -#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = _tmp2_->message; -#line 465 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_warning ("FlickrPublishingAuthenticator.vala:465: Could not parse UI file! Error" \ -": %s.", _tmp3_); -#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A file required for publishing is unavailable. Publishing to Flickr ca" \ -"n’t continue.")); -#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = _tmp5_; -#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_post_error (_tmp4_, _tmp6_); -#line 466 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (_tmp6_); -#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_error_free0 (e); -#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (builder); -#line 469 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 3046 "FlickrPublishingAuthenticator.c" - } - __finally3: -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (builder); -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_clear_error (&_inner_error_); -#line 461 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return; -#line 3059 "FlickrPublishingAuthenticator.c" - } -#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = builder; -#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = publishing_authenticator_shotwell_flickr_pin_entry_pane_new (_tmp7_); -#line 472 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - pin_entry_pane = _tmp8_; -#line 473 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = pin_entry_pane; -#line 473 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_connect_object (_tmp9_, "proceed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_pin_entry_proceed_publishing_authenticator_shotwell_flickr_pin_entry_pane_proceed, self, 0); -#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = self->priv->host; -#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = pin_entry_pane; -#line 474 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (pin_entry_pane); -#line 456 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (builder); -#line 3081 "FlickrPublishingAuthenticator.c" +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_PROTOCOL_ERROR, _ ("Flickr authorization failed")); +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = _tmp1_; +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + spit_publishing_plugin_host_post_error (_tmp0_, _tmp2_); +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _g_error_free0 (_tmp2_); +#line 1211 "FlickrPublishingAuthenticator.c" } static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { -#line 484 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender); -#line 3088 "FlickrPublishingAuthenticator.c" +#line 1218 "FlickrPublishingAuthenticator.c" } static void _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { -#line 485 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error ((PublishingAuthenticatorShotwellFlickrFlickr*) self, _sender, err); -#line 3095 "FlickrPublishingAuthenticator.c" +#line 1225 "FlickrPublishingAuthenticator.c" } @@ -3121,97 +1243,97 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_verify_pin (Publi SpitPublishingPluginHost* _tmp1_; SpitPublishingPluginHost* _tmp2_; PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* txn = NULL; - PublishingAuthenticatorShotwellFlickrSession* _tmp3_; + PublishingRESTSupportOAuth1Session* _tmp3_; const gchar* _tmp4_; PublishingAuthenticatorShotwellFlickrAccessTokenFetchTransaction* _tmp5_; GError * _inner_error_ = NULL; -#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (pin != NULL); -#line 478 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = pin; -#line 478 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:478: ACTION: validating authorizati" \ +#line 197 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:197: ACTION: validating authorizati" \ "on PIN %s", _tmp0_); -#line 480 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = self->priv->host; -#line 480 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 199 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); -#line 481 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->host; -#line 481 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 200 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_install_static_message_pane (_tmp2_, _ ("Verifying authorization…"), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = self->priv->session; -#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp4_ = pin; -#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = publishing_authenticator_shotwell_flickr_access_token_fetch_transaction_new (_tmp3_, _tmp4_); -#line 483 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 202 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" txn = _tmp5_; -#line 484 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 203 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 485 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self, 0); -#line 3136 "FlickrPublishingAuthenticator.c" +#line 1266 "FlickrPublishingAuthenticator.c" { -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 3144 "FlickrPublishingAuthenticator.c" - goto __catch4_spit_publishing_publishing_error; +#line 1274 "FlickrPublishingAuthenticator.c" + goto __catch2_spit_publishing_publishing_error; } -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_clear_error (&_inner_error_); -#line 488 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return; -#line 3155 "FlickrPublishingAuthenticator.c" +#line 1285 "FlickrPublishingAuthenticator.c" } } - goto __finally4; - __catch4_spit_publishing_publishing_error: + goto __finally2; + __catch2_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp6_; GError* _tmp7_; -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" err = _inner_error_; -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _inner_error_ = NULL; -#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = self->priv->host; -#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp7_ = err; -#line 490 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_); -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_error_free0 (err); -#line 3176 "FlickrPublishingAuthenticator.c" +#line 1306 "FlickrPublishingAuthenticator.c" } - __finally4: -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + __finally2: +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_clear_error (&_inner_error_); -#line 487 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" return; -#line 3189 "FlickrPublishingAuthenticator.c" +#line 1319 "FlickrPublishingAuthenticator.c" } -#line 477 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 196 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 3193 "FlickrPublishingAuthenticator.c" +#line 1323 "FlickrPublishingAuthenticator.c" } @@ -3223,36 +1345,36 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetc PublishingRESTSupportTransaction* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; -#line 494 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 494 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = txn; -#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 495 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = txn; -#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 496 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 215 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); -#line 498 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:498: EVENT: fetching OAuth access t" \ +#line 217 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:217: EVENT: fetching OAuth access t" \ "oken over the network succeeded"); -#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp4_ = txn; -#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); -#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp6_ = _tmp5_; -#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_do_extract_access_phase_credentials_from_reponse (self, _tmp6_); -#line 500 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 219 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (_tmp6_); -#line 3233 "FlickrPublishingAuthenticator.c" +#line 1363 "FlickrPublishingAuthenticator.c" } @@ -3263,34 +1385,34 @@ static void publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetc guint _tmp3_; SpitPublishingPluginHost* _tmp4_; GError* _tmp5_; -#line 503 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 503 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = txn; -#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 505 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = txn; -#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 506 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 225 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); -#line 508 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:508: EVENT: fetching OAuth access t" \ +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:227: EVENT: fetching OAuth access t" \ "oken over the network caused an error."); -#line 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = self->priv->host; -#line 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = err; -#line 510 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 229 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 511 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 3270 "FlickrPublishingAuthenticator.c" +#line 1400 "FlickrPublishingAuthenticator.c" } @@ -3317,334 +1439,159 @@ static void publishing_authenticator_shotwell_flickr_flickr_do_extract_access_ph gboolean _tmp15_ = FALSE; gboolean _tmp16_ = FALSE; const gchar* _tmp17_; -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_return_if_fail (response != NULL); -#line 515 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp0_ = response; -#line 515 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:515: ACTION: extracting access phas" \ +#line 234 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:234: ACTION: extracting access phas" \ "e credentials from '%s'", _tmp0_); -#line 517 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" token = NULL; -#line 518 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 237 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" token_secret = NULL; -#line 519 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 238 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" username = NULL; -#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp1_ = response; -#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp2_ = soup_form_decode (_tmp1_); -#line 521 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" data = _tmp2_; -#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp3_ = data; -#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_); -#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (token); -#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp5_ = g_strdup (_tmp4_); -#line 522 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 241 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" token = _tmp5_; -#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp6_ = data; -#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_); -#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (token_secret); -#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp8_ = g_strdup (_tmp7_); -#line 523 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" token_secret = _tmp8_; -#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp9_ = data; -#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_hash_table_lookup_extended (_tmp9_, "username", NULL, &_tmp10_); -#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (username); -#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp11_ = g_strdup (_tmp10_); -#line 524 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" username = _tmp11_; -#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp12_ = token; -#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp13_ = token_secret; -#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp14_ = username; -#line 526 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_debug ("FlickrPublishingAuthenticator.vala:526: access phase credentials: { to" \ +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + g_debug ("FlickrPublishingAuthenticator.vala:245: access phase credentials: { to" \ "ken = '%s'; token_secret = '%s'; username = '%s' }", _tmp12_, _tmp13_, _tmp14_); -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp17_ = token; -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp17_ == NULL) { -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp16_ = TRUE; -#line 3361 "FlickrPublishingAuthenticator.c" +#line 1491 "FlickrPublishingAuthenticator.c" } else { const gchar* _tmp18_; -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp18_ = token_secret; -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp16_ = _tmp18_ == NULL; -#line 3368 "FlickrPublishingAuthenticator.c" +#line 1498 "FlickrPublishingAuthenticator.c" } -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp16_) { -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp15_ = TRUE; -#line 3374 "FlickrPublishingAuthenticator.c" +#line 1504 "FlickrPublishingAuthenticator.c" } else { const gchar* _tmp19_; -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp19_ = username; -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp15_ = _tmp19_ == NULL; -#line 3381 "FlickrPublishingAuthenticator.c" +#line 1511 "FlickrPublishingAuthenticator.c" } -#line 529 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 248 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" if (_tmp15_) { -#line 3385 "FlickrPublishingAuthenticator.c" +#line 1515 "FlickrPublishingAuthenticator.c" SpitPublishingPluginHost* _tmp20_; GError* _tmp21_; GError* _tmp22_; -#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp20_ = self->priv->host; -#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp21_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "expected " "access phase credentials to contain token, token secret, and username " \ "but at " "least one of these is absent"); -#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp22_ = _tmp21_; -#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" spit_publishing_plugin_host_post_error (_tmp20_, _tmp22_); -#line 530 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_error_free0 (_tmp22_); -#line 533 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); -#line 3401 "FlickrPublishingAuthenticator.c" +#line 1531 "FlickrPublishingAuthenticator.c" } else { - PublishingAuthenticatorShotwellFlickrSession* _tmp23_; + PublishingRESTSupportOAuth1Session* _tmp23_; const gchar* _tmp24_; const gchar* _tmp25_; const gchar* _tmp26_; -#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp23_ = self->priv->session; -#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + _tmp23_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp24_ = token; -#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp25_ = token_secret; -#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _tmp26_ = username; -#line 535 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_session_set_access_phase_credentials (_tmp23_, _tmp24_, _tmp25_, _tmp26_); -#line 3417 "FlickrPublishingAuthenticator.c" +#line 254 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp23_, _tmp24_, _tmp25_, _tmp26_); +#line 1547 "FlickrPublishingAuthenticator.c" } -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_hash_table_unref0 (data); -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (username); -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (token_secret); -#line 514 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" _g_free0 (token); -#line 3427 "FlickrPublishingAuthenticator.c" -} - - -static GVariant* _variant_new3 (gchar* value) { -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 3434 "FlickrPublishingAuthenticator.c" -} - - -static GVariant* _variant_new4 (gchar* value) { -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 3441 "FlickrPublishingAuthenticator.c" -} - - -static GVariant* _variant_new5 (gchar* value) { -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - return g_variant_ref_sink (g_variant_new_string (value)); -#line 3448 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated (PublishingAuthenticatorShotwellFlickrFlickr* self) { - GHashTable* _tmp0_; - gchar* _tmp1_; - PublishingAuthenticatorShotwellFlickrSession* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - GVariant* _tmp5_; - GHashTable* _tmp6_; - gchar* _tmp7_; - PublishingAuthenticatorShotwellFlickrSession* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - GVariant* _tmp11_; - GHashTable* _tmp12_; - gchar* _tmp13_; - PublishingAuthenticatorShotwellFlickrSession* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - GVariant* _tmp17_; - PublishingAuthenticatorShotwellFlickrSession* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - PublishingAuthenticatorShotwellFlickrSession* _tmp21_; - gchar* _tmp22_; - gchar* _tmp23_; - PublishingAuthenticatorShotwellFlickrSession* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; -#line 539 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_IS_FLICKR (self)); -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->params; -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp1_ = g_strdup ("AuthToken"); -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp2_ = self->priv->session; -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp3_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token (_tmp2_); -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp4_ = _tmp3_; -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp5_ = _variant_new3 (_tmp4_); -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_insert (_tmp0_, _tmp1_, _tmp5_); -#line 540 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp4_); -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp6_ = self->priv->params; -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp7_ = g_strdup ("AuthTokenSecret"); -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp8_ = self->priv->session; -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp9_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (_tmp8_); -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp10_ = _tmp9_; -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp11_ = _variant_new4 (_tmp10_); -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_insert (_tmp6_, _tmp7_, _tmp11_); -#line 541 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp10_); -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp12_ = self->priv->params; -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp13_ = g_strdup ("Username"); -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp14_ = self->priv->session; -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp15_ = publishing_authenticator_shotwell_flickr_session_get_username (_tmp14_); -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp16_ = _tmp15_; -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp17_ = _variant_new5 (_tmp16_); -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_hash_table_insert (_tmp12_, _tmp13_, _tmp17_); -#line 542 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp16_); -#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp18_ = self->priv->session; -#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp19_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token (_tmp18_); -#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp20_ = _tmp19_; -#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token (self, _tmp20_); -#line 544 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp20_); -#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp21_ = self->priv->session; -#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp22_ = publishing_authenticator_shotwell_flickr_session_get_access_phase_token_secret (_tmp21_); -#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp23_ = _tmp22_; -#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_token_secret (self, _tmp23_); -#line 545 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp23_); -#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp24_ = self->priv->session; -#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp25_ = publishing_authenticator_shotwell_flickr_session_get_username (_tmp24_); -#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp26_ = _tmp25_; -#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_set_persistent_access_phase_username (self, _tmp26_); -#line 546 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_free0 (_tmp26_); -#line 549 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated"); -#line 3562 "FlickrPublishingAuthenticator.c" +#line 1557 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_flickr_class_init (PublishingAuthenticatorShotwellFlickrFlickrClass * klass) { -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" publishing_authenticator_shotwell_flickr_flickr_parent_class = g_type_class_peek_parent (klass); -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellFlickrFlickrPrivate)); -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_flickr_flickr_finalize; -#line 3573 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) { -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface); -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_authenticate; -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_can_logout; -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_get_authentication_parameter; -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_logout; -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_refresh; -#line 3590 "FlickrPublishingAuthenticator.c" +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_authenticate; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_can_logout; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_logout; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_flickr_flickr_real_refresh; +#line 1572 "FlickrPublishingAuthenticator.c" } static void publishing_authenticator_shotwell_flickr_flickr_instance_init (PublishingAuthenticatorShotwellFlickrFlickr * self) { -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_GET_PRIVATE (self); -#line 3597 "FlickrPublishingAuthenticator.c" -} - - -static void publishing_authenticator_shotwell_flickr_flickr_finalize (GObject * obj) { - PublishingAuthenticatorShotwellFlickrFlickr * self; - PublishingAuthenticatorShotwellFlickrSession* _tmp0_; - guint _tmp1_; -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr); -#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _tmp0_ = self->priv->session; -#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE); -#line 279 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_flickr_flickr_on_session_authenticated_publishing_rest_support_session_authenticated, self); -#line 261 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_hash_table_unref0 (self->priv->params); -#line 262 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 263 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - _g_object_unref0 (self->priv->host); -#line 260 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala" - G_OBJECT_CLASS (publishing_authenticator_shotwell_flickr_flickr_parent_class)->finalize (obj); -#line 3621 "FlickrPublishingAuthenticator.c" } @@ -3652,32 +1599,12 @@ GType publishing_authenticator_shotwell_flickr_flickr_get_type (void) { static volatile gsize publishing_authenticator_shotwell_flickr_flickr_type_id__volatile = 0; if (g_once_init_enter (&publishing_authenticator_shotwell_flickr_flickr_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellFlickrFlickrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_flickr_flickr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellFlickrFlickr), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_flickr_flickr_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_flickr_flickr_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; GType publishing_authenticator_shotwell_flickr_flickr_type_id; - publishing_authenticator_shotwell_flickr_flickr_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellFlickrFlickr", &g_define_type_info, 0); - g_type_add_interface_static (publishing_authenticator_shotwell_flickr_flickr_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info); + publishing_authenticator_shotwell_flickr_flickr_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, "PublishingAuthenticatorShotwellFlickrFlickr", &g_define_type_info, 0); g_once_init_leave (&publishing_authenticator_shotwell_flickr_flickr_type_id__volatile, publishing_authenticator_shotwell_flickr_flickr_type_id); } return publishing_authenticator_shotwell_flickr_flickr_type_id__volatile; } -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala index e389908..97629ed 100644 --- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala +++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala @@ -4,318 +4,82 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ +using Shotwell.Plugins; + namespace Publishing.Authenticator.Shotwell.Flickr { internal const string ENDPOINT_URL = "https://api.flickr.com/services/rest"; internal const string EXPIRED_SESSION_ERROR_CODE = "98"; - internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; - - internal class Transaction : Publishing.RESTSupport.Transaction { - public Transaction(Session session, Publishing.RESTSupport.HttpMethod method = - Publishing.RESTSupport.HttpMethod.POST) { - base(session, method); - setup_arguments(); - } - - public Transaction.with_uri(Session session, string uri, - Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST) { - base.with_endpoint_url(session, uri, method); - setup_arguments(); - } - - private void setup_arguments() { - var session = (Session) get_parent_session(); - - add_argument("oauth_nonce", session.get_oauth_nonce()); - add_argument("oauth_signature_method", "HMAC-SHA1"); - add_argument("oauth_version", "1.0"); - add_argument("oauth_callback", "oob"); - add_argument("oauth_timestamp", session.get_oauth_timestamp()); - add_argument("oauth_consumer_key", session.get_consumer_key()); - } - - - public override void execute() throws Spit.Publishing.PublishingError { - ((Session) get_parent_session()).sign_transaction(this); - - base.execute(); - } - } - - internal class Session : Publishing.RESTSupport.Session { - private string? request_phase_token = null; - private string? request_phase_token_secret = null; - private string? access_phase_token = null; - private string? access_phase_token_secret = null; - private string? username = null; - private string? consumer_key = null; - private string? consumer_secret = null; - - public Session() { - base(); - } - - public override bool is_authenticated() { - return (access_phase_token != null && access_phase_token_secret != null && - username != null); - } - - public void authenticate_from_persistent_credentials(string token, string secret, - string username) { - this.access_phase_token = token; - this.access_phase_token_secret = secret; - this.username = username; - - this.authenticated(); - } - - public void deauthenticate() { - access_phase_token = null; - access_phase_token_secret = null; - username = null; - } - - public void set_api_credentials(string consumer_key, string consumer_secret) { - this.consumer_key = consumer_key; - this.consumer_secret = consumer_secret; - } - - public void sign_transaction(Publishing.RESTSupport.Transaction txn) { - string http_method = txn.get_method().to_string(); - - debug("signing transaction with parameters:"); - debug("HTTP method = " + http_method); - - Publishing.RESTSupport.Argument[] base_string_arguments = txn.get_arguments(); - - Publishing.RESTSupport.Argument[] sorted_args = - Publishing.RESTSupport.Argument.sort(base_string_arguments); - - string arguments_string = ""; - for (int i = 0; i < sorted_args.length; i++) { - arguments_string += (sorted_args[i].key + "=" + sorted_args[i].value); - if (i < sorted_args.length - 1) - arguments_string += "&"; - } - - string? signing_key = null; - if (access_phase_token_secret != null) { - debug("access phase token secret available; using it as signing key"); - - signing_key = consumer_secret + "&" + access_phase_token_secret; - } else if (request_phase_token_secret != null) { - debug("request phase token secret available; using it as signing key"); - - signing_key = consumer_secret + "&" + request_phase_token_secret; - } else { - debug("neither access phase nor request phase token secrets available; using API " + - "key as signing key"); - - signing_key = consumer_secret + "&"; - } - - string signature_base_string = http_method + "&" + Soup.URI.encode( - txn.get_endpoint_url(), ENCODE_RFC_3986_EXTRA) + "&" + - Soup.URI.encode(arguments_string, ENCODE_RFC_3986_EXTRA); - - debug("signature base string = '%s'", signature_base_string); - - debug("signing key = '%s'", signing_key); - - // compute the signature - string signature = RESTSupport.hmac_sha1(signing_key, signature_base_string); - signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); - - debug("signature = '%s'", signature); - - txn.add_argument("oauth_signature", signature); - } - - public void set_request_phase_credentials(string token, string secret) { - this.request_phase_token = token; - this.request_phase_token_secret = secret; - } - - public void set_access_phase_credentials(string token, string secret, string username) { - this.access_phase_token = token; - this.access_phase_token_secret = secret; - this.username = username; - - authenticated(); - } - - public string get_oauth_nonce() { - TimeVal currtime = TimeVal(); - currtime.get_current_time(); - - return Checksum.compute_for_string(ChecksumType.MD5, currtime.tv_sec.to_string() + - currtime.tv_usec.to_string()); - } - - public string get_oauth_timestamp() { - return GLib.get_real_time().to_string().substring(0, 10); - } - - public string get_consumer_key() { - assert(consumer_key != null); - return consumer_key; - } - - public string get_request_phase_token() { - assert(request_phase_token != null); - return request_phase_token; - } - - public string get_access_phase_token() { - assert(access_phase_token != null); - return access_phase_token; - } - public string get_access_phase_token_secret() { - assert(access_phase_token_secret != null); - return access_phase_token_secret; - } - - public string get_username() { - assert(is_authenticated()); - return username; - } - } internal const string API_KEY = "60dd96d4a2ad04888b09c9e18d82c26f"; internal const string API_SECRET = "d0960565e03547c1"; internal const string SERVICE_WELCOME_MESSAGE = _("You are not currently logged into Flickr.\n\nClick Log in to log into Flickr in your Web browser. You will have to authorize Shotwell Connect to link to your Flickr account."); - internal class AuthenticationRequestTransaction : Transaction { - public AuthenticationRequestTransaction(Session session) { + internal class AuthenticationRequestTransaction : Publishing.RESTSupport.OAuth1.Transaction { + public AuthenticationRequestTransaction(Publishing.RESTSupport.OAuth1.Session session) { base.with_uri(session, "https://www.flickr.com/services/oauth/request_token", Publishing.RESTSupport.HttpMethod.GET); + add_argument("oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); } } - internal class AccessTokenFetchTransaction : Transaction { - public AccessTokenFetchTransaction(Session session, string user_verifier) { + internal class AccessTokenFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction { + public AccessTokenFetchTransaction(Publishing.RESTSupport.OAuth1.Session session, string user_verifier) { base.with_uri(session, "https://www.flickr.com/services/oauth/access_token", Publishing.RESTSupport.HttpMethod.GET); add_argument("oauth_verifier", user_verifier); add_argument("oauth_token", session.get_request_phase_token()); + add_argument("oauth_callback", "shotwell-auth%3A%2F%2Flocal-callback"); } } - internal class PinEntryPane : Spit.Publishing.DialogPane, GLib.Object { - private Gtk.Box pane_widget = null; - private Gtk.Button continue_button = null; - private Gtk.Entry pin_entry = null; - private Gtk.Label pin_entry_caption = null; - private Gtk.Label explanatory_text = null; - private Gtk.Builder builder = null; - - public signal void proceed(PinEntryPane sender, string authorization_pin); - - public PinEntryPane(Gtk.Builder builder) { - this.builder = builder; - assert(builder != null); - assert(builder.get_objects().length() > 0); - - explanatory_text = builder.get_object("explanatory_text") as Gtk.Label; - pin_entry_caption = builder.get_object("pin_entry_caption") as Gtk.Label; - pin_entry = builder.get_object("pin_entry") as Gtk.Entry; - continue_button = builder.get_object("continue_button") as Gtk.Button; - - pane_widget = builder.get_object("pane_widget") as Gtk.Box; + internal class WebAuthenticationPane : Common.WebAuthenticationPane { + private string? auth_code = null; + private const string LOGIN_URI = "https://www.flickr.com/services/oauth/authorize?oauth_token=%s&perms=write"; - pane_widget.show_all(); + public signal void authorized(string auth_code); + public signal void error(); - on_pin_entry_contents_changed(); + public WebAuthenticationPane(string token) { + Object(login_uri : LOGIN_URI.printf(token)); } - private void on_continue_clicked() { - proceed(this, pin_entry.get_text()); - } + public override void constructed() { + base.constructed(); - private void on_pin_entry_contents_changed() { - continue_button.set_sensitive(pin_entry.text_length > 0); + var ctx = WebKit.WebContext.get_default(); + ctx.register_uri_scheme("shotwell-auth", this.on_shotwell_auth_request_cb); } - public Gtk.Widget get_widget() { - return pane_widget; - } + public override void on_page_load() { + var uri = new Soup.URI(get_view().get_uri()); + if (uri.scheme == "shotwell-auth" && this.auth_code == null) { + this.error(); + } - public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() { - return Spit.Publishing.DialogPane.GeometryOptions.NONE; + if (this.auth_code != null) { + this.authorized(this.auth_code); + } } - public void on_pane_installed() { - continue_button.clicked.connect(on_continue_clicked); - pin_entry.changed.connect(on_pin_entry_contents_changed); - } + private void on_shotwell_auth_request_cb(WebKit.URISchemeRequest request) { + var uri = new Soup.URI(request.get_uri()); + var form_data = Soup.Form.decode (uri.query); + this.auth_code = form_data.lookup("oauth_verifier"); - public void on_pane_uninstalled() { - continue_button.clicked.disconnect(on_continue_clicked); - pin_entry.changed.disconnect(on_pin_entry_contents_changed); + var response = ""; + var mins = new MemoryInputStream.from_data(response.data, null); + request.finish(mins, -1, "text/plain"); } } - - internal class Flickr : GLib.Object, Spit.Publishing.Authenticator { - private GLib.HashTable<string, Variant> params; - private Session session; - private Spit.Publishing.PluginHost host; - + internal class Flickr : Publishing.Authenticator.Shotwell.OAuth1.Authenticator { public Flickr(Spit.Publishing.PluginHost host) { - base(); - - this.host = host; - params = new GLib.HashTable<string, Variant>(str_hash, str_equal); - params.insert("ConsumerKey", API_KEY); - params.insert("ConsumerSecret", API_SECRET); - - session = new Session(); - session.set_api_credentials(API_KEY, API_SECRET); - session.authenticated.connect(on_session_authenticated); - } - - ~Flickr() { - session.authenticated.disconnect(on_session_authenticated); - } - - public void invalidate_persistent_session() { - set_persistent_access_phase_token(""); - set_persistent_access_phase_token_secret(""); - set_persistent_access_phase_username(""); - } - - private bool is_persistent_session_valid() { - return (get_persistent_access_phase_username() != null && - get_persistent_access_phase_token() != null && - get_persistent_access_phase_token_secret() != null); - } - - private string? get_persistent_access_phase_username() { - return host.get_config_string("access_phase_username", null); - } - - private void set_persistent_access_phase_username(string username) { - host.set_config_string("access_phase_username", username); - } - - private string? get_persistent_access_phase_token() { - return host.get_config_string("access_phase_token", null); + base(API_KEY, API_SECRET, host); } - private void set_persistent_access_phase_token(string token) { - host.set_config_string("access_phase_token", token); - } - - private string? get_persistent_access_phase_token_secret() { - return host.get_config_string("access_phase_token_secret", null); - } - - private void set_persistent_access_phase_token_secret(string secret) { - host.set_config_string("access_phase_token_secret", secret); - } - - public void authenticate() { + public override void authenticate() { if (is_persistent_session_valid()) { debug("attempt start: a persistent session is available; using it"); @@ -327,20 +91,16 @@ namespace Publishing.Authenticator.Shotwell.Flickr { } } - public bool can_logout() { + public override bool can_logout() { return true; } - public GLib.HashTable<string, Variant> get_authentication_parameter() { - return this.params; - } - - public void logout () { + public override void logout () { session.deauthenticate(); invalidate_persistent_session(); } - public void refresh() { + public override void refresh() { // No-Op with flickr } @@ -419,59 +179,18 @@ namespace Publishing.Authenticator.Shotwell.Flickr { session.set_request_phase_credentials(token, token_secret); - do_launch_system_browser(token); + do_web_authentication(token); } - private void on_system_browser_launched() { - debug("EVENT: system browser launched."); - - do_show_pin_entry_pane(); + private void do_web_authentication(string token) { + var pane = new WebAuthenticationPane(token); + host.install_dialog_pane(pane); + pane.authorized.connect(this.do_verify_pin); + pane.error.connect(this.on_web_login_error); } - private void on_pin_entry_proceed(PinEntryPane sender, string pin) { - sender.proceed.disconnect(on_pin_entry_proceed); - - debug("EVENT: user clicked 'Continue' in PIN entry pane."); - - do_verify_pin(pin); - } - - private void do_launch_system_browser(string token) { - string login_uri = "https://www.flickr.com/services/oauth/authorize?oauth_token=" + token + - "&perms=write"; - - debug("ACTION: launching system browser with uri = '%s'", login_uri); - - try { - Process.spawn_command_line_async("xdg-open " + login_uri); - } catch (SpawnError e) { - host.post_error(new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR( - "couldn't launch system web browser to complete Flickr login")); - return; - } - - on_system_browser_launched(); - } - - private void do_show_pin_entry_pane() { - debug("ACTION: showing PIN entry pane"); - - Gtk.Builder builder = new Gtk.Builder(); - - try { - builder.add_from_resource (Resources.RESOURCE_PATH + "/" + - "flickr_pin_entry_pane.ui"); - } catch (Error e) { - warning("Could not parse UI file! Error: %s.", e.message); - host.post_error( - new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR( - _("A file required for publishing is unavailable. Publishing to Flickr can’t continue."))); - return; - } - - PinEntryPane pin_entry_pane = new PinEntryPane(builder); - pin_entry_pane.proceed.connect(on_pin_entry_proceed); - host.install_dialog_pane(pin_entry_pane); + private void on_web_login_error() { + host.post_error(new Spit.Publishing.PublishingError.PROTOCOL_ERROR(_("Flickr authorization failed"))); } private void do_verify_pin(string pin) { @@ -536,17 +255,5 @@ namespace Publishing.Authenticator.Shotwell.Flickr { } } - private void on_session_authenticated() { - params.insert("AuthToken", session.get_access_phase_token()); - params.insert("AuthTokenSecret", session.get_access_phase_token_secret()); - params.insert("Username", session.get_username()); - - set_persistent_access_phase_token(session.get_access_phase_token()); - set_persistent_access_phase_token_secret(session.get_access_phase_token_secret()); - set_persistent_access_phase_username(session.get_username()); - - - this.authenticated(); - } } } diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.c b/plugins/authenticator/shotwell/GoogleAuthenticator.c index b531dd6..9f9972f 100644 --- a/plugins/authenticator/shotwell/GoogleAuthenticator.c +++ b/plugins/authenticator/shotwell/GoogleAuthenticator.c @@ -1373,7 +1373,7 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens #line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 1368 "GoogleAuthenticator.c" - goto __catch5_spit_publishing_publishing_error; + goto __catch3_spit_publishing_publishing_error; } #line 178 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (tokens_txn); @@ -1386,8 +1386,8 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens #line 1379 "GoogleAuthenticator.c" } } - goto __finally5; - __catch5_spit_publishing_publishing_error: + goto __finally3; + __catch3_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp4_; @@ -1406,7 +1406,7 @@ static void publishing_authenticator_shotwell_google_google_do_get_access_tokens _g_error_free0 (err); #line 1400 "GoogleAuthenticator.c" } - __finally5: + __finally3: #line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" @@ -1562,11 +1562,11 @@ static void publishing_authenticator_shotwell_google_google_do_extract_tokens (P #line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1554 "GoogleAuthenticator.c" - goto __catch6_g_error; + goto __catch4_g_error; } } - goto __finally6; - __catch6_g_error: + goto __finally4; + __catch4_g_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp3_; @@ -1608,7 +1608,7 @@ static void publishing_authenticator_shotwell_google_google_do_extract_tokens (P return; #line 1599 "GoogleAuthenticator.c" } - __finally6: + __finally4: #line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" @@ -1965,11 +1965,11 @@ static void publishing_authenticator_shotwell_google_google_do_fetch_username (P #line 283 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1954 "GoogleAuthenticator.c" - goto __catch7_g_error; + goto __catch5_g_error; } } - goto __finally7; - __catch7_g_error: + goto __finally5; + __catch5_g_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp4_; @@ -1988,7 +1988,7 @@ static void publishing_authenticator_shotwell_google_google_do_fetch_username (P _g_error_free0 (err); #line 1976 "GoogleAuthenticator.c" } - __finally7: + __finally5: #line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 282 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" @@ -2126,11 +2126,11 @@ static void publishing_authenticator_shotwell_google_google_do_extract_username #line 314 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 2112 "GoogleAuthenticator.c" - goto __catch8_g_error; + goto __catch6_g_error; } } - goto __finally8; - __catch8_g_error: + goto __finally6; + __catch6_g_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp3_; @@ -2172,7 +2172,7 @@ static void publishing_authenticator_shotwell_google_google_do_extract_username return; #line 2157 "GoogleAuthenticator.c" } - __finally8: + __finally6: #line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 313 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" @@ -2361,7 +2361,7 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_ #line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 2346 "GoogleAuthenticator.c" - goto __catch9_spit_publishing_publishing_error; + goto __catch7_spit_publishing_publishing_error; } #line 357 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" _publishing_rest_support_transaction_unref0 (txn); @@ -2374,8 +2374,8 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_ #line 2357 "GoogleAuthenticator.c" } } - goto __finally9; - __catch9_spit_publishing_publishing_error: + goto __finally7; + __catch7_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp3_; @@ -2394,7 +2394,7 @@ static void publishing_authenticator_shotwell_google_google_do_exchange_refresh_ _g_error_free0 (err); #line 2378 "GoogleAuthenticator.c" } - __finally9: + __finally7: #line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 356 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/GoogleAuthenticator.vala" diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.c b/plugins/authenticator/shotwell/OAuth1Authenticator.c new file mode 100644 index 0000000..4fe57ef --- /dev/null +++ b/plugins/authenticator/shotwell/OAuth1Authenticator.c @@ -0,0 +1,711 @@ +/* OAuth1Authenticator.c generated by valac 0.36.6, the Vala compiler + * generated from OAuth1Authenticator.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * Copyright 2017 Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include "shotwell-plugin-dev-1.0.h" +#include <stdlib.h> +#include <string.h> +#include "shotwell-plugin-common.h" + + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) + +typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _PublishingAuthenticatorShotwellOAuth1Authenticator { + GObject parent_instance; + PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; + GHashTable* params; + PublishingRESTSupportOAuth1Session* session; + SpitPublishingPluginHost* host; +}; + +struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { + GObjectClass parent_class; + void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +}; + + +static gpointer publishing_authenticator_shotwell_oauth1_authenticator_parent_class = NULL; +static SpitPublishingAuthenticatorIface * publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = NULL; + +GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_DUMMY_PROPERTY +}; +void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self); +PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host); +static void _g_free0_ (gpointer var); +static void _g_variant_unref0_ (gpointer var); +static GVariant* _variant_new1 (const gchar* value); +static GVariant* _variant_new2 (const gchar* value); +void publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gboolean publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static gboolean publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base); +void publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +void publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* token); +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* secret); +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* username); +gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static GVariant* _variant_new3 (gchar* value); +static GVariant* _variant_new4 (gchar* value); +static GVariant* _variant_new5 (gchar* value); +static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj); + + +static void _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self) { +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated ((PublishingAuthenticatorShotwellOAuth1Authenticator*) self); +#line 92 "OAuth1Authenticator.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return self ? g_object_ref (self) : NULL; +#line 99 "OAuth1Authenticator.c" +} + + +static void _g_free0_ (gpointer var) { +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + var = (g_free (var), NULL); +#line 106 "OAuth1Authenticator.c" +} + + +static void _g_variant_unref0_ (gpointer var) { +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + (var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)); +#line 113 "OAuth1Authenticator.c" +} + + +static GVariant* _variant_new1 (const gchar* value) { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return g_variant_ref_sink (g_variant_new_string (value)); +#line 120 "OAuth1Authenticator.c" +} + + +static GVariant* _variant_new2 (const gchar* value) { +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return g_variant_ref_sink (g_variant_new_string (value)); +#line 127 "OAuth1Authenticator.c" +} + + +PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host) { + PublishingAuthenticatorShotwellOAuth1Authenticator * self = NULL; + SpitPublishingPluginHost* _tmp0_; + SpitPublishingPluginHost* _tmp1_; + GHashFunc _tmp2_; + GEqualFunc _tmp3_; + GHashTable* _tmp4_; + GHashTable* _tmp5_; + gchar* _tmp6_; + const gchar* _tmp7_; + GVariant* _tmp8_; + GHashTable* _tmp9_; + gchar* _tmp10_; + const gchar* _tmp11_; + GVariant* _tmp12_; + PublishingRESTSupportOAuth1Session* _tmp13_; + PublishingRESTSupportOAuth1Session* _tmp14_; + const gchar* _tmp15_; + const gchar* _tmp16_; + PublishingRESTSupportOAuth1Session* _tmp17_; +#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (api_key != NULL, NULL); +#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (api_secret != NULL, NULL); +#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 16 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self = (PublishingAuthenticatorShotwellOAuth1Authenticator*) g_object_new (object_type, NULL); +#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = host; +#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_object_unref0 (self->host); +#line 17 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self->host = _tmp1_; +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp2_ = g_str_hash; +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp3_ = g_str_equal; +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_variant_unref0_); +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_hash_table_unref0 (self->params); +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self->params = _tmp4_; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp5_ = self->params; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp6_ = g_strdup ("ConsumerKey"); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp7_ = api_key; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp8_ = _variant_new1 (_tmp7_); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_hash_table_insert (_tmp5_, _tmp6_, _tmp8_); +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp9_ = self->params; +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp10_ = g_strdup ("ConsumerSecret"); +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp11_ = api_secret; +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp12_ = _variant_new2 (_tmp11_); +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_hash_table_insert (_tmp9_, _tmp10_, _tmp12_); +#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp13_ = publishing_rest_support_oauth1_session_new (NULL); +#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _publishing_rest_support_session_unref0 (self->session); +#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self->session = _tmp13_; +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp14_ = self->session; +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp15_ = api_key; +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp16_ = api_secret; +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_rest_support_oauth1_session_set_api_credentials (_tmp14_, _tmp15_, _tmp16_); +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp17_ = self->session; +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0); +#line 15 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return self; +#line 217 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_authenticate'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return; +#line 226 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 33 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->authenticate (self); +#line 235 "OAuth1Authenticator.c" +} + + +static gboolean publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + gboolean _tmp0_ = FALSE; +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_can_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return _tmp0_; +#line 245 "OAuth1Authenticator.c" +} + + +gboolean publishing_authenticator_shotwell_oauth1_authenticator_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE); +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->can_logout (self); +#line 254 "OAuth1Authenticator.c" +} + + +static gpointer _g_hash_table_ref0 (gpointer self) { +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return self ? g_hash_table_ref (self) : NULL; +#line 261 "OAuth1Authenticator.c" +} + + +static GHashTable* publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter (SpitPublishingAuthenticator* base) { + PublishingAuthenticatorShotwellOAuth1Authenticator * self; + GHashTable* result = NULL; + GHashTable* _tmp0_; + GHashTable* _tmp1_; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->params; +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = _g_hash_table_ref0 (_tmp0_); +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + result = _tmp1_; +#line 38 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return result; +#line 280 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return; +#line 289 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->logout (self); +#line 298 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_authenticator_shotwell_oauth1_authenticator_refresh'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return; +#line 307 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS (self)->refresh (self); +#line 316 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, ""); +#line 47 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, ""); +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, ""); +#line 329 "OAuth1Authenticator.c" +} + + +gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gchar* _tmp2_; + gchar* _tmp3_; + gboolean _tmp4_; +#line 50 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), FALSE); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (self); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp3_ = _tmp2_; +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp4_ = _tmp3_ != NULL; +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp3_); +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + if (_tmp4_) { +#line 352 "OAuth1Authenticator.c" + gchar* _tmp5_; + gchar* _tmp6_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp5_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (self); +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp6_ = _tmp5_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = _tmp6_ != NULL; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp6_); +#line 363 "OAuth1Authenticator.c" + } else { +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = FALSE; +#line 367 "OAuth1Authenticator.c" + } +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + if (_tmp1_) { +#line 371 "OAuth1Authenticator.c" + gchar* _tmp7_; + gchar* _tmp8_; +#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp7_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (self); +#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp8_ = _tmp7_; +#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = _tmp8_ != NULL; +#line 53 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp8_); +#line 382 "OAuth1Authenticator.c" + } else { +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = FALSE; +#line 386 "OAuth1Authenticator.c" + } +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + result = _tmp0_; +#line 51 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return result; +#line 392 "OAuth1Authenticator.c" +} + + +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_; + gchar* _tmp1_; +#line 56 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL); +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + result = _tmp1_; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return result; +#line 410 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* username) { + SpitPublishingPluginHost* _tmp0_; + const gchar* _tmp1_; +#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 60 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (username != NULL); +#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = username; +#line 61 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", _tmp1_); +#line 427 "OAuth1Authenticator.c" +} + + +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_; + gchar* _tmp1_; +#line 64 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL); +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + result = _tmp1_; +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return result; +#line 445 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* token) { + SpitPublishingPluginHost* _tmp0_; + const gchar* _tmp1_; +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 68 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (token != NULL); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = token; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", _tmp1_); +#line 462 "OAuth1Authenticator.c" +} + + +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_; + gchar* _tmp1_; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self), NULL); +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", NULL); +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + result = _tmp1_; +#line 73 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return result; +#line 480 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self, const gchar* secret) { + SpitPublishingPluginHost* _tmp0_; + const gchar* _tmp1_; +#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (secret != NULL); +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->host; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = secret; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", _tmp1_); +#line 497 "OAuth1Authenticator.c" +} + + +static GVariant* _variant_new3 (gchar* value) { +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return g_variant_ref_sink (g_variant_new_string (value)); +#line 504 "OAuth1Authenticator.c" +} + + +static GVariant* _variant_new4 (gchar* value) { +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return g_variant_ref_sink (g_variant_new_string (value)); +#line 511 "OAuth1Authenticator.c" +} + + +static GVariant* _variant_new5 (gchar* value) { +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + return g_variant_ref_sink (g_variant_new_string (value)); +#line 518 "OAuth1Authenticator.c" +} + + +void publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated (PublishingAuthenticatorShotwellOAuth1Authenticator* self) { + GHashTable* _tmp0_; + gchar* _tmp1_; + PublishingRESTSupportOAuth1Session* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + GVariant* _tmp5_; + GHashTable* _tmp6_; + gchar* _tmp7_; + PublishingRESTSupportOAuth1Session* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + GVariant* _tmp11_; + GHashTable* _tmp12_; + gchar* _tmp13_; + PublishingRESTSupportOAuth1Session* _tmp14_; + gchar* _tmp15_; + gchar* _tmp16_; + GVariant* _tmp17_; + PublishingRESTSupportOAuth1Session* _tmp18_; + gchar* _tmp19_; + gchar* _tmp20_; + PublishingRESTSupportOAuth1Session* _tmp21_; + gchar* _tmp22_; + gchar* _tmp23_; + PublishingRESTSupportOAuth1Session* _tmp24_; + gchar* _tmp25_; + gchar* _tmp26_; +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR (self)); +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->params; +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp1_ = g_strdup ("AuthToken"); +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp2_ = self->session; +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp3_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp2_); +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp4_ = _tmp3_; +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp5_ = _variant_new3 (_tmp4_); +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_hash_table_insert (_tmp0_, _tmp1_, _tmp5_); +#line 82 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp4_); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp6_ = self->params; +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp7_ = g_strdup ("AuthTokenSecret"); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp8_ = self->session; +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp9_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp8_); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp10_ = _tmp9_; +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp11_ = _variant_new4 (_tmp10_); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_hash_table_insert (_tmp6_, _tmp7_, _tmp11_); +#line 83 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp10_); +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp12_ = self->params; +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp13_ = g_strdup ("Username"); +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp14_ = self->session; +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp15_ = publishing_rest_support_oauth1_session_get_username (_tmp14_); +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp16_ = _tmp15_; +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp17_ = _variant_new5 (_tmp16_); +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_hash_table_insert (_tmp12_, _tmp13_, _tmp17_); +#line 84 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp16_); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp18_ = self->session; +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp19_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp18_); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp20_ = _tmp19_; +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token (self, _tmp20_); +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp20_); +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp21_ = self->session; +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp22_ = publishing_rest_support_oauth1_session_get_access_phase_token_secret (_tmp21_); +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp23_ = _tmp22_; +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_token_secret (self, _tmp23_); +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp23_); +#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp24_ = self->session; +#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp25_ = publishing_rest_support_oauth1_session_get_username (_tmp24_); +#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp26_ = _tmp25_; +#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_set_persistent_access_phase_username (self, _tmp26_); +#line 88 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_free0 (_tmp26_); +#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authenticated"); +#line 632 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_class_init (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_authenticate; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_can_logout; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_logout; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_refresh; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_oauth1_authenticator_finalize; +#line 649 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init (SpitPublishingAuthenticatorIface * iface) { +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_parent_iface = g_type_interface_peek_parent (iface); +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + iface->authenticate = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_authenticate; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + iface->can_logout = (gboolean (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_can_logout; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + iface->get_authentication_parameter = (GHashTable* (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_real_get_authentication_parameter; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + iface->logout = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_logout; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + iface->refresh = (void (*) (SpitPublishingAuthenticator *)) publishing_authenticator_shotwell_oauth1_authenticator_refresh; +#line 666 "OAuth1Authenticator.c" +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_instance_init (PublishingAuthenticatorShotwellOAuth1Authenticator * self) { +} + + +static void publishing_authenticator_shotwell_oauth1_authenticator_finalize (GObject * obj) { + PublishingAuthenticatorShotwellOAuth1Authenticator * self; + PublishingRESTSupportOAuth1Session* _tmp0_; + guint _tmp1_; +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator); +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _tmp0_ = self->session; +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE); +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_oauth1_authenticator_on_session_authenticated_publishing_rest_support_session_authenticated, self); +#line 11 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_hash_table_unref0 (self->params); +#line 12 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _publishing_rest_support_session_unref0 (self->session); +#line 13 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + _g_object_unref0 (self->host); +#line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/OAuth1Authenticator.vala" + G_OBJECT_CLASS (publishing_authenticator_shotwell_oauth1_authenticator_parent_class)->finalize (obj); +#line 694 "OAuth1Authenticator.c" +} + + +GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellOAuth1AuthenticatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellOAuth1Authenticator), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_authenticator_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_oauth1_authenticator_spit_publishing_authenticator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_authenticator_shotwell_oauth1_authenticator_type_id; + publishing_authenticator_shotwell_oauth1_authenticator_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellOAuth1Authenticator", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (publishing_authenticator_shotwell_oauth1_authenticator_type_id, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &spit_publishing_authenticator_info); + g_once_init_leave (&publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile, publishing_authenticator_shotwell_oauth1_authenticator_type_id); + } + return publishing_authenticator_shotwell_oauth1_authenticator_type_id__volatile; +} + + + diff --git a/plugins/authenticator/shotwell/OAuth1Authenticator.vala b/plugins/authenticator/shotwell/OAuth1Authenticator.vala new file mode 100644 index 0000000..399b66f --- /dev/null +++ b/plugins/authenticator/shotwell/OAuth1Authenticator.vala @@ -0,0 +1,96 @@ +/* Copyright 2016 Software Freedom Conservancy Inc. + * Copyright 2017 Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +namespace Publishing.Authenticator.Shotwell.OAuth1 { + + internal abstract class Authenticator : GLib.Object, Spit.Publishing.Authenticator { + protected GLib.HashTable<string, Variant> params; + protected Publishing.RESTSupport.OAuth1.Session session; + protected Spit.Publishing.PluginHost host; + + public Authenticator(string api_key, string api_secret, Spit.Publishing.PluginHost host) { + base(); + this.host = host; + + params = new GLib.HashTable<string, Variant>(str_hash, str_equal); + params.insert("ConsumerKey", api_key); + params.insert("ConsumerSecret", api_secret); + + session = new Publishing.RESTSupport.OAuth1.Session(); + session.set_api_credentials(api_key, api_secret); + session.authenticated.connect(on_session_authenticated); + } + + ~Authenticator() { + session.authenticated.disconnect(on_session_authenticated); + } + + // Methods from Authenticator interface + public abstract void authenticate(); + + public abstract bool can_logout(); + + public GLib.HashTable<string, Variant> get_authentication_parameter() { + return this.params; + } + + public abstract void logout (); + + public abstract void refresh(); + + public void invalidate_persistent_session() { + set_persistent_access_phase_token(""); + set_persistent_access_phase_token_secret(""); + set_persistent_access_phase_username(""); + } + protected bool is_persistent_session_valid() { + return (get_persistent_access_phase_username() != null && + get_persistent_access_phase_token() != null && + get_persistent_access_phase_token_secret() != null); + } + + protected string? get_persistent_access_phase_username() { + return host.get_config_string("access_phase_username", null); + } + + protected void set_persistent_access_phase_username(string username) { + host.set_config_string("access_phase_username", username); + } + + protected string? get_persistent_access_phase_token() { + return host.get_config_string("access_phase_token", null); + } + + protected void set_persistent_access_phase_token(string token) { + host.set_config_string("access_phase_token", token); + } + + protected string? get_persistent_access_phase_token_secret() { + return host.get_config_string("access_phase_token_secret", null); + } + + protected void set_persistent_access_phase_token_secret(string secret) { + host.set_config_string("access_phase_token_secret", secret); + } + + + protected void on_session_authenticated() { + params.insert("AuthToken", session.get_access_phase_token()); + params.insert("AuthTokenSecret", session.get_access_phase_token_secret()); + params.insert("Username", session.get_username()); + + set_persistent_access_phase_token(session.get_access_phase_token()); + set_persistent_access_phase_token_secret(session.get_access_phase_token_secret()); + set_persistent_access_phase_username(session.get_username()); + + + this.authenticated(); + } + + } + +} diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c index 2d42463..6ac8485 100644 --- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c +++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.c @@ -23,6 +23,16 @@ typedef struct _PublishingAuthenticatorFactoryClass PublishingAuthenticatorFacto typedef struct _PublishingAuthenticatorFactoryPrivate PublishingAuthenticatorFactoryPrivate; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) + +typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; + #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR (publishing_authenticator_shotwell_flickr_flickr_get_type ()) #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickr)) #define PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_FLICKR_TYPE_FLICKR, PublishingAuthenticatorShotwellFlickrFlickrClass)) @@ -53,6 +63,16 @@ typedef struct _PublishingAuthenticatorShotwellFacebookFacebookClass PublishingA typedef struct _PublishingAuthenticatorShotwellGoogleGoogle PublishingAuthenticatorShotwellGoogleGoogle; typedef struct _PublishingAuthenticatorShotwellGoogleGoogleClass PublishingAuthenticatorShotwellGoogleGoogleClass; +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR (publishing_authenticator_shotwell_tumblr_tumblr_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) + +typedef struct _PublishingAuthenticatorShotwellTumblrTumblr PublishingAuthenticatorShotwellTumblrTumblr; +typedef struct _PublishingAuthenticatorShotwellTumblrTumblrClass PublishingAuthenticatorShotwellTumblrTumblrClass; + struct _PublishingAuthenticatorFactory { GObject parent_instance; PublishingAuthenticatorFactoryPrivate * priv; @@ -79,6 +99,7 @@ static GeeList* publishing_authenticator_factory_real_get_available_authenticato static SpitPublishingAuthenticator* publishing_authenticator_factory_real_create (SpitPublishingAuthenticatorFactory* base, const gchar* provider, SpitPublishingPluginHost* host); PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_new (SpitPublishingPluginHost* host); PublishingAuthenticatorShotwellFlickrFlickr* publishing_authenticator_shotwell_flickr_flickr_construct (GType object_type, SpitPublishingPluginHost* host); +GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; GType publishing_authenticator_shotwell_flickr_flickr_get_type (void) G_GNUC_CONST; PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_new (SpitPublishingPluginHost* host); PublishingAuthenticatorShotwellFacebookFacebook* publishing_authenticator_shotwell_facebook_facebook_construct (GType object_type, SpitPublishingPluginHost* host); @@ -86,13 +107,16 @@ GType publishing_authenticator_shotwell_facebook_facebook_get_type (void) G_GNUC PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_new (const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host); PublishingAuthenticatorShotwellGoogleGoogle* publishing_authenticator_shotwell_google_google_construct (GType object_type, const gchar* scope, const gchar* welcome_message, SpitPublishingPluginHost* host); GType publishing_authenticator_shotwell_google_google_get_type (void) G_GNUC_CONST; +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host); +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, SpitPublishingPluginHost* host); +GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) G_GNUC_CONST; static void publishing_authenticator_factory_finalize (GObject * obj); static gpointer _g_object_ref0 (gpointer self) { #line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return self ? g_object_ref (self) : NULL; -#line 96 "ShotwellAuthenticatorFactory.c" +#line 120 "ShotwellAuthenticatorFactory.c" } @@ -105,7 +129,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v _tmp0_ = publishing_authenticator_factory_instance; #line 6 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" if (_tmp0_ == NULL) { -#line 109 "ShotwellAuthenticatorFactory.c" +#line 133 "ShotwellAuthenticatorFactory.c" PublishingAuthenticatorFactory* _tmp1_; #line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp1_ = publishing_authenticator_factory_new (); @@ -113,7 +137,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v _g_object_unref0 (publishing_authenticator_factory_instance); #line 7 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" publishing_authenticator_factory_instance = _tmp1_; -#line 117 "ShotwellAuthenticatorFactory.c" +#line 141 "ShotwellAuthenticatorFactory.c" } #line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp2_ = publishing_authenticator_factory_instance; @@ -123,7 +147,7 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_get_instance (v result = _tmp3_; #line 10 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 127 "ShotwellAuthenticatorFactory.c" +#line 151 "ShotwellAuthenticatorFactory.c" } @@ -146,11 +170,13 @@ static GeeList* publishing_authenticator_factory_real_get_available_authenticato gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "picasa"); #line 18 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "youtube"); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 19 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), "tumblr"); +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList); -#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 21 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 154 "ShotwellAuthenticatorFactory.c" +#line 180 "ShotwellAuthenticatorFactory.c" } @@ -160,122 +186,143 @@ static SpitPublishingAuthenticator* publishing_authenticator_factory_real_create const gchar* _tmp0_; const gchar* _tmp1_; GQuark _tmp3_ = 0U; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" static GQuark _tmp2_label0 = 0; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" static GQuark _tmp2_label1 = 0; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" static GQuark _tmp2_label2 = 0; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" static GQuark _tmp2_label3 = 0; -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + static GQuark _tmp2_label4 = 0; +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" g_return_val_if_fail (provider != NULL, NULL); -#line 23 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 24 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp0_ = provider; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp1_ = _tmp0_; -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_); -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("flickr")))) { -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" switch (0) { -#line 188 "ShotwellAuthenticatorFactory.c" +#line 216 "ShotwellAuthenticatorFactory.c" default: { SpitPublishingPluginHost* _tmp4_; PublishingAuthenticatorShotwellFlickrFlickr* _tmp5_; -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp4_ = host; -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp5_ = publishing_authenticator_shotwell_flickr_flickr_new (_tmp4_); -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 27 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 201 "ShotwellAuthenticatorFactory.c" +#line 229 "ShotwellAuthenticatorFactory.c" } } } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("facebook")))) { -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" switch (0) { -#line 207 "ShotwellAuthenticatorFactory.c" +#line 235 "ShotwellAuthenticatorFactory.c" default: { SpitPublishingPluginHost* _tmp6_; PublishingAuthenticatorShotwellFacebookFacebook* _tmp7_; -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp6_ = host; -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp7_ = publishing_authenticator_shotwell_facebook_facebook_new (_tmp6_); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 220 "ShotwellAuthenticatorFactory.c" +#line 248 "ShotwellAuthenticatorFactory.c" } } } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("picasa")))) { -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" switch (0) { -#line 226 "ShotwellAuthenticatorFactory.c" +#line 254 "ShotwellAuthenticatorFactory.c" default: { SpitPublishingPluginHost* _tmp8_; PublishingAuthenticatorShotwellGoogleGoogle* _tmp9_; -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp8_ = host; -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp9_ = publishing_authenticator_shotwell_google_google_new ("https://picasaweb.google.com/data/", _ ("You are not currently logged into Picasa Web Albums.\n" \ "\n" \ "Click Log in to log into Picasa Web Albums in your Web browser. You wi" \ "ll have to authorize Shotwell Connect to link to your Picasa Web Album" \ "s account."), _tmp8_); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 239 "ShotwellAuthenticatorFactory.c" +#line 267 "ShotwellAuthenticatorFactory.c" } } } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("youtube")))) { -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" switch (0) { -#line 245 "ShotwellAuthenticatorFactory.c" +#line 273 "ShotwellAuthenticatorFactory.c" default: { SpitPublishingPluginHost* _tmp10_; PublishingAuthenticatorShotwellGoogleGoogle* _tmp11_; -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp10_ = host; -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" _tmp11_ = publishing_authenticator_shotwell_google_google_new ("https://gdata.youtube.com/", _ ("You are not currently logged into YouTube.\n" \ "\n" \ "You must have already signed up for a Google account and set it up for" \ " use with YouTube to continue. You can set up most accounts by using y" \ "our browser to log into the YouTube site at least once."), _tmp10_); -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); -#line 34 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 35 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + return result; +#line 286 "ShotwellAuthenticatorFactory.c" + } + } + } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("tumblr")))) { +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + switch (0) { +#line 292 "ShotwellAuthenticatorFactory.c" + default: + { + SpitPublishingPluginHost* _tmp12_; + PublishingAuthenticatorShotwellTumblrTumblr* _tmp13_; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + _tmp12_ = host; +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + _tmp13_ = publishing_authenticator_shotwell_tumblr_tumblr_new (_tmp12_); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 258 "ShotwellAuthenticatorFactory.c" +#line 305 "ShotwellAuthenticatorFactory.c" } } } else { -#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" switch (0) { -#line 264 "ShotwellAuthenticatorFactory.c" +#line 311 "ShotwellAuthenticatorFactory.c" default: { -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" result = NULL; -#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return result; -#line 271 "ShotwellAuthenticatorFactory.c" +#line 318 "ShotwellAuthenticatorFactory.c" } } } @@ -288,14 +335,14 @@ PublishingAuthenticatorFactory* publishing_authenticator_factory_construct (GTyp self = (PublishingAuthenticatorFactory*) g_object_new (object_type, NULL); #line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return self; -#line 284 "ShotwellAuthenticatorFactory.c" +#line 331 "ShotwellAuthenticatorFactory.c" } PublishingAuthenticatorFactory* publishing_authenticator_factory_new (void) { #line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" return publishing_authenticator_factory_construct (PUBLISHING_AUTHENTICATOR_TYPE_FACTORY); -#line 291 "ShotwellAuthenticatorFactory.c" +#line 338 "ShotwellAuthenticatorFactory.c" } @@ -304,7 +351,7 @@ static void publishing_authenticator_factory_class_init (PublishingAuthenticator publishing_authenticator_factory_parent_class = g_type_class_peek_parent (klass); #line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_factory_finalize; -#line 300 "ShotwellAuthenticatorFactory.c" +#line 347 "ShotwellAuthenticatorFactory.c" } @@ -315,7 +362,7 @@ static void publishing_authenticator_factory_spit_publishing_authenticator_facto iface->get_available_authenticators = (GeeList* (*) (SpitPublishingAuthenticatorFactory *)) publishing_authenticator_factory_real_get_available_authenticators; #line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" iface->create = (SpitPublishingAuthenticator* (*) (SpitPublishingAuthenticatorFactory *, const gchar*, SpitPublishingPluginHost*)) publishing_authenticator_factory_real_create; -#line 311 "ShotwellAuthenticatorFactory.c" +#line 358 "ShotwellAuthenticatorFactory.c" } @@ -329,7 +376,7 @@ static void publishing_authenticator_factory_finalize (GObject * obj) { self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_TYPE_FACTORY, PublishingAuthenticatorFactory); #line 2 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala" G_OBJECT_CLASS (publishing_authenticator_factory_parent_class)->finalize (obj); -#line 325 "ShotwellAuthenticatorFactory.c" +#line 372 "ShotwellAuthenticatorFactory.c" } diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala index 17980e6..0d813ac 100644 --- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala +++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala @@ -16,6 +16,7 @@ namespace Publishing.Authenticator { list.add("facebook"); list.add("picasa"); list.add("youtube"); + list.add("tumblr"); return list; } @@ -32,6 +33,8 @@ namespace Publishing.Authenticator { case "youtube": return new Shotwell.Google.Google("https://gdata.youtube.com/", _("You are not currently logged into YouTube.\n\nYou must have already signed up for a Google account and set it up for use with YouTube to continue. You can set up most accounts by using your browser to log into the YouTube site at least once."), host); + case "tumblr": + return new Shotwell.Tumblr.Tumblr(host); default: return null; } diff --git a/plugins/authenticator/shotwell/TumblrAuthenticator.c b/plugins/authenticator/shotwell/TumblrAuthenticator.c new file mode 100644 index 0000000..1ebc0f4 --- /dev/null +++ b/plugins/authenticator/shotwell/TumblrAuthenticator.c @@ -0,0 +1,1393 @@ +/* TumblrAuthenticator.c generated by valac 0.36.6, the Vala compiler + * generated from TumblrAuthenticator.vala, do not modify */ + +/* Copyright 2012 BJA Electronics + * Copyright 2017 Jens Georg + * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) + * Author: Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include "shotwell-plugin-dev-1.0.h" +#include <gtk/gtk.h> +#include <glib/gi18n-lib.h> +#include "shotwell-plugin-common.h" +#include <libsoup/soup.h> + + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE (publishing_authenticator_shotwell_tumblr_authentication_pane_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass)) + +typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane PublishingAuthenticatorShotwellTumblrAuthenticationPane; +typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass; +typedef struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_TYPE_MODE (publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type ()) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL, + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LAST_SIGNAL +}; +static guint publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LAST_SIGNAL] = {0}; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass)) + +typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction; +typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass; +typedef struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR (publishing_authenticator_shotwell_oauth1_authenticator_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_IS_AUTHENTICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_AUTHENTICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1AuthenticatorClass)) + +typedef struct _PublishingAuthenticatorShotwellOAuth1Authenticator PublishingAuthenticatorShotwellOAuth1Authenticator; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass PublishingAuthenticatorShotwellOAuth1AuthenticatorClass; +typedef struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR (publishing_authenticator_shotwell_tumblr_tumblr_get_type ()) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR)) +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblrClass)) + +typedef struct _PublishingAuthenticatorShotwellTumblrTumblr PublishingAuthenticatorShotwellTumblrTumblr; +typedef struct _PublishingAuthenticatorShotwellTumblrTumblrClass PublishingAuthenticatorShotwellTumblrTumblrClass; +typedef struct _PublishingAuthenticatorShotwellTumblrTumblrPrivate PublishingAuthenticatorShotwellTumblrTumblrPrivate; +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) + +struct _PublishingAuthenticatorShotwellTumblrAuthenticationPane { + GObject parent_instance; + PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate * priv; +}; + +struct _PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate { + GtkBox* pane_widget; + GtkBuilder* builder; + GtkEntry* username_entry; + GtkEntry* password_entry; + GtkButton* login_button; +}; + +typedef enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO, + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER +} PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode; + +struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction { + PublishingRESTSupportOAuth1Transaction parent_instance; + PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionPrivate * priv; +}; + +struct _PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass { + PublishingRESTSupportOAuth1TransactionClass parent_class; +}; + +struct _PublishingAuthenticatorShotwellOAuth1Authenticator { + GObject parent_instance; + PublishingAuthenticatorShotwellOAuth1AuthenticatorPrivate * priv; + GHashTable* params; + PublishingRESTSupportOAuth1Session* session; + SpitPublishingPluginHost* host; +}; + +struct _PublishingAuthenticatorShotwellOAuth1AuthenticatorClass { + GObjectClass parent_class; + void (*authenticate) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + gboolean (*can_logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*logout) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); + void (*refresh) (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +}; + +struct _PublishingAuthenticatorShotwellTumblrTumblr { + PublishingAuthenticatorShotwellOAuth1Authenticator parent_instance; + PublishingAuthenticatorShotwellTumblrTumblrPrivate * priv; +}; + +struct _PublishingAuthenticatorShotwellTumblrTumblrClass { + PublishingAuthenticatorShotwellOAuth1AuthenticatorClass parent_class; +}; + + +static gpointer publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = NULL; +static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE; +static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = NULL; +static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE; +static gchar* publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = NULL; +static SpitPublishingDialogPaneIface * publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = NULL; +static gpointer publishing_authenticator_shotwell_tumblr_tumblr_parent_class = NULL; + +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENDPOINT_URL "https://www.tumblr.com/" +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k" +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi" +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" +GType publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) G_GNUC_CONST; +#define PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate)) +enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_DUMMY_PROPERTY +}; +GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) G_GNUC_CONST; +PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); +PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self); +static GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj); +GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY +}; +PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password); +PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password); +GType publishing_authenticator_shotwell_oauth1_authenticator_get_type (void) G_GNUC_CONST; +GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TUMBLR_DUMMY_PROPERTY +}; +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host); +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, SpitPublishingPluginHost* host); +PublishingAuthenticatorShotwellOAuth1Authenticator* publishing_authenticator_shotwell_oauth1_authenticator_construct (GType object_type, const gchar* api_key, const gchar* api_secret, SpitPublishingPluginHost* host); +static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +gboolean publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +gchar* publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode); +static gboolean publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +static void publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +void publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (PublishingAuthenticatorShotwellOAuth1Authenticator* self); +static void publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base); +static void publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password); +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self); +static void publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password); +static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn); +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn, GError* err); +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* response); + + +GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO", "intro"}, {PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER, "PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER", "failed-retry-user"}, {0, NULL, NULL}}; + GType publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id; + publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id = g_enum_register_static ("PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode", values); + g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id); + } + return publishing_authenticator_shotwell_tumblr_authentication_pane_mode_type_id__volatile; +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return self ? g_object_ref (self) : NULL; +#line 221 "TumblrAuthenticator.c" +} + + +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); +#line 228 "TumblrAuthenticator.c" +} + + +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); +#line 235 "TumblrAuthenticator.c" +} + + +static void _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked ((PublishingAuthenticatorShotwellTumblrAuthenticationPane*) self); +#line 242 "TumblrAuthenticator.c" +} + + +PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_construct (GType object_type, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self = NULL; + GtkBox* _tmp0_; + GError * _inner_error_ = NULL; +#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = (PublishingAuthenticatorShotwellTumblrAuthenticationPane*) g_object_new (object_type, NULL); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_object_ref_sink (_tmp0_); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 37 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->pane_widget = _tmp0_; +#line 260 "TumblrAuthenticator.c" + { + GtkBuilder* _tmp1_; + GtkBuilder* _tmp2_; + GtkBuilder* _tmp3_; + GtkWidget* content = NULL; + GtkBuilder* _tmp4_; + GObject* _tmp5_; + GtkWidget* _tmp6_; + GtkLabel* message_label = NULL; + GtkBuilder* _tmp7_; + GObject* _tmp8_; + GtkLabel* _tmp9_; + PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp10_; + GtkBuilder* _tmp17_; + GObject* _tmp18_; + GtkEntry* _tmp19_; + GtkBuilder* _tmp20_; + GObject* _tmp21_; + GtkEntry* _tmp22_; + GtkBuilder* _tmp23_; + GObject* _tmp24_; + GtkButton* _tmp25_; + GtkEntry* _tmp26_; + GtkEntry* _tmp27_; + GtkButton* _tmp28_; + GtkWidget* _tmp29_; + GtkContainer* _tmp30_; + GtkContainer* _tmp31_; + GtkWidget* _tmp32_; + GtkBox* _tmp33_; + GtkWidget* _tmp34_; +#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = gtk_builder_new (); +#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->builder); +#line 40 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->builder = _tmp1_; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = self->priv->builder; +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/tumblr_authentication_pane.ui", &_inner_error_); +#line 41 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 304 "TumblrAuthenticator.c" + goto __catch8_g_error; + } +#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = self->priv->builder; +#line 42 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_builder_connect_signals (_tmp3_, NULL); +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = self->priv->builder; +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = gtk_builder_get_object (_tmp4_, "content"); +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp5_) : NULL); +#line 43 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + content = _tmp6_; +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp7_ = self->priv->builder; +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp8_ = gtk_builder_get_object (_tmp7_, "message_label"); +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); +#line 45 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + message_label = _tmp9_; +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp10_ = mode; +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + switch (_tmp10_) { +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO: +#line 333 "TumblrAuthenticator.c" + { + GtkLabel* _tmp11_; + const gchar* _tmp12_; +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp11_ = message_label; +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp12_ = publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE; +#line 48 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_label_set_text (_tmp11_, _tmp12_); +#line 49 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + break; +#line 345 "TumblrAuthenticator.c" + } +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + case PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER: +#line 349 "TumblrAuthenticator.c" + { + GtkLabel* _tmp13_; + const gchar* _tmp14_; + gchar* _tmp15_; + gchar* _tmp16_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp13_ = message_label; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp14_ = publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp15_ = g_strdup_printf ("<b>%s</b>\n\n%s", _ ("Invalid User Name or Password"), _tmp14_); +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp16_ = _tmp15_; +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_label_set_markup (_tmp13_, _tmp16_); +#line 52 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp16_); +#line 54 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + break; +#line 369 "TumblrAuthenticator.c" + } + default: +#line 46 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + break; +#line 374 "TumblrAuthenticator.c" + } +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp17_ = self->priv->builder; +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp18_ = gtk_builder_get_object (_tmp17_, "username_entry"); +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp18_) : NULL); +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->username_entry); +#line 57 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->username_entry = _tmp19_; +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp20_ = self->priv->builder; +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp21_ = gtk_builder_get_object (_tmp20_, "password_entry"); +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp21_) : NULL); +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->password_entry); +#line 59 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->password_entry = _tmp22_; +#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp23_ = self->priv->builder; +#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp24_ = gtk_builder_get_object (_tmp23_, "login_button"); +#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_button_get_type ()) ? ((GtkButton*) _tmp24_) : NULL); +#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->login_button); +#line 63 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->login_button = _tmp25_; +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp26_ = self->priv->username_entry; +#line 65 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed_gtk_editable_changed, self, 0); +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp27_ = self->priv->password_entry; +#line 66 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed_gtk_editable_changed, self, 0); +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp28_ = self->priv->login_button; +#line 67 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (_tmp28_, "clicked", (GCallback) _publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked_gtk_button_clicked, self, 0); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp29_ = content; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp30_ = gtk_widget_get_parent (_tmp29_); +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp31_ = _tmp30_; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp32_ = content; +#line 69 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_container_remove (_tmp31_, _tmp32_); +#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp33_ = self->priv->pane_widget; +#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp34_ = content; +#line 70 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_container_get_type (), GtkContainer), _tmp34_); +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (message_label); +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (content); +#line 438 "TumblrAuthenticator.c" + } + goto __finally8; + __catch8_g_error: + { + GError* e = NULL; + GError* _tmp35_; + const gchar* _tmp36_; +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + e = _inner_error_; +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _inner_error_ = NULL; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp35_ = e; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp36_ = _tmp35_->message; +#line 72 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_warning (_ ("Could not load UI: %s"), _tmp36_); +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_error_free0 (e); +#line 458 "TumblrAuthenticator.c" + } + __finally8: +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_clear_error (&_inner_error_); +#line 39 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return NULL; +#line 469 "TumblrAuthenticator.c" + } +#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return self; +#line 473 "TumblrAuthenticator.c" +} + + +PublishingAuthenticatorShotwellTumblrAuthenticationPane* publishing_authenticator_shotwell_tumblr_authentication_pane_new (PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) { +#line 36 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return publishing_authenticator_shotwell_tumblr_authentication_pane_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, mode); +#line 480 "TumblrAuthenticator.c" +} + + +GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) { + GtkWidget* result = NULL; + GtkButton* _tmp0_; + GtkWidget* _tmp1_; +#line 76 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_val_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self), NULL); +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = self->priv->login_button; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + result = _tmp1_; +#line 77 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return result; +#line 498 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_login_button_clicked (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) { + GtkEntry* _tmp0_; + const gchar* _tmp1_; + GtkEntry* _tmp2_; + const gchar* _tmp3_; +#line 80 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = self->priv->username_entry; +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = gtk_entry_get_text (_tmp0_); +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = self->priv->password_entry; +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = gtk_entry_get_text (_tmp2_); +#line 81 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_emit (self, publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL], 0, _tmp1_, _tmp3_); +#line 519 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_user_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) { +#line 86 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); +#line 87 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); +#line 528 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_on_password_changed (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) { +#line 90 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); +#line 91 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); +#line 537 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (PublishingAuthenticatorShotwellTumblrAuthenticationPane* self) { + gboolean _tmp0_ = FALSE; + GtkEntry* _tmp1_; + guint _tmp2_; + guint _tmp3_; + GtkButton* _tmp7_; +#line 94 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_AUTHENTICATION_PANE (self)); +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = self->priv->username_entry; +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = gtk_entry_get_text_length (_tmp1_); +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = _tmp2_; +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (_tmp3_ > ((guint) 0)) { +#line 557 "TumblrAuthenticator.c" + GtkEntry* _tmp4_; + guint _tmp5_; + guint _tmp6_; +#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = self->priv->password_entry; +#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = gtk_entry_get_text_length (_tmp4_); +#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = _tmp5_; +#line 96 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = _tmp6_ > ((guint) 0); +#line 569 "TumblrAuthenticator.c" + } else { +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = FALSE; +#line 573 "TumblrAuthenticator.c" + } +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp7_ = self->priv->login_button; +#line 95 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), _tmp0_); +#line 579 "TumblrAuthenticator.c" +} + + +static GtkWidget* publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_; + GtkWidget* _tmp1_; +#line 99 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); +#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = self->priv->pane_widget; +#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + result = _tmp1_; +#line 100 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return result; +#line 598 "TumblrAuthenticator.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 103 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); +#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 104 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return result; +#line 611 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; + GtkEntry* _tmp0_; + GtkEntry* _tmp1_; + GtkButton* _tmp2_; +#line 107 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); +#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = self->priv->username_entry; +#line 108 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = self->priv->password_entry; +#line 109 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_entry_set_activates_default (_tmp1_, TRUE); +#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = self->priv->login_button; +#line 110 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 111 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_update_login_button_sensitivity (self); +#line 636 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; +#line 114 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); +#line 644 "TumblrAuthenticator.c" +} + + +static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2); + register GMarshalFunc_VOID__STRING_STRING callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (n_param_values == 3); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + data1 = closure->data; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + data2 = param_values->data[0].v_pointer; +#line 663 "TumblrAuthenticator.c" + } else { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + data1 = param_values->data[0].v_pointer; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + data2 = closure->data; +#line 669 "TumblrAuthenticator.c" + } +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2); +#line 675 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_class_init (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass * klass) { + gchar* _tmp0_; + gchar* _tmp1_; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class = g_type_class_peek_parent (klass); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_type_class_add_private (klass, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPanePrivate)); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_authenticator_shotwell_tumblr_authentication_pane_finalize; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_signals[PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_LOGIN_SIGNAL] = g_signal_new ("login", PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = g_strdup (_ ("Enter the username and password associated with your Tumblr account.")); +#line 25 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_INTRO_MESSAGE = _tmp0_; +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = g_strdup (_ ("Username and/or password invalid. Please try again")); +#line 26 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_FAILED_RETRY_USER_MESSAGE = _tmp1_; +#line 698 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_widget; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_get_preferred_geometry; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_installed; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_authenticator_shotwell_tumblr_authentication_pane_real_on_pane_uninstalled; +#line 713 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init (PublishingAuthenticatorShotwellTumblrAuthenticationPane * self) { +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv = PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_GET_PRIVATE (self); +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self->priv->pane_widget = NULL; +#line 722 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_authentication_pane_finalize (GObject * obj) { + PublishingAuthenticatorShotwellTumblrAuthenticationPane * self; +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_AUTHENTICATION_PANE, PublishingAuthenticatorShotwellTumblrAuthenticationPane); +#line 28 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 29 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->builder); +#line 30 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->username_entry); +#line 31 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->password_entry); +#line 32 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (self->priv->login_button); +#line 20 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + G_OBJECT_CLASS (publishing_authenticator_shotwell_tumblr_authentication_pane_parent_class)->finalize (obj); +#line 742 "TumblrAuthenticator.c" +} + + +/** + * The authentication pane used when asking service URL, user name and password + * from the user. + */ +GType publishing_authenticator_shotwell_tumblr_authentication_pane_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAuthenticationPane), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_authenticator_shotwell_tumblr_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_authenticator_shotwell_tumblr_authentication_pane_type_id; + publishing_authenticator_shotwell_tumblr_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingAuthenticatorShotwellTumblrAuthenticationPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_authenticator_shotwell_tumblr_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile, publishing_authenticator_shotwell_tumblr_authentication_pane_type_id); + } + return publishing_authenticator_shotwell_tumblr_authentication_pane_type_id__volatile; +} + + +PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password) { + PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* self = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + const gchar* _tmp4_; +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_val_if_fail (username != NULL, NULL); +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_val_if_fail (password != NULL, NULL); +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = session; +#line 120 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://www.tumblr.com/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = username; +#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = soup_uri_encode (_tmp1_, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_ENCODE_RFC_3986_EXTRA); +#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = _tmp2_; +#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_username", _tmp3_); +#line 122 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp3_); +#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = password; +#line 123 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_password", _tmp4_); +#line 124 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_mode", "client_auth"); +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return self; +#line 799 "TumblrAuthenticator.c" +} + + +PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session, const gchar* username, const gchar* password) { +#line 119 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, username, password); +#line 806 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass * klass) { +#line 118 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); +#line 813 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction * self) { +} + + +GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_instance_init, NULL }; + GType publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id; + publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile, publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id); + } + return publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_type_id__volatile; +} + + +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_construct (GType object_type, SpitPublishingPluginHost* host) { + PublishingAuthenticatorShotwellTumblrTumblr * self = NULL; + SpitPublishingPluginHost* _tmp0_; +#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = host; +#line 130 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = (PublishingAuthenticatorShotwellTumblrTumblr*) publishing_authenticator_shotwell_oauth1_authenticator_construct (object_type, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_KEY, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_API_SECRET, _tmp0_); +#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return self; +#line 844 "TumblrAuthenticator.c" +} + + +PublishingAuthenticatorShotwellTumblrTumblr* publishing_authenticator_shotwell_tumblr_tumblr_new (SpitPublishingPluginHost* host) { +#line 129 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return publishing_authenticator_shotwell_tumblr_tumblr_construct (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, host); +#line 851 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { + PublishingAuthenticatorShotwellTumblrTumblr * self; + gboolean _tmp0_; +#line 133 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); +#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = publishing_authenticator_shotwell_oauth1_authenticator_is_persistent_session_valid (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 134 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (_tmp0_) { +#line 864 "TumblrAuthenticator.c" + PublishingRESTSupportOAuth1Session* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; +#line 135 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:135: attempt start: a persistent session is a" \ +"vailable; using it"); +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = _tmp2_; +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = publishing_authenticator_shotwell_oauth1_authenticator_get_persistent_access_phase_token_secret (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = _tmp4_; +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, ""); +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp5_); +#line 137 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp3_); +#line 888 "TumblrAuthenticator.c" + } else { +#line 140 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:140: attempt start: no persistent session ava" \ +"ilable; showing login welcome pane"); +#line 142 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_AUTHENTICATION_PANE_MODE_INTRO); +#line 894 "TumblrAuthenticator.c" + } +} + + +static gboolean publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { + PublishingAuthenticatorShotwellTumblrTumblr * self; + gboolean result = FALSE; +#line 146 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); +#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + result = TRUE; +#line 147 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return result; +#line 908 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_real_logout (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { + PublishingAuthenticatorShotwellTumblrTumblr * self; + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 150 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); +#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 151 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_oauth1_session_deauthenticate (_tmp0_); +#line 152 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_oauth1_authenticator_invalidate_persistent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)); +#line 923 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_real_refresh (PublishingAuthenticatorShotwellOAuth1Authenticator* base) { + PublishingAuthenticatorShotwellTumblrTumblr * self; +#line 155 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_TYPE_TUMBLR, PublishingAuthenticatorShotwellTumblrTumblr); +#line 931 "TumblrAuthenticator.c" +} + + +/** + * Action that shows the authentication pane. + * + * This action method shows the authentication pane. It is shown at the + * very beginning of the interaction when no persistent parameters are found + * or after a failed login attempt using persisted parameters. It can be + * given a mode flag to specify whether it should be displayed in initial + * mode or in any of the error modes that it supports. + * + * @param mode the mode for the authentication pane + */ +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login (PublishingAuthenticatorShotwellTumblrAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self) { +#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked ((PublishingAuthenticatorShotwellTumblrTumblr*) self, user, password); +#line 949 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_do_show_authentication_pane (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode mode) { + SpitPublishingPluginHost* _tmp0_; + PublishingAuthenticatorShotwellTumblrAuthenticationPane* authentication_pane = NULL; + PublishingAuthenticatorShotwellTumblrAuthenticationPaneMode _tmp1_; + PublishingAuthenticatorShotwellTumblrAuthenticationPane* _tmp2_; + SpitPublishingPluginHost* _tmp3_; + SpitPublishingPluginHost* _tmp4_; + GtkWidget* _tmp5_; + GtkWidget* _tmp6_; +#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 171 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:171: ACTION: installing authentication pane"); +#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 173 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = mode; +#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = publishing_authenticator_shotwell_tumblr_authentication_pane_new (_tmp1_); +#line 174 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + authentication_pane = _tmp2_; +#line 175 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (authentication_pane, "login", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked_publishing_authenticator_shotwell_tumblr_authentication_pane_login, self, 0); +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 176 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (authentication_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = publishing_authenticator_shotwell_tumblr_authentication_pane_get_default_widget (authentication_pane); +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = _tmp5_; +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_set_dialog_default_widget (_tmp4_, _tmp6_); +#line 177 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (_tmp6_); +#line 170 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_object_unref0 (authentication_pane); +#line 994 "TumblrAuthenticator.c" +} + + +/** + * Event triggered when the login button in the authentication panel is + * clicked. + * + * This event is triggered when the login button in the authentication + * panel is clicked. It then triggers a network login interaction. + * + * @param username the name of the Tumblr user as entered in the dialog + * @param password the password of the Tumblr as entered in the dialog + */ +static void publishing_authenticator_shotwell_tumblr_tumblr_on_authentication_pane_login_clicked (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password) { + const gchar* _tmp0_; + const gchar* _tmp1_; +#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (username != NULL); +#line 190 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (password != NULL); +#line 191 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:191: EVENT: on_authentication_pane_login_clic" \ +"ked"); +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = username; +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = password; +#line 193 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (self, _tmp0_, _tmp1_); +#line 1025 "TumblrAuthenticator.c" +} + + +/** + * Action to perform a network login to a Tumblr blog. + * + * This action performs a network login a Tumblr blog specified the given user name and password as credentials. + * + * @param username the name of the Tumblr user used to login + * @param password the password of the Tumblr user used to login + */ +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender); +#line 1040 "TumblrAuthenticator.c" +} + + +static void _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error ((PublishingAuthenticatorShotwellTumblrTumblr*) self, _sender, err); +#line 1047 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_do_network_login (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* username, const gchar* password) { + SpitPublishingPluginHost* _tmp0_; + SpitPublishingPluginHost* _tmp1_; + PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* txn = NULL; + PublishingRESTSupportOAuth1Session* _tmp2_; + const gchar* _tmp3_; + const gchar* _tmp4_; + PublishingAuthenticatorShotwellTumblrAccessTokenFetchTransaction* _tmp5_; + GError * _inner_error_ = NULL; +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (username != NULL); +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (password != NULL); +#line 205 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:205: ACTION: logging in"); +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 206 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 207 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_install_login_wait_pane (_tmp1_); +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = username; +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = password; +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = publishing_authenticator_shotwell_tumblr_access_token_fetch_transaction_new (_tmp2_, _tmp3_, _tmp4_); +#line 209 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + txn = _tmp5_; +#line 210 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); +#line 211 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); +#line 1090 "TumblrAuthenticator.c" + { +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 1098 "TumblrAuthenticator.c" + goto __catch9_spit_publishing_publishing_error; + } +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_clear_error (&_inner_error_); +#line 214 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return; +#line 1109 "TumblrAuthenticator.c" + } + } + goto __finally9; + __catch9_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp6_; + GError* _tmp7_; +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + err = _inner_error_; +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _inner_error_ = NULL; +#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp7_ = err; +#line 216 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_); +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_error_free0 (err); +#line 1130 "TumblrAuthenticator.c" + } + __finally9: +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_clear_error (&_inner_error_); +#line 213 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + return; +#line 1143 "TumblrAuthenticator.c" + } +#line 204 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 1147 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_; + guint _tmp1_; + PublishingRESTSupportTransaction* _tmp2_; + guint _tmp3_; + PublishingRESTSupportTransaction* _tmp4_; + gchar* _tmp5_; + gchar* _tmp6_; + PublishingRESTSupportTransaction* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; +#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 220 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = txn; +#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 221 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = txn; +#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 222 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = txn; +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = _tmp5_; +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:224: EVENT: OAuth authentication request tran" \ +"saction completed; response = '%s'", _tmp6_); +#line 224 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp6_); +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp7_ = txn; +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp8_ = publishing_rest_support_transaction_get_response (_tmp7_); +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp9_ = _tmp8_; +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (self, _tmp9_); +#line 227 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (_tmp9_); +#line 1198 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error (PublishingAuthenticatorShotwellTumblrTumblr* self, PublishingRESTSupportTransaction* txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_; + guint _tmp1_; + PublishingRESTSupportTransaction* _tmp2_; + guint _tmp3_; + SpitPublishingPluginHost* _tmp4_; + GError* _tmp5_; +#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 230 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = txn; +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 232 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = txn; +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 233 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_authenticator_shotwell_tumblr_tumblr_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 235 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:235: EVENT: OAuth authentication request tran" \ +"saction caused a network error"); +#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = err; +#line 236 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); +#line 1233 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_do_parse_token_info_from_auth_request (PublishingAuthenticatorShotwellTumblrTumblr* self, const gchar* response) { + const gchar* _tmp0_; + gchar* token = NULL; + gchar* token_secret = NULL; + GHashTable* data = NULL; + const gchar* _tmp1_; + GHashTable* _tmp2_; + GHashTable* _tmp3_; + gconstpointer _tmp4_ = NULL; + gchar* _tmp5_; + GHashTable* _tmp6_; + gconstpointer _tmp7_ = NULL; + gchar* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; + gboolean _tmp11_ = FALSE; + const gchar* _tmp12_; +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (PUBLISHING_AUTHENTICATOR_SHOTWELL_TUMBLR_IS_TUMBLR (self)); +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_return_if_fail (response != NULL); +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp0_ = response; +#line 240 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:240: ACTION: extracting access phase credenti" \ +"als from '%s'", _tmp0_); +#line 242 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + token = NULL; +#line 243 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + token_secret = NULL; +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp1_ = response; +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp2_ = soup_form_decode (_tmp1_); +#line 245 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + data = _tmp2_; +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp3_ = data; +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_hash_table_lookup_extended (_tmp3_, "oauth_token", NULL, &_tmp4_); +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (token); +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 246 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + token = _tmp5_; +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp6_ = data; +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_hash_table_lookup_extended (_tmp6_, "oauth_token_secret", NULL, &_tmp7_); +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (token_secret); +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp8_ = g_strdup (_tmp7_); +#line 247 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + token_secret = _tmp8_; +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp9_ = token; +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp10_ = token_secret; +#line 249 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_debug ("TumblrAuthenticator.vala:249: access phase credentials: { token = '%s'" \ +"; token_secret = '%s' }", _tmp9_, _tmp10_); +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp12_ = token; +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (_tmp12_ == NULL) { +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp11_ = TRUE; +#line 1304 "TumblrAuthenticator.c" + } else { + const gchar* _tmp13_; +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp13_ = token_secret; +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp11_ = _tmp13_ == NULL; +#line 1311 "TumblrAuthenticator.c" + } +#line 252 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + if (_tmp11_) { +#line 1315 "TumblrAuthenticator.c" + SpitPublishingPluginHost* _tmp14_; + GError* _tmp15_; + GError* _tmp16_; +#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp14_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->host; +#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp15_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Expected " "access phase credentials to contain token and token secret but at " "least one of these is absent"); +#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp16_ = _tmp15_; +#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + spit_publishing_plugin_host_post_error (_tmp14_, _tmp16_); +#line 253 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_error_free0 (_tmp16_); +#line 256 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_AUTHENTICATOR, SpitPublishingAuthenticator), "authentication-failed"); +#line 1331 "TumblrAuthenticator.c" + } else { + PublishingRESTSupportOAuth1Session* _tmp17_; + const gchar* _tmp18_; + const gchar* _tmp19_; +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, PublishingAuthenticatorShotwellOAuth1Authenticator)->session; +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp18_ = token; +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _tmp19_ = token_secret; +#line 258 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp17_, _tmp18_, _tmp19_, ""); +#line 1344 "TumblrAuthenticator.c" + } +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_hash_table_unref0 (data); +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (token_secret); +#line 239 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + _g_free0 (token); +#line 1352 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_class_init (PublishingAuthenticatorShotwellTumblrTumblrClass * klass) { +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + publishing_authenticator_shotwell_tumblr_tumblr_parent_class = g_type_class_peek_parent (klass); +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->authenticate = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_authenticate; +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->can_logout = (gboolean (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_can_logout; +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->logout = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_logout; +#line 128 "/home/jens/Source/shotwell/plugins/authenticator/shotwell/TumblrAuthenticator.vala" + ((PublishingAuthenticatorShotwellOAuth1AuthenticatorClass *) klass)->refresh = (void (*) (PublishingAuthenticatorShotwellOAuth1Authenticator *)) publishing_authenticator_shotwell_tumblr_tumblr_real_refresh; +#line 1367 "TumblrAuthenticator.c" +} + + +static void publishing_authenticator_shotwell_tumblr_tumblr_instance_init (PublishingAuthenticatorShotwellTumblrTumblr * self) { +} + + +GType publishing_authenticator_shotwell_tumblr_tumblr_get_type (void) { + static volatile gsize publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile = 0; + if (g_once_init_enter (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingAuthenticatorShotwellTumblrTumblrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingAuthenticatorShotwellTumblrTumblr), 0, (GInstanceInitFunc) publishing_authenticator_shotwell_tumblr_tumblr_instance_init, NULL }; + GType publishing_authenticator_shotwell_tumblr_tumblr_type_id; + publishing_authenticator_shotwell_tumblr_tumblr_type_id = g_type_register_static (PUBLISHING_AUTHENTICATOR_SHOTWELL_OAUTH1_TYPE_AUTHENTICATOR, "PublishingAuthenticatorShotwellTumblrTumblr", &g_define_type_info, 0); + g_once_init_leave (&publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile, publishing_authenticator_shotwell_tumblr_tumblr_type_id); + } + return publishing_authenticator_shotwell_tumblr_tumblr_type_id__volatile; +} + + + diff --git a/plugins/authenticator/shotwell/TumblrAuthenticator.vala b/plugins/authenticator/shotwell/TumblrAuthenticator.vala new file mode 100644 index 0000000..35fdce9 --- /dev/null +++ b/plugins/authenticator/shotwell/TumblrAuthenticator.vala @@ -0,0 +1,262 @@ +/* Copyright 2012 BJA Electronics + * Copyright 2017 Jens Georg + * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) + * Author: Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +namespace Publishing.Authenticator.Shotwell.Tumblr { + internal const string ENDPOINT_URL = "https://www.tumblr.com/"; + internal const string API_KEY = "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k"; + internal const string API_SECRET = "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi"; + internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; + + /** + * The authentication pane used when asking service URL, user name and password + * from the user. + */ + internal class AuthenticationPane : Spit.Publishing.DialogPane, Object { + public enum Mode { + INTRO, + FAILED_RETRY_USER + } + private static string INTRO_MESSAGE = _("Enter the username and password associated with your Tumblr account."); + private static string FAILED_RETRY_USER_MESSAGE = _("Username and/or password invalid. Please try again"); + + private Gtk.Box pane_widget = null; + private Gtk.Builder builder; + private Gtk.Entry username_entry; + private Gtk.Entry password_entry; + private Gtk.Button login_button; + + public signal void login(string user, string password); + + public AuthenticationPane(Mode mode = Mode.INTRO) { + this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); + + try { + builder = new Gtk.Builder(); + builder.add_from_resource (Resources.RESOURCE_PATH + "/tumblr_authentication_pane.ui"); + builder.connect_signals(null); + var content = builder.get_object ("content") as Gtk.Widget; + + Gtk.Label message_label = builder.get_object("message_label") as Gtk.Label; + switch (mode) { + case Mode.INTRO: + message_label.set_text(INTRO_MESSAGE); + break; + + case Mode.FAILED_RETRY_USER: + message_label.set_markup("<b>%s</b>\n\n%s".printf(_( + "Invalid User Name or Password"), FAILED_RETRY_USER_MESSAGE)); + break; + } + + username_entry = builder.get_object ("username_entry") as Gtk.Entry; + + password_entry = builder.get_object ("password_entry") as Gtk.Entry; + + + + login_button = builder.get_object("login_button") as Gtk.Button; + + username_entry.changed.connect(on_user_changed); + password_entry.changed.connect(on_password_changed); + login_button.clicked.connect(on_login_button_clicked); + + content.parent.remove (content); + pane_widget.add (content); + } catch (Error e) { + warning(_("Could not load UI: %s"), e.message); + } + } + + public Gtk.Widget get_default_widget() { + return login_button; + } + + private void on_login_button_clicked() { + login(username_entry.get_text(), + password_entry.get_text()); + } + + + private void on_user_changed() { + update_login_button_sensitivity(); + } + + private void on_password_changed() { + update_login_button_sensitivity(); + } + + private void update_login_button_sensitivity() { + login_button.set_sensitive(username_entry.text_length > 0 && + password_entry.text_length > 0); + } + + public Gtk.Widget get_widget() { + return pane_widget; + } + + public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() { + return Spit.Publishing.DialogPane.GeometryOptions.NONE; + } + + public void on_pane_installed() { + username_entry.grab_focus(); + password_entry.set_activates_default(true); + login_button.can_default = true; + update_login_button_sensitivity(); + } + + public void on_pane_uninstalled() { + } + } + + internal class AccessTokenFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction { + public AccessTokenFetchTransaction(Publishing.RESTSupport.OAuth1.Session session, string username, string password) { + base.with_uri(session, "https://www.tumblr.com/oauth/access_token", + Publishing.RESTSupport.HttpMethod.POST); + add_argument("x_auth_username", Soup.URI.encode(username, ENCODE_RFC_3986_EXTRA)); + add_argument("x_auth_password", password); + add_argument("x_auth_mode", "client_auth"); + } + } + + internal class Tumblr : Publishing.Authenticator.Shotwell.OAuth1.Authenticator { + public Tumblr(Spit.Publishing.PluginHost host) { + base(API_KEY, API_SECRET, host); + } + + public override void authenticate() { + if (is_persistent_session_valid()) { + debug("attempt start: a persistent session is available; using it"); + + session.authenticate_from_persistent_credentials(get_persistent_access_phase_token(), + get_persistent_access_phase_token_secret(), ""); + } else { + debug("attempt start: no persistent session available; showing login welcome pane"); + + do_show_authentication_pane(); + } + } + + public override bool can_logout() { + return true; + } + + public override void logout() { + this.session.deauthenticate(); + invalidate_persistent_session(); + } + + public override void refresh() { + // No-op with Tumblr + } + + /** + * Action that shows the authentication pane. + * + * This action method shows the authentication pane. It is shown at the + * very beginning of the interaction when no persistent parameters are found + * or after a failed login attempt using persisted parameters. It can be + * given a mode flag to specify whether it should be displayed in initial + * mode or in any of the error modes that it supports. + * + * @param mode the mode for the authentication pane + */ + private void do_show_authentication_pane(AuthenticationPane.Mode mode = AuthenticationPane.Mode.INTRO) { + debug("ACTION: installing authentication pane"); + + host.set_service_locked(false); + AuthenticationPane authentication_pane = new AuthenticationPane(mode); + authentication_pane.login.connect(on_authentication_pane_login_clicked); + host.install_dialog_pane(authentication_pane, Spit.Publishing.PluginHost.ButtonMode.CLOSE); + host.set_dialog_default_widget(authentication_pane.get_default_widget()); + } + + /** + * Event triggered when the login button in the authentication panel is + * clicked. + * + * This event is triggered when the login button in the authentication + * panel is clicked. It then triggers a network login interaction. + * + * @param username the name of the Tumblr user as entered in the dialog + * @param password the password of the Tumblr as entered in the dialog + */ + private void on_authentication_pane_login_clicked( string username, string password ) { + debug("EVENT: on_authentication_pane_login_clicked"); + + do_network_login(username, password); + } + + /** + * Action to perform a network login to a Tumblr blog. + * + * This action performs a network login a Tumblr blog specified the given user name and password as credentials. + * + * @param username the name of the Tumblr user used to login + * @param password the password of the Tumblr user used to login + */ + private void do_network_login(string username, string password) { + debug("ACTION: logging in"); + host.set_service_locked(true); + host.install_login_wait_pane(); + + AccessTokenFetchTransaction txn = new AccessTokenFetchTransaction(session,username,password); + txn.completed.connect(on_auth_request_txn_completed); + txn.network_error.connect(on_auth_request_txn_error); + + try { + txn.execute(); + } catch (Spit.Publishing.PublishingError err) { + host.post_error(err); + } + } + + private void on_auth_request_txn_completed(Publishing.RESTSupport.Transaction txn) { + txn.completed.disconnect(on_auth_request_txn_completed); + txn.network_error.disconnect(on_auth_request_txn_error); + + debug("EVENT: OAuth authentication request transaction completed; response = '%s'", + txn.get_response()); + + do_parse_token_info_from_auth_request(txn.get_response()); + } + + private void on_auth_request_txn_error(Publishing.RESTSupport.Transaction txn, + Spit.Publishing.PublishingError err) { + txn.completed.disconnect(on_auth_request_txn_completed); + txn.network_error.disconnect(on_auth_request_txn_error); + + debug("EVENT: OAuth authentication request transaction caused a network error"); + host.post_error(err); + } + + private void do_parse_token_info_from_auth_request(string response) { + debug("ACTION: extracting access phase credentials from '%s'", response); + + string? token = null; + string? token_secret = null; + + var data = Soup.Form.decode(response); + data.lookup_extended("oauth_token", null, out token); + data.lookup_extended("oauth_token_secret", null, out token_secret); + + debug("access phase credentials: { token = '%s'; token_secret = '%s' }", + token, token_secret); + + if (token == null || token_secret == null) { + host.post_error(new Spit.Publishing.PublishingError.MALFORMED_RESPONSE("Expected " + + "access phase credentials to contain token and token secret but at " + + "least one of these is absent")); + this.authentication_failed(); + } else { + session.set_access_phase_credentials(token, token_secret, ""); + } + } + } +} diff --git a/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui b/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui deleted file mode 100644 index dd4c35c..0000000 --- a/plugins/authenticator/shotwell/flickr_pin_entry_pane.ui +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> -<interface domain="shotwell"> - <requires lib="gtk+" version="3.14"/> - <object class="GtkBox" id="pane_widget"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel" id="explanatory_text"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">16</property> - <property name="margin_right">16</property> - <property name="margin_top">48</property> - <property name="margin_bottom">16</property> - <property name="label" translatable="yes">Enter the confirmation number which appears after you log into Flickr in your Web browser.</property> - <property name="angle">0.0099999997764825821</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="box2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="margin_bottom">80</property> - <child> - <object class="GtkLabel" id="pin_entry_caption"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">end</property> - <property name="label" translatable="yes">Authorization _Number:</property> - <property name="use_underline">True</property> - <property name="justify">right</property> - <property name="mnemonic_widget">pin_entry</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="pin_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="margin_left">8</property> - <property name="invisible_char">●</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="continue_button"> - <property name="label" translatable="yes">Con_tinue</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="margin_left">240</property> - <property name="margin_right">240</property> - <property name="margin_bottom">160</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">end</property> - <property name="position">2</property> - </packing> - </child> - <child> - <placeholder/> - </child> - </object> -</interface> diff --git a/plugins/authenticator/shotwell/meson.build b/plugins/authenticator/shotwell/meson.build new file mode 100644 index 0000000..4404242 --- /dev/null +++ b/plugins/authenticator/shotwell/meson.build @@ -0,0 +1,28 @@ +authenticator_shotwell_sources = [ + 'ShotwellAuthenticatorFactory.vala', + 'FacebookPublishingAuthenticator.vala', + 'FlickrPublishingAuthenticator.vala', + 'GoogleAuthenticator.vala', + 'OAuth1Authenticator.vala', + 'TumblrAuthenticator.vala' + ] + +authenticator_shotwell_resources = gnome.compile_resources('authenticator-resource', + 'org.gnome.Shotwell.Authenticator.gresource.xml', + source_dir : meson.source_root()) + +authenticator_shotwell_deps = [gee, gtk, gio, soup, json_glib, sw_plugin, + sw_plugin_common_dep, json_glib, xml, webkit] + +authenticator = library('shotwell-authenticator', + authenticator_shotwell_sources + authenticator_shotwell_resources, + dependencies : authenticator_shotwell_deps, + include_directories : config_incdir, + version: meson.project_version(), + vala_args : ['--gresources', + 'org.gnome.Shotwell.Authenticator.gresource.xml'], + c_args : + '-DPLUGIN_RESOURCE_PATH="/org/gnome/Shotwell/Authenticator"', + install: true) +authenticator_dep = declare_dependency(include_directories : include_directories('.'), + link_with : authenticator) diff --git a/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml b/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml index c40e700..5f25aab 100644 --- a/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml +++ b/plugins/authenticator/shotwell/org.gnome.Shotwell.Authenticator.gresource.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <gresources> <gresource prefix="/org/gnome/Shotwell/Authenticator"> - <file>flickr_pin_entry_pane.ui</file> + <file>tumblr_authentication_pane.ui</file> </gresource> </gresources> diff --git a/plugins/shotwell-publishing-extras/tumblr_authentication_pane.ui b/plugins/authenticator/shotwell/tumblr_authentication_pane.ui index 24a647f..24a647f 100644 --- a/plugins/shotwell-publishing-extras/tumblr_authentication_pane.ui +++ b/plugins/authenticator/shotwell/tumblr_authentication_pane.ui diff --git a/plugins/common/OAuth1Support.c b/plugins/common/OAuth1Support.c new file mode 100644 index 0000000..afa6905 --- /dev/null +++ b/plugins/common/OAuth1Support.c @@ -0,0 +1,1838 @@ +/* OAuth1Support.c generated by valac 0.36.6, the Vala compiler + * generated from OAuth1Support.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * Copyright 2017 Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <libsoup/soup.h> +#include "shotwell-plugin-dev-1.0.h" +#include <gee.h> + + +#define PUBLISHING_REST_SUPPORT_TYPE_SESSION (publishing_rest_support_session_get_type ()) +#define PUBLISHING_REST_SUPPORT_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)) +#define PUBLISHING_REST_SUPPORT_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSessionClass)) +#define PUBLISHING_REST_SUPPORT_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSessionClass)) + +typedef struct _PublishingRESTSupportSession PublishingRESTSupportSession; +typedef struct _PublishingRESTSupportSessionClass PublishingRESTSupportSessionClass; +typedef struct _PublishingRESTSupportSessionPrivate PublishingRESTSupportSessionPrivate; + +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION (publishing_rest_support_oauth1_session_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1SessionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1SessionClass)) + +typedef struct _PublishingRESTSupportOAuth1Session PublishingRESTSupportOAuth1Session; +typedef struct _PublishingRESTSupportOAuth1SessionClass PublishingRESTSupportOAuth1SessionClass; +typedef struct _PublishingRESTSupportOAuth1SessionPrivate PublishingRESTSupportOAuth1SessionPrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION (publishing_rest_support_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)) +#define PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransactionClass)) +#define PUBLISHING_REST_SUPPORT_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransactionClass)) + +typedef struct _PublishingRESTSupportTransaction PublishingRESTSupportTransaction; +typedef struct _PublishingRESTSupportTransactionClass PublishingRESTSupportTransactionClass; + +#define PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT (publishing_rest_support_argument_get_type ()) +#define PUBLISHING_REST_SUPPORT_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgument)) +#define PUBLISHING_REST_SUPPORT_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgumentClass)) +#define PUBLISHING_REST_SUPPORT_IS_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT)) +#define PUBLISHING_REST_SUPPORT_IS_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT)) +#define PUBLISHING_REST_SUPPORT_ARGUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, PublishingRESTSupportArgumentClass)) + +typedef struct _PublishingRESTSupportArgument PublishingRESTSupportArgument; +typedef struct _PublishingRESTSupportArgumentClass PublishingRESTSupportArgumentClass; + +#define PUBLISHING_REST_SUPPORT_TYPE_HTTP_METHOD (publishing_rest_support_http_method_get_type ()) +#define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL))) +typedef struct _PublishingRESTSupportTransactionPrivate PublishingRESTSupportTransactionPrivate; + +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION (publishing_rest_support_oauth1_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1Transaction)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1TransactionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1TransactionClass)) + +typedef struct _PublishingRESTSupportOAuth1Transaction PublishingRESTSupportOAuth1Transaction; +typedef struct _PublishingRESTSupportOAuth1TransactionClass PublishingRESTSupportOAuth1TransactionClass; +typedef struct _PublishingRESTSupportOAuth1TransactionPrivate PublishingRESTSupportOAuth1TransactionPrivate; +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) + +#define PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION (publishing_rest_support_upload_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)) +#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransactionClass)) +#define PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransactionClass)) + +typedef struct _PublishingRESTSupportUploadTransaction PublishingRESTSupportUploadTransaction; +typedef struct _PublishingRESTSupportUploadTransactionClass PublishingRESTSupportUploadTransactionClass; +typedef struct _PublishingRESTSupportUploadTransactionPrivate PublishingRESTSupportUploadTransactionPrivate; + +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION (publishing_rest_support_oauth1_upload_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransactionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransactionClass)) + +typedef struct _PublishingRESTSupportOAuth1UploadTransaction PublishingRESTSupportOAuth1UploadTransaction; +typedef struct _PublishingRESTSupportOAuth1UploadTransactionClass PublishingRESTSupportOAuth1UploadTransactionClass; +typedef struct _PublishingRESTSupportOAuth1UploadTransactionPrivate PublishingRESTSupportOAuth1UploadTransactionPrivate; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _PublishingRESTSupportSession { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingRESTSupportSessionPrivate * priv; +}; + +struct _PublishingRESTSupportSessionClass { + GTypeClass parent_class; + void (*finalize) (PublishingRESTSupportSession *self); + gboolean (*is_authenticated) (PublishingRESTSupportSession* self); +}; + +struct _PublishingRESTSupportOAuth1Session { + PublishingRESTSupportSession parent_instance; + PublishingRESTSupportOAuth1SessionPrivate * priv; +}; + +struct _PublishingRESTSupportOAuth1SessionClass { + PublishingRESTSupportSessionClass parent_class; +}; + +struct _PublishingRESTSupportOAuth1SessionPrivate { + gchar* request_phase_token; + gchar* request_phase_token_secret; + gchar* access_phase_token; + gchar* access_phase_token_secret; + gchar* username; + gchar* consumer_key; + gchar* consumer_secret; +}; + +typedef enum { + PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, + PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST, + PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT +} PublishingRESTSupportHttpMethod; + +struct _PublishingRESTSupportTransaction { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingRESTSupportTransactionPrivate * priv; +}; + +struct _PublishingRESTSupportTransactionClass { + GTypeClass parent_class; + void (*finalize) (PublishingRESTSupportTransaction *self); + void (*add_header) (PublishingRESTSupportTransaction* self, const gchar* key, const gchar* value); + void (*execute) (PublishingRESTSupportTransaction* self, GError** error); +}; + +struct _PublishingRESTSupportOAuth1Transaction { + PublishingRESTSupportTransaction parent_instance; + PublishingRESTSupportOAuth1TransactionPrivate * priv; +}; + +struct _PublishingRESTSupportOAuth1TransactionClass { + PublishingRESTSupportTransactionClass parent_class; +}; + +struct _PublishingRESTSupportUploadTransaction { + PublishingRESTSupportTransaction parent_instance; + PublishingRESTSupportUploadTransactionPrivate * priv; + GHashTable* binary_disposition_table; + SpitPublishingPublishable* publishable; + gchar* mime_type; + GeeHashMap* message_headers; +}; + +struct _PublishingRESTSupportUploadTransactionClass { + PublishingRESTSupportTransactionClass parent_class; +}; + +struct _PublishingRESTSupportOAuth1UploadTransaction { + PublishingRESTSupportUploadTransaction parent_instance; + PublishingRESTSupportOAuth1UploadTransactionPrivate * priv; + PublishingRESTSupportOAuth1Session* session; +}; + +struct _PublishingRESTSupportOAuth1UploadTransactionClass { + PublishingRESTSupportUploadTransactionClass parent_class; +}; + +struct _PublishingRESTSupportOAuth1UploadTransactionPrivate { + PublishingRESTSupportArgument** auth_header_fields; + gint auth_header_fields_length1; + gint _auth_header_fields_size_; +}; + + +static gpointer publishing_rest_support_oauth1_session_parent_class = NULL; +static gpointer publishing_rest_support_oauth1_transaction_parent_class = NULL; +static gpointer publishing_rest_support_oauth1_upload_transaction_parent_class = NULL; + +#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); +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); +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_deauthenticate (PublishingRESTSupportOAuth1Session* self); +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); +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); +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); +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); +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_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); +gchar* publishing_rest_support_oauth1_session_get_request_phase_token (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_access_phase_token (PublishingRESTSupportOAuth1Session* self); +gboolean publishing_rest_support_oauth1_session_has_access_phase_token (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_access_phase_token_secret (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_username (PublishingRESTSupportOAuth1Session* self); +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); +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); +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); +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); +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); +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) { + 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_); +#line 20 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return self; +#line 303 "OAuth1Support.c" +} + + +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" +} + + +static gboolean publishing_rest_support_oauth1_session_real_is_authenticated (PublishingRESTSupportSession* base) { + PublishingRESTSupportOAuth1Session * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + const gchar* _tmp2_; +#line 24 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); +#line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = self->priv->access_phase_token; +#line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + if (_tmp2_ != NULL) { +#line 326 "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" + } else { +#line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = FALSE; +#line 336 "OAuth1Support.c" + } +#line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + if (_tmp1_) { +#line 340 "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" + } else { +#line 25 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = FALSE; +#line 350 "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" +} + + +void publishing_rest_support_oauth1_session_authenticate_from_persistent_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username) { + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; +#line 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" + g_return_if_fail (token != NULL); +#line 29 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_if_fail (secret != NULL); +#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_); +#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; +#line 32 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = g_strdup (_tmp2_); +#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_; +#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_); +#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_; +#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" +} + + +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" + _g_free0 (self->priv->access_phase_token); +#line 39 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->access_phase_token = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 40 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->access_phase_token_secret = NULL; +#line 41 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->username); +#line 41 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->username = NULL; +#line 420 "OAuth1Support.c" +} + + +void publishing_rest_support_oauth1_session_set_api_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* consumer_key, const gchar* consumer_secret) { + const 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" + g_return_if_fail (consumer_key != NULL); +#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_); +#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_; +#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_); +#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" +} + + +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" +} + + +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 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" +} + + +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* _tmp2_; + const gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; + PublishingRESTSupportArgument** base_string_arguments = NULL; + PublishingRESTSupportTransaction* _tmp6_; + gint _tmp7_; + PublishingRESTSupportArgument** _tmp8_; + gint base_string_arguments_length1; + gint _base_string_arguments_size_; + PublishingRESTSupportArgument** _tmp9_; + gint _tmp9__length1; + PublishingRESTSupportArgument** sorted_args = NULL; + PublishingRESTSupportArgument** _tmp14_; + gint _tmp14__length1; + gint _tmp15_; + PublishingRESTSupportArgument** _tmp16_; + gint sorted_args_length1; + gint _sorted_args_size_; + gchar* arguments_string = NULL; + PublishingRESTSupportArgument** _tmp17_; + gint _tmp17__length1; + gchar* _tmp18_; + gchar* signing_key = NULL; + const gchar* _tmp19_; + gchar* signature_base_string = NULL; + const gchar* _tmp33_; + gchar* _tmp34_; + gchar* _tmp35_; + PublishingRESTSupportTransaction* _tmp36_; + gchar* _tmp37_; + gchar* _tmp38_; + gchar* _tmp39_; + gchar* _tmp40_; + gchar* _tmp41_; + gchar* _tmp42_; + gchar* _tmp43_; + gchar* _tmp44_; + const gchar* _tmp45_; + gchar* _tmp46_; + gchar* _tmp47_; + 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_); +#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_; +#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; +#line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); +#line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp5_ = _tmp4_; +#line 54 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_debug ("OAuth1Support.vala:54: %s", _tmp5_); +#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; +#line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_); +#line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + base_string_arguments = _tmp8_; +#line 56 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + base_string_arguments_length1 = _tmp7_; +#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" + { + 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_; +#line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + arg_collection_length1 = _tmp9__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_; + PublishingRESTSupportArgument* arg = NULL; +#line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp10_ = _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" + { + PublishingRESTSupportArgument** _tmp11_; + gint _tmp11__length1; + PublishingRESTSupportArgument* _tmp12_; + PublishingRESTSupportArgument* _tmp13_; +#line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp11_ = base_string_arguments; +#line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp11__length1 = base_string_arguments_length1; +#line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp12_ = arg; +#line 59 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp13_ = _publishing_rest_support_argument_ref0 (_tmp12_); +#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_); +#line 58 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _publishing_rest_support_argument_unref0 (arg); +#line 609 "OAuth1Support.c" + } + } + } +#line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp14_ = base_string_arguments; +#line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp14__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_); +#line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + sorted_args = _tmp16_; +#line 62 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + sorted_args_length1 = _tmp15_; +#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; +#line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp17__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, "&"); +#line 65 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + arguments_string = _tmp18_; +#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; +#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_; +#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; +#line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp21_ = g_strconcat (_tmp20_, "&", NULL); +#line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp22_ = _tmp21_; +#line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp23_ = self->priv->access_phase_token_secret; +#line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp24_ = g_strconcat (_tmp22_, _tmp23_, 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_; +#line 71 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp22_); +#line 663 "OAuth1Support.c" + } else { + const gchar* _tmp25_; +#line 72 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp25_ = 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_; +#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; +#line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp27_ = g_strconcat (_tmp26_, "&", NULL); +#line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp28_ = _tmp27_; +#line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp29_ = self->priv->request_phase_token_secret; +#line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp30_ = g_strconcat (_tmp28_, _tmp29_, 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_; +#line 75 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp28_); +#line 694 "OAuth1Support.c" + } else { + const gchar* _tmp31_; + gchar* _tmp32_; +#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; +#line 80 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp32_ = g_strconcat (_tmp31_, "&", 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" + } + } +#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); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp35_ = _tmp34_; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp36_ = txn; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp37_ = publishing_rest_support_transaction_get_endpoint_url (_tmp36_); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp38_ = _tmp37_; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp39_ = soup_uri_encode (_tmp38_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp40_ = _tmp39_; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp41_ = g_strconcat (_tmp35_, _tmp40_, NULL); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp42_ = _tmp41_; +#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_; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp45_ = arguments_string; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp46_ = soup_uri_encode (_tmp45_, PUBLISHING_REST_SUPPORT_OAUTH1_ENCODE_RFC_3986_EXTRA); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp47_ = _tmp46_; +#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_; +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp47_); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp44_); +#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_); +#line 83 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp38_); +#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_; +#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; +#line 89 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_debug ("OAuth1Support.vala:89: signing key = '%s'", _tmp50_); +#line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp51_ = signing_key; +#line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp52_ = publishing_rest_support_hmac_sha1 (_tmp51_, signature_base_string); +#line 92 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + signature = _tmp52_; +#line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp53_ = signature; +#line 93 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp54_ = soup_uri_encode (_tmp53_, 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_; +#line 95 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp55_ = signature; +#line 95 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_debug ("OAuth1Support.vala:95: signature = '%s'", _tmp55_); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = signature; +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signature_base_string); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signing_key); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (arguments_string); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (http_method); +#line 97 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 799 "OAuth1Support.c" +} + + +void publishing_rest_support_oauth1_session_set_request_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret) { + const 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" + g_return_if_fail (token != NULL); +#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_); +#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; +#line 102 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = g_strdup (_tmp2_); +#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" +} + + +void publishing_rest_support_oauth1_session_set_access_phase_credentials (PublishingRESTSupportOAuth1Session* self, const gchar* token, const gchar* secret, const gchar* username) { + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; + const gchar* _tmp4_; + gchar* _tmp5_; +#line 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" + g_return_if_fail (token != NULL); +#line 105 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_if_fail (secret != NULL); +#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_); +#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; +#line 107 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = g_strdup (_tmp2_); +#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_; +#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_); +#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_; +#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" +} + + +gchar* publishing_rest_support_oauth1_session_get_oauth_nonce (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + GTimeVal currtime = {0}; + GTimeVal _tmp0_; + glong _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + GTimeVal _tmp4_; + glong _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + gchar* _tmp11_; +#line 113 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); +#line 114 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_get_current_time (&currtime); +#line 115 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_get_current_time (&currtime); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = currtime; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = _tmp0_.tv_sec; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup_printf ("%li", _tmp1_); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = _tmp2_; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp4_ = currtime; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp5_ = _tmp4_.tv_usec; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp6_ = g_strdup_printf ("%li", _tmp5_); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp7_ = _tmp6_; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp9_ = _tmp8_; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp11_ = _tmp10_; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp9_); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp7_); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp3_); +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp11_; +#line 117 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 934 "OAuth1Support.c" +} + + +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* end = NULL; + gchar* _tmp0_; + glong _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; +#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = str; +#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = maxlen; +#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); +#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + end = _tmp2_; +#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = end; +#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp3_ == NULL) { +#line 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" + return result; +#line 965 "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" + return result; +#line 977 "OAuth1Support.c" + } +} + + +static gchar* string_substring (const gchar* self, glong offset, glong len) { + gchar* result = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_; + glong _tmp8_; + glong _tmp14_; + glong _tmp17_; + glong _tmp18_; + glong _tmp19_; + glong _tmp20_; + glong _tmp21_; + gchar* _tmp22_; +#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = offset; +#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp1_ >= ((glong) 0)) { +#line 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" + } else { +#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = FALSE; +#line 1011 "OAuth1Support.c" + } +#line 1335 "/usr/share/vala-0.36/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" + } 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" + } +#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" + } 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" + } +#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 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp17_ = offset; +#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp18_ = len; +#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp19_ = string_length; +#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); +#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp20_ = offset; +#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp21_ = len; +#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); +#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp22_; +#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 1102 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_oauth_timestamp (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + gint64 _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_); +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = _tmp1_; +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp4_ = _tmp3_; +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp2_); +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp4_; +#line 122 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1131 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_consumer_key (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + const gchar* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; +#line 125 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); +#line 126 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->consumer_key; +#line 126 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _vala_assert (_tmp0_ != NULL, "consumer_key != null"); +#line 127 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->consumer_key; +#line 127 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 127 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp2_; +#line 127 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1154 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_request_phase_token (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + const gchar* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; +#line 130 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); +#line 131 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->request_phase_token; +#line 131 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _vala_assert (_tmp0_ != NULL, "request_phase_token != null"); +#line 132 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->request_phase_token; +#line 132 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 132 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp2_; +#line 132 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1177 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_access_phase_token (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + const gchar* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; +#line 135 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); +#line 136 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->access_phase_token; +#line 136 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _vala_assert (_tmp0_ != NULL, "access_phase_token != null"); +#line 137 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->access_phase_token; +#line 137 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 137 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp2_; +#line 137 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1200 "OAuth1Support.c" +} + + +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" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), FALSE); +#line 141 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->access_phase_token; +#line 141 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp0_ != NULL; +#line 141 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1215 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_access_phase_token_secret (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + const gchar* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; +#line 144 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (self), NULL); +#line 145 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->access_phase_token_secret; +#line 145 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _vala_assert (_tmp0_ != NULL, "access_phase_token_secret != null"); +#line 146 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->access_phase_token_secret; +#line 146 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 146 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp2_; +#line 146 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1238 "OAuth1Support.c" +} + + +gchar* publishing_rest_support_oauth1_session_get_username (PublishingRESTSupportOAuth1Session* self) { + gchar* result = NULL; + gboolean _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; +#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()"); +#line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->username; +#line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp2_; +#line 151 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1261 "OAuth1Support.c" +} + + +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" + ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_rest_support_oauth1_session_finalize; +#line 11 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + 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" +} + + +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" + self->priv->request_phase_token = NULL; +#line 13 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->request_phase_token_secret = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->access_phase_token = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->access_phase_token_secret = NULL; +#line 16 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->username = NULL; +#line 17 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->consumer_key = NULL; +#line 18 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self->priv->consumer_secret = NULL; +#line 1295 "OAuth1Support.c" +} + + +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); +#line 12 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->request_phase_token); +#line 13 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->request_phase_token_secret); +#line 14 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->access_phase_token); +#line 15 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 16 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->username); +#line 17 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (self->priv->consumer_key); +#line 18 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _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" +} + + +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 }; + GType publishing_rest_support_oauth1_session_type_id; + publishing_rest_support_oauth1_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingRESTSupportOAuth1Session", &g_define_type_info, 0); + g_once_init_leave (&publishing_rest_support_oauth1_session_type_id__volatile, publishing_rest_support_oauth1_session_type_id); + } + return publishing_rest_support_oauth1_session_type_id__volatile; +} + + +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_); +#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" +} + + +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" +} + + +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_); +#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" +} + + +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" +} + + +static void publishing_rest_support_oauth1_transaction_setup_arguments (PublishingRESTSupportOAuth1Transaction* self) { + PublishingRESTSupportOAuth1Session* session = NULL; + PublishingRESTSupportSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + PublishingRESTSupportOAuth1Session* _tmp4_; + gchar* _tmp5_; + gchar* _tmp6_; + PublishingRESTSupportOAuth1Session* _tmp7_; + 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" + _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 169 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + session = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); +#line 171 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = session; +#line 171 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = publishing_rest_support_oauth1_session_get_oauth_nonce (_tmp1_); +#line 171 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = _tmp2_; +#line 171 "/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_nonce", _tmp3_); +#line 171 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp3_); +#line 172 "/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_signature_method", "HMAC-SHA1"); +#line 173 "/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_version", "1.0"); +#line 174 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp4_ = session; +#line 174 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp5_ = publishing_rest_support_oauth1_session_get_oauth_timestamp (_tmp4_); +#line 174 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp6_ = _tmp5_; +#line 174 "/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_timestamp", _tmp6_); +#line 174 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp6_); +#line 175 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp7_ = session; +#line 175 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp8_ = publishing_rest_support_oauth1_session_get_consumer_key (_tmp7_); +#line 175 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp9_ = _tmp8_; +#line 175 "/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_consumer_key", _tmp9_); +#line 175 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp9_); +#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_; + gchar* _tmp13_; + gchar* _tmp14_; +#line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp12_ = session; +#line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp13_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp12_); +#line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp14_ = _tmp13_; +#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_); +#line 177 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp14_); +#line 1468 "OAuth1Support.c" + } +#line 168 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _publishing_rest_support_session_unref0 (session); +#line 1472 "OAuth1Support.c" +} + + +static void publishing_rest_support_oauth1_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingRESTSupportOAuth1Transaction * self; + gchar* signature = NULL; + PublishingRESTSupportSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + GError * _inner_error_ = NULL; +#line 182 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1Transaction); +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = publishing_rest_support_oauth1_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), NULL, 0); +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = _tmp2_; +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 183 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + signature = _tmp3_; +#line 184 "/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_signature", signature); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_rest_support_oauth1_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_propagate_error (error, _inner_error_); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signature); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return; +#line 1512 "OAuth1Support.c" + } else { +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signature); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_clear_error (&_inner_error_); +#line 186 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return; +#line 1522 "OAuth1Support.c" + } + } +#line 182 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signature); +#line 1527 "OAuth1Support.c" +} + + +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" +} + + +static void publishing_rest_support_oauth1_transaction_instance_init (PublishingRESTSupportOAuth1Transaction * self) { +} + + +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 }; + GType publishing_rest_support_oauth1_transaction_type_id; + publishing_rest_support_oauth1_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingRESTSupportOAuth1Transaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_rest_support_oauth1_transaction_type_id__volatile, publishing_rest_support_oauth1_transaction_type_id); + } + return publishing_rest_support_oauth1_transaction_type_id__volatile; +} + + +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_; + gchar* _tmp6_; + gchar* _tmp7_; + PublishingRESTSupportOAuth1Session* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + PublishingRESTSupportOAuth1Session* _tmp11_; + gchar* _tmp12_; + gchar* _tmp13_; + PublishingRESTSupportOAuth1Session* _tmp14_; + gchar* _tmp15_; + gchar* _tmp16_; +#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" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#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_); +#line 199 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = 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_; +#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_; +#line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp5_ = 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_; +#line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp7_); +#line 202 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp7_); +#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_); +#line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp10_ = _tmp9_; +#line 205 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp10_); +#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; +#line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp12_ = publishing_rest_support_oauth1_session_get_consumer_key (_tmp11_); +#line 206 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp13_ = _tmp12_; +#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_); +#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; +#line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp15_ = publishing_rest_support_oauth1_session_get_access_phase_token (_tmp14_); +#line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp16_ = _tmp15_; +#line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp16_); +#line 207 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp16_); +#line 194 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return self; +#line 1649 "OAuth1Support.c" +} + + +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" +} + + +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 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" +} + + +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_; +#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" + g_return_if_fail (key != NULL); +#line 210 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_if_fail (value != NULL); +#line 211 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->auth_header_fields; +#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_); +#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" +} + + +gchar* publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (PublishingRESTSupportOAuth1UploadTransaction* self) { + gchar* result = NULL; + PublishingRESTSupportArgument** _tmp0_; + gint _tmp0__length1; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; +#line 214 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION (self), NULL); +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->priv->auth_header_fields; +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0__length1 = self->priv->auth_header_fields_length1; +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = publishing_rest_support_argument_serialize_list (_tmp0_, _tmp0__length1, TRUE, ", "); +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = _tmp1_; +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = g_strconcat ("OAuth ", _tmp2_, NULL); +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp4_ = _tmp3_; +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (_tmp2_); +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + result = _tmp4_; +#line 215 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + return result; +#line 1733 "OAuth1Support.c" +} + + +void publishing_rest_support_oauth1_upload_transaction_authorize (PublishingRESTSupportOAuth1UploadTransaction* self) { + gchar* signature = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; + PublishingRESTSupportArgument** _tmp1_; + gint _tmp1__length1; + gchar* _tmp2_; + gchar* authorization_header = NULL; + gchar* _tmp3_; +#line 218 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION (self)); +#line 219 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp0_ = self->session; +#line 219 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1_ = self->priv->auth_header_fields; +#line 219 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp1__length1 = self->priv->auth_header_fields_length1; +#line 219 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp2_ = publishing_rest_support_oauth1_session_sign_transaction (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp1_, _tmp1__length1); +#line 219 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + signature = _tmp2_; +#line 220 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (self, "oauth_signature", signature); +#line 223 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _tmp3_ = publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (self); +#line 223 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + authorization_header = _tmp3_; +#line 225 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + g_debug ("OAuth1Support.vala:225: executing upload transaction: authorization he" \ +"ader string = '%s'", authorization_header); +#line 227 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", authorization_header); +#line 218 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (authorization_header); +#line 218 "/home/jens/Source/shotwell/plugins/common/OAuth1Support.vala" + _g_free0 (signature); +#line 1771 "OAuth1Support.c" +} + + +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" +} + + +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" +} + + +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); +#line 192 "/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 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" +} + + +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 }; + GType publishing_rest_support_oauth1_upload_transaction_type_id; + publishing_rest_support_oauth1_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, "PublishingRESTSupportOAuth1UploadTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_rest_support_oauth1_upload_transaction_type_id__volatile, publishing_rest_support_oauth1_upload_transaction_type_id); + } + return publishing_rest_support_oauth1_upload_transaction_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/common/OAuth1Support.vala b/plugins/common/OAuth1Support.vala new file mode 100644 index 0000000..e5a8545 --- /dev/null +++ b/plugins/common/OAuth1Support.vala @@ -0,0 +1,233 @@ +/* Copyright 2016 Software Freedom Conservancy Inc. + * Copyright 2017 Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +namespace Publishing.RESTSupport.OAuth1 { + internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; + + public class Session : Publishing.RESTSupport.Session { + private string? request_phase_token = null; + private string? request_phase_token_secret = null; + private string? access_phase_token = null; + private string? access_phase_token_secret = null; + private string? username = null; + private string? consumer_key = null; + private string? consumer_secret = null; + + public Session(string? endpoint_uri = null) { + base(endpoint_uri); + } + + public override bool is_authenticated() { + return (access_phase_token != null && access_phase_token_secret != null && + username != null); + } + + public void authenticate_from_persistent_credentials(string token, string secret, + string username) { + this.access_phase_token = token; + this.access_phase_token_secret = secret; + this.username = username; + + this.authenticated(); + } + + public void deauthenticate() { + access_phase_token = null; + access_phase_token_secret = null; + username = null; + } + + public void set_api_credentials(string consumer_key, string consumer_secret) { + this.consumer_key = consumer_key; + this.consumer_secret = consumer_secret; + } + + public string sign_transaction(Publishing.RESTSupport.Transaction txn, + Publishing.RESTSupport.Argument[]? extra_arguments = null) { + string http_method = txn.get_method().to_string(); + + debug("signing transaction with parameters:"); + debug("HTTP method = " + http_method); + + Publishing.RESTSupport.Argument[] base_string_arguments = txn.get_arguments(); + + foreach (var arg in extra_arguments) { + base_string_arguments += arg; + } + + Publishing.RESTSupport.Argument[] sorted_args = + Publishing.RESTSupport.Argument.sort(base_string_arguments); + + var arguments_string = Argument.serialize_list(sorted_args); + + string? signing_key = null; + if (access_phase_token_secret != null) { + debug("access phase token secret available; using it as signing key"); + + signing_key = consumer_secret + "&" + access_phase_token_secret; + } else if (request_phase_token_secret != null) { + debug("request phase token secret available; using it as signing key"); + + signing_key = consumer_secret + "&" + request_phase_token_secret; + } else { + debug("neither access phase nor request phase token secrets available; using API " + + "key as signing key"); + + signing_key = consumer_secret + "&"; + } + + string signature_base_string = http_method + "&" + Soup.URI.encode( + txn.get_endpoint_url(), ENCODE_RFC_3986_EXTRA) + "&" + + Soup.URI.encode(arguments_string, ENCODE_RFC_3986_EXTRA); + + debug("signature base string = '%s'", signature_base_string); + + debug("signing key = '%s'", signing_key); + + // compute the signature + string signature = RESTSupport.hmac_sha1(signing_key, signature_base_string); + signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); + + debug("signature = '%s'", signature); + + return signature; + } + + public void set_request_phase_credentials(string token, string secret) { + this.request_phase_token = token; + this.request_phase_token_secret = secret; + } + + public void set_access_phase_credentials(string token, string secret, string username) { + this.access_phase_token = token; + this.access_phase_token_secret = secret; + this.username = username; + + authenticated(); + } + + public string get_oauth_nonce() { + TimeVal currtime = TimeVal(); + currtime.get_current_time(); + + return Checksum.compute_for_string(ChecksumType.MD5, currtime.tv_sec.to_string() + + currtime.tv_usec.to_string()); + } + + public string get_oauth_timestamp() { + return GLib.get_real_time().to_string().substring(0, 10); + } + + public string get_consumer_key() { + assert(consumer_key != null); + return consumer_key; + } + + public string get_request_phase_token() { + assert(request_phase_token != null); + return request_phase_token; + } + + public string get_access_phase_token() { + assert(access_phase_token != null); + return access_phase_token; + } + + public bool has_access_phase_token() { + return access_phase_token != null; + } + + public string get_access_phase_token_secret() { + assert(access_phase_token_secret != null); + return access_phase_token_secret; + } + + public string get_username() { + assert(is_authenticated()); + return username; + } + } + + public class Transaction : Publishing.RESTSupport.Transaction { + public Transaction(Session session, Publishing.RESTSupport.HttpMethod method = + Publishing.RESTSupport.HttpMethod.POST) { + base(session, method); + setup_arguments(); + } + + public Transaction.with_uri(Session session, string uri, + Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST) { + base.with_endpoint_url(session, uri, method); + setup_arguments(); + } + + private void setup_arguments() { + var session = (Session) get_parent_session(); + + add_argument("oauth_nonce", session.get_oauth_nonce()); + add_argument("oauth_signature_method", "HMAC-SHA1"); + add_argument("oauth_version", "1.0"); + add_argument("oauth_timestamp", session.get_oauth_timestamp()); + add_argument("oauth_consumer_key", session.get_consumer_key()); + if (session.has_access_phase_token()) { + add_argument("oauth_token", session.get_access_phase_token()); + } + } + + + public override void execute() throws Spit.Publishing.PublishingError { + var signature = ((Session) get_parent_session()).sign_transaction(this); + add_argument("oauth_signature", signature); + + base.execute(); + } + } + + public class UploadTransaction : Publishing.RESTSupport.UploadTransaction { + protected unowned Publishing.RESTSupport.OAuth1.Session session; + private Publishing.RESTSupport.Argument[] auth_header_fields; + + public UploadTransaction(Publishing.RESTSupport.OAuth1.Session session, + Spit.Publishing.Publishable publishable, + string endpoint_uri) { + base.with_endpoint_url(session, publishable, endpoint_uri); + + this.auth_header_fields = new Publishing.RESTSupport.Argument[0]; + this.session = session; + + add_authorization_header_field("oauth_nonce", session.get_oauth_nonce()); + add_authorization_header_field("oauth_signature_method", "HMAC-SHA1"); + add_authorization_header_field("oauth_version", "1.0"); + add_authorization_header_field("oauth_timestamp", session.get_oauth_timestamp()); + add_authorization_header_field("oauth_consumer_key", session.get_consumer_key()); + add_authorization_header_field("oauth_token", session.get_access_phase_token()); + } + + public void add_authorization_header_field(string key, string value) { + auth_header_fields += new Publishing.RESTSupport.Argument(key, value); + } + + public string get_authorization_header_string() { + return "OAuth " + Argument.serialize_list(auth_header_fields, true, ", "); + } + + public void authorize() { + var signature = session.sign_transaction(this, auth_header_fields); + add_authorization_header_field("oauth_signature", signature); + + + string authorization_header = get_authorization_header_string(); + + debug("executing upload transaction: authorization header string = '%s'", + authorization_header); + add_header("Authorization", authorization_header); + + } + } +} + + diff --git a/plugins/common/RESTSupport.c b/plugins/common/RESTSupport.c index f30430a..dcae2ed 100644 --- a/plugins/common/RESTSupport.c +++ b/plugins/common/RESTSupport.c @@ -59,6 +59,7 @@ typedef struct _PublishingRESTSupportArgument PublishingRESTSupportArgument; typedef struct _PublishingRESTSupportArgumentClass PublishingRESTSupportArgumentClass; typedef struct _PublishingRESTSupportArgumentPrivate PublishingRESTSupportArgumentPrivate; #define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL))) +#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) typedef struct _PublishingRESTSupportParamSpecArgument PublishingRESTSupportParamSpecArgument; #define PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION (publishing_rest_support_transaction_get_type ()) @@ -72,7 +73,6 @@ typedef struct _PublishingRESTSupportTransaction PublishingRESTSupportTransactio typedef struct _PublishingRESTSupportTransactionClass PublishingRESTSupportTransactionClass; typedef struct _PublishingRESTSupportTransactionPrivate PublishingRESTSupportTransactionPrivate; #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) #define __vala_SoupURI_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupURI_free (var), NULL))) typedef struct _PublishingRESTSupportParamSpecTransaction PublishingRESTSupportParamSpecTransaction; enum { @@ -423,10 +423,11 @@ enum { }; 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); +gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args, int args_length1, gboolean escape, const gchar* separator); +gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self, gboolean escape); gint publishing_rest_support_argument_compare (PublishingRESTSupportArgument* arg1, PublishingRESTSupportArgument* arg2); PublishingRESTSupportArgument** publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray, int inputArray_length1, int* result_length1); static gint _publishing_rest_support_argument_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); -gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self); static void publishing_rest_support_argument_finalize (PublishingRESTSupportArgument * obj); gpointer publishing_rest_support_transaction_ref (gpointer instance); void publishing_rest_support_transaction_unref (gpointer instance); @@ -634,13 +635,13 @@ static guint8* string_get_data (const gchar* self, int* result_length1) { if (result_length1) { #line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" *result_length1 = _tmp4__length1; -#line 637 "RESTSupport.c" +#line 638 "RESTSupport.c" } #line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" result = _tmp4_; #line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 643 "RESTSupport.c" +#line 644 "RESTSupport.c" } @@ -702,7 +703,7 @@ gchar* publishing_rest_support_hmac_sha1 (const gchar* key, const gchar* message _g_hmac_unref0 (mac); #line 22 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 705 "RESTSupport.c" +#line 706 "RESTSupport.c" } @@ -734,7 +735,7 @@ PublishingRESTSupportSession* publishing_rest_support_session_construct (GType o g_object_set (_tmp3_, "ssl-use-system-ca-file", TRUE, NULL); #line 34 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 737 "RESTSupport.c" +#line 738 "RESTSupport.c" } @@ -748,7 +749,7 @@ void publishing_rest_support_session_notify_wire_message_unqueued (PublishingRES _tmp0_ = message; #line 41 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_WIRE_MESSAGE_UNQUEUED_SIGNAL], 0, _tmp0_); -#line 751 "RESTSupport.c" +#line 752 "RESTSupport.c" } @@ -757,7 +758,7 @@ void publishing_rest_support_session_notify_authenticated (PublishingRESTSupport g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self)); #line 45 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATED_SIGNAL], 0); -#line 760 "RESTSupport.c" +#line 761 "RESTSupport.c" } @@ -769,7 +770,7 @@ void publishing_rest_support_session_notify_authentication_failed (PublishingRES _tmp0_ = err; #line 49 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATION_FAILED_SIGNAL], 0, _tmp0_); -#line 772 "RESTSupport.c" +#line 773 "RESTSupport.c" } @@ -779,7 +780,7 @@ static gboolean publishing_rest_support_session_real_is_authenticated (Publishin g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_session_is_authenticated'", g_type_name (G_TYPE_FROM_INSTANCE (self))); #line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return _tmp0_; -#line 782 "RESTSupport.c" +#line 783 "RESTSupport.c" } @@ -788,7 +789,7 @@ gboolean publishing_rest_support_session_is_authenticated (PublishingRESTSupport g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (self), FALSE); #line 52 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS (self)->is_authenticated (self); -#line 791 "RESTSupport.c" +#line 792 "RESTSupport.c" } @@ -806,7 +807,7 @@ gchar* publishing_rest_support_session_get_endpoint_url (PublishingRESTSupportSe result = _tmp1_; #line 55 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 809 "RESTSupport.c" +#line 810 "RESTSupport.c" } @@ -820,7 +821,7 @@ void publishing_rest_support_session_stop_transactions (PublishingRESTSupportSes _tmp0_ = self->priv->soup_session; #line 60 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_session_abort (_tmp0_); -#line 823 "RESTSupport.c" +#line 824 "RESTSupport.c" } @@ -835,14 +836,14 @@ gboolean publishing_rest_support_session_are_transactions_stopped (PublishingRES result = _tmp0_; #line 64 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 838 "RESTSupport.c" +#line 839 "RESTSupport.c" } static void _publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued (SoupSession* _sender, SoupMessage* msg, gpointer self) { #line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_notify_wire_message_unqueued ((PublishingRESTSupportSession*) self, msg); -#line 845 "RESTSupport.c" +#line 846 "RESTSupport.c" } @@ -863,7 +864,7 @@ void publishing_rest_support_session_send_wire_message (PublishingRESTSupportSes if (_tmp0_) { #line 69 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 866 "RESTSupport.c" +#line 867 "RESTSupport.c" } #line 71 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->soup_session; @@ -881,7 +882,7 @@ void publishing_rest_support_session_send_wire_message (PublishingRESTSupportSes g_signal_parse_name ("request-unqueued", soup_session_get_type (), &_tmp5_, NULL, FALSE); #line 74 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_rest_support_session_notify_wire_message_unqueued_soup_session_request_unqueued, self); -#line 884 "RESTSupport.c" +#line 885 "RESTSupport.c" } @@ -898,14 +899,14 @@ void publishing_rest_support_session_set_insecure (PublishingRESTSupportSession* _tmp1_ = self->priv->soup_session; #line 79 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_set (_tmp1_, "ssl-strict", FALSE, NULL); -#line 901 "RESTSupport.c" +#line 902 "RESTSupport.c" } static void publishing_rest_support_value_session_init (GValue* value) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 908 "RESTSupport.c" +#line 909 "RESTSupport.c" } @@ -914,7 +915,7 @@ static void publishing_rest_support_value_session_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_unref (value->data[0].v_pointer); -#line 917 "RESTSupport.c" +#line 918 "RESTSupport.c" } } @@ -924,11 +925,11 @@ static void publishing_rest_support_value_session_copy_value (const GValue* src_ if (src_value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = publishing_rest_support_session_ref (src_value->data[0].v_pointer); -#line 927 "RESTSupport.c" +#line 928 "RESTSupport.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = NULL; -#line 931 "RESTSupport.c" +#line 932 "RESTSupport.c" } } @@ -936,37 +937,37 @@ static void publishing_rest_support_value_session_copy_value (const GValue* src_ static gpointer publishing_rest_support_value_session_peek_pointer (const GValue* value) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 939 "RESTSupport.c" +#line 940 "RESTSupport.c" } static gchar* publishing_rest_support_value_session_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (collect_values[0].v_pointer) { -#line 946 "RESTSupport.c" +#line 947 "RESTSupport.c" PublishingRESTSupportSession * object; object = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (object->parent_instance.g_class == NULL) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 953 "RESTSupport.c" +#line 954 "RESTSupport.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 957 "RESTSupport.c" +#line 958 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = publishing_rest_support_session_ref (object); -#line 961 "RESTSupport.c" +#line 962 "RESTSupport.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 965 "RESTSupport.c" +#line 966 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 969 "RESTSupport.c" +#line 970 "RESTSupport.c" } @@ -977,25 +978,25 @@ static gchar* publishing_rest_support_value_session_lcopy_value (const GValue* v if (!object_p) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 980 "RESTSupport.c" +#line 981 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = NULL; -#line 986 "RESTSupport.c" +#line 987 "RESTSupport.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = value->data[0].v_pointer; -#line 990 "RESTSupport.c" +#line 991 "RESTSupport.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = publishing_rest_support_session_ref (value->data[0].v_pointer); -#line 994 "RESTSupport.c" +#line 995 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 998 "RESTSupport.c" +#line 999 "RESTSupport.c" } @@ -1009,7 +1010,7 @@ GParamSpec* publishing_rest_support_param_spec_session (const gchar* name, const G_PARAM_SPEC (spec)->value_type = object_type; #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return G_PARAM_SPEC (spec); -#line 1012 "RESTSupport.c" +#line 1013 "RESTSupport.c" } @@ -1018,7 +1019,7 @@ gpointer publishing_rest_support_value_get_session (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_SESSION), NULL); #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 1021 "RESTSupport.c" +#line 1022 "RESTSupport.c" } @@ -1038,17 +1039,17 @@ void publishing_rest_support_value_set_session (GValue* value, gpointer v_object value->data[0].v_pointer = v_object; #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_ref (value->data[0].v_pointer); -#line 1041 "RESTSupport.c" +#line 1042 "RESTSupport.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1045 "RESTSupport.c" +#line 1046 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_unref (old); -#line 1051 "RESTSupport.c" +#line 1052 "RESTSupport.c" } } @@ -1067,17 +1068,17 @@ void publishing_rest_support_value_take_session (GValue* value, gpointer v_objec g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 1070 "RESTSupport.c" +#line 1071 "RESTSupport.c" } else { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1074 "RESTSupport.c" +#line 1075 "RESTSupport.c" } #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_unref (old); -#line 1080 "RESTSupport.c" +#line 1081 "RESTSupport.c" } } @@ -1097,7 +1098,7 @@ static void publishing_rest_support_session_class_init (PublishingRESTSupportSes publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATED_SIGNAL] = g_signal_new ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_signals[PUBLISHING_REST_SUPPORT_SESSION_AUTHENTICATION_FAILED_SIGNAL] = g_signal_new ("authentication-failed", PUBLISHING_REST_SUPPORT_TYPE_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); -#line 1100 "RESTSupport.c" +#line 1101 "RESTSupport.c" } @@ -1112,7 +1113,7 @@ static void publishing_rest_support_session_instance_init (PublishingRESTSupport self->priv->transactions_stopped = FALSE; #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->ref_count = 1; -#line 1115 "RESTSupport.c" +#line 1116 "RESTSupport.c" } @@ -1126,7 +1127,7 @@ static void publishing_rest_support_session_finalize (PublishingRESTSupportSessi _g_free0 (self->priv->endpoint_url); #line 27 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->soup_session); -#line 1129 "RESTSupport.c" +#line 1130 "RESTSupport.c" } @@ -1151,7 +1152,7 @@ gpointer publishing_rest_support_session_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return instance; -#line 1154 "RESTSupport.c" +#line 1155 "RESTSupport.c" } @@ -1164,7 +1165,7 @@ void publishing_rest_support_session_unref (gpointer instance) { PUBLISHING_REST_SUPPORT_SESSION_GET_CLASS (self)->finalize (self); #line 25 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_free_instance ((GTypeInstance *) self); -#line 1167 "RESTSupport.c" +#line 1168 "RESTSupport.c" } } @@ -1175,7 +1176,7 @@ gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpM switch (self) { #line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET: -#line 1178 "RESTSupport.c" +#line 1179 "RESTSupport.c" { gchar* _tmp0_; #line 91 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" @@ -1184,11 +1185,11 @@ gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpM result = _tmp0_; #line 91 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1187 "RESTSupport.c" +#line 1188 "RESTSupport.c" } #line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT: -#line 1191 "RESTSupport.c" +#line 1192 "RESTSupport.c" { gchar* _tmp1_; #line 94 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" @@ -1197,11 +1198,11 @@ gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpM result = _tmp1_; #line 94 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1200 "RESTSupport.c" +#line 1201 "RESTSupport.c" } #line 89 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST: -#line 1204 "RESTSupport.c" +#line 1205 "RESTSupport.c" { gchar* _tmp2_; #line 97 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" @@ -1210,13 +1211,13 @@ gchar* publishing_rest_support_http_method_to_string (PublishingRESTSupportHttpM result = _tmp2_; #line 97 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1213 "RESTSupport.c" +#line 1214 "RESTSupport.c" } default: { #line 100 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_error ("RESTSupport.vala:100: unrecognized HTTP method enumeration value"); -#line 1219 "RESTSupport.c" +#line 1220 "RESTSupport.c" } } } @@ -1235,7 +1236,7 @@ PublishingRESTSupportHttpMethod publishing_rest_support_http_method_from_string result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET; #line 106 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1238 "RESTSupport.c" +#line 1239 "RESTSupport.c" } else { const gchar* _tmp1_; #line 107 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" @@ -1246,7 +1247,7 @@ PublishingRESTSupportHttpMethod publishing_rest_support_http_method_from_string result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_PUT; #line 108 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1249 "RESTSupport.c" +#line 1250 "RESTSupport.c" } else { const gchar* _tmp2_; #line 109 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" @@ -1257,14 +1258,14 @@ PublishingRESTSupportHttpMethod publishing_rest_support_http_method_from_string result = PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST; #line 110 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1260 "RESTSupport.c" +#line 1261 "RESTSupport.c" } else { const gchar* _tmp3_; #line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = str; #line 112 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_error ("RESTSupport.vala:112: unrecognized HTTP method name: %s", _tmp3_); -#line 1267 "RESTSupport.c" +#line 1268 "RESTSupport.c" } } } @@ -1313,14 +1314,139 @@ PublishingRESTSupportArgument* publishing_rest_support_argument_construct (GType self->value = _tmp3_; #line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 1316 "RESTSupport.c" +#line 1317 "RESTSupport.c" } PublishingRESTSupportArgument* publishing_rest_support_argument_new (const gchar* key, const gchar* value) { #line 121 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_argument_construct (PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, key, value); -#line 1323 "RESTSupport.c" +#line 1324 "RESTSupport.c" +} + + +static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + return self ? publishing_rest_support_argument_ref (self) : NULL; +#line 1331 "RESTSupport.c" +} + + +gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args, int args_length1, gboolean escape, const gchar* separator) { + gchar* result = NULL; + GString* builder = NULL; + GString* _tmp0_; + PublishingRESTSupportArgument** _tmp1_; + gint _tmp1__length1; + GString* _tmp10_; + gssize _tmp11_; + GString* _tmp18_; + const gchar* _tmp19_; + gchar* _tmp20_; +#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp0_ = g_string_new (""); +#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + builder = _tmp0_; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp1_ = args; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp1__length1 = args_length1; +#line 1354 "RESTSupport.c" + { + PublishingRESTSupportArgument** arg_collection = NULL; + gint arg_collection_length1 = 0; + gint _arg_collection_size_ = 0; + gint arg_it = 0; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + arg_collection = _tmp1_; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + arg_collection_length1 = _tmp1__length1; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + for (arg_it = 0; arg_it < _tmp1__length1; arg_it = arg_it + 1) { +#line 1366 "RESTSupport.c" + PublishingRESTSupportArgument* _tmp2_; + PublishingRESTSupportArgument* arg = NULL; +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp2_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + arg = _tmp2_; +#line 1373 "RESTSupport.c" + { + GString* _tmp3_; + PublishingRESTSupportArgument* _tmp4_; + gboolean _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + GString* _tmp8_; + const gchar* _tmp9_; +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp3_ = builder; +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp4_ = arg; +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp5_ = escape; +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp6_ = publishing_rest_support_argument_to_string (_tmp4_, _tmp5_); +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp7_ = _tmp6_; +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_string_append (_tmp3_, _tmp7_); +#line 130 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _g_free0 (_tmp7_); +#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp8_ = builder; +#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp9_ = separator; +#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_string_append (_tmp8_, _tmp9_); +#line 129 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _publishing_rest_support_argument_unref0 (arg); +#line 1404 "RESTSupport.c" + } + } + } +#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp10_ = builder; +#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp11_ = _tmp10_->len; +#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + if (_tmp11_ > ((gssize) 0)) { +#line 1414 "RESTSupport.c" + GString* _tmp12_; + GString* _tmp13_; + gssize _tmp14_; + const gchar* _tmp15_; + gint _tmp16_; + gint _tmp17_; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp12_ = builder; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp13_ = builder; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp14_ = _tmp13_->len; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp15_ = separator; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp16_ = strlen (_tmp15_); +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp17_ = _tmp16_; +#line 135 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_string_truncate (_tmp12_, (gsize) (_tmp14_ - _tmp17_)); +#line 1435 "RESTSupport.c" + } +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp18_ = builder; +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp19_ = _tmp18_->str; +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp20_ = g_strdup (_tmp19_); +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + result = _tmp20_; +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _g_string_free0 (builder); +#line 137 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + return result; +#line 1449 "RESTSupport.c" } @@ -1332,43 +1458,36 @@ gint publishing_rest_support_argument_compare (PublishingRESTSupportArgument* ar PublishingRESTSupportArgument* _tmp3_; const gchar* _tmp4_; gint _tmp5_; -#line 126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg1), 0); -#line 126 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (arg2), 0); -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = g_strcmp0; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = arg1; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_->key; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = arg2; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = _tmp3_->key; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _tmp0_ (_tmp2_, _tmp4_); -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp5_; -#line 127 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 141 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1355 "RESTSupport.c" +#line 1481 "RESTSupport.c" } static gint _publishing_rest_support_argument_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { gint result; result = publishing_rest_support_argument_compare ((PublishingRESTSupportArgument*) a, (PublishingRESTSupportArgument*) b); -#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1364 "RESTSupport.c" -} - - -static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - return self ? publishing_rest_support_argument_ref (self) : NULL; -#line 1371 "RESTSupport.c" +#line 1490 "RESTSupport.c" } @@ -1383,98 +1502,126 @@ PublishingRESTSupportArgument** publishing_rest_support_argument_sort (Publishin gpointer* _tmp7_; PublishingRESTSupportArgument** _tmp8_; gint _tmp8__length1; -#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = gee_tree_set_new (PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT, (GBoxedCopyFunc) publishing_rest_support_argument_ref, (GDestroyNotify) publishing_rest_support_argument_unref, _publishing_rest_support_argument_compare_gcompare_data_func, NULL, NULL); -#line 131 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" sorted_args = _tmp0_; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = inputArray; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1__length1 = inputArray_length1; -#line 1394 "RESTSupport.c" +#line 1513 "RESTSupport.c" { PublishingRESTSupportArgument** arg_collection = NULL; gint arg_collection_length1 = 0; gint _arg_collection_size_ = 0; gint arg_it = 0; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg_collection = _tmp1_; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg_collection_length1 = _tmp1__length1; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" for (arg_it = 0; arg_it < _tmp1__length1; arg_it = arg_it + 1) { -#line 1406 "RESTSupport.c" +#line 1525 "RESTSupport.c" PublishingRESTSupportArgument* _tmp2_; PublishingRESTSupportArgument* arg = NULL; -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg = _tmp2_; -#line 1413 "RESTSupport.c" +#line 1532 "RESTSupport.c" { GeeTreeSet* _tmp3_; PublishingRESTSupportArgument* _tmp4_; -#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = sorted_args; -#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = arg; -#line 134 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp4_); -#line 133 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_argument_unref0 (arg); -#line 1425 "RESTSupport.c" +#line 1544 "RESTSupport.c" } } } -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = sorted_args; -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp6_); -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = _tmp7_; -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8__length1 = _tmp6_; -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (result_length1) { -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *result_length1 = _tmp8__length1; -#line 1441 "RESTSupport.c" +#line 1560 "RESTSupport.c" } -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp8_; -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (sorted_args); -#line 136 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1449 "RESTSupport.c" +#line 1568 "RESTSupport.c" } -gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self) { +gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self, gboolean escape) { gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 139 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + const gchar* _tmp0_ = NULL; + gboolean _tmp1_; + const gchar* _tmp2_ = NULL; + gboolean _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_; +#line 153 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_ARGUMENT (self), NULL); -#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - _tmp0_ = self->key; -#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - _tmp1_ = self->value; -#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - _tmp2_ = g_strdup_printf ("%s=%s", _tmp0_, _tmp1_); -#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - result = _tmp2_; -#line 140 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp1_ = escape; +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + if (_tmp1_) { +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp0_ = "\""; +#line 1589 "RESTSupport.c" + } else { +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp0_ = ""; +#line 1593 "RESTSupport.c" + } +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp3_ = escape; +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + if (_tmp3_) { +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp2_ = "\""; +#line 1601 "RESTSupport.c" + } else { +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp2_ = ""; +#line 1605 "RESTSupport.c" + } +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp4_ = self->key; +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp5_ = self->value; +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp6_ = g_strdup_printf ("%s=%s%s%s", _tmp4_, _tmp0_, _tmp5_, _tmp2_); +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + result = _tmp6_; +#line 154 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 1470 "RESTSupport.c" +#line 1617 "RESTSupport.c" } static void publishing_rest_support_value_argument_init (GValue* value) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1477 "RESTSupport.c" +#line 1624 "RESTSupport.c" } @@ -1483,7 +1630,7 @@ static void publishing_rest_support_value_argument_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_argument_unref (value->data[0].v_pointer); -#line 1486 "RESTSupport.c" +#line 1633 "RESTSupport.c" } } @@ -1493,11 +1640,11 @@ static void publishing_rest_support_value_argument_copy_value (const GValue* src if (src_value->data[0].v_pointer) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = publishing_rest_support_argument_ref (src_value->data[0].v_pointer); -#line 1496 "RESTSupport.c" +#line 1643 "RESTSupport.c" } else { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = NULL; -#line 1500 "RESTSupport.c" +#line 1647 "RESTSupport.c" } } @@ -1505,37 +1652,37 @@ static void publishing_rest_support_value_argument_copy_value (const GValue* src static gpointer publishing_rest_support_value_argument_peek_pointer (const GValue* value) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 1508 "RESTSupport.c" +#line 1655 "RESTSupport.c" } static gchar* publishing_rest_support_value_argument_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (collect_values[0].v_pointer) { -#line 1515 "RESTSupport.c" +#line 1662 "RESTSupport.c" PublishingRESTSupportArgument * object; object = collect_values[0].v_pointer; #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (object->parent_instance.g_class == NULL) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1522 "RESTSupport.c" +#line 1669 "RESTSupport.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1526 "RESTSupport.c" +#line 1673 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = publishing_rest_support_argument_ref (object); -#line 1530 "RESTSupport.c" +#line 1677 "RESTSupport.c" } else { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1534 "RESTSupport.c" +#line 1681 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 1538 "RESTSupport.c" +#line 1685 "RESTSupport.c" } @@ -1546,25 +1693,25 @@ static gchar* publishing_rest_support_value_argument_lcopy_value (const GValue* if (!object_p) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1549 "RESTSupport.c" +#line 1696 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!value->data[0].v_pointer) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = NULL; -#line 1555 "RESTSupport.c" +#line 1702 "RESTSupport.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = value->data[0].v_pointer; -#line 1559 "RESTSupport.c" +#line 1706 "RESTSupport.c" } else { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = publishing_rest_support_argument_ref (value->data[0].v_pointer); -#line 1563 "RESTSupport.c" +#line 1710 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 1567 "RESTSupport.c" +#line 1714 "RESTSupport.c" } @@ -1578,7 +1725,7 @@ GParamSpec* publishing_rest_support_param_spec_argument (const gchar* name, cons G_PARAM_SPEC (spec)->value_type = object_type; #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return G_PARAM_SPEC (spec); -#line 1581 "RESTSupport.c" +#line 1728 "RESTSupport.c" } @@ -1587,7 +1734,7 @@ gpointer publishing_rest_support_value_get_argument (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_ARGUMENT), NULL); #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 1590 "RESTSupport.c" +#line 1737 "RESTSupport.c" } @@ -1607,17 +1754,17 @@ void publishing_rest_support_value_set_argument (GValue* value, gpointer v_objec value->data[0].v_pointer = v_object; #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_argument_ref (value->data[0].v_pointer); -#line 1610 "RESTSupport.c" +#line 1757 "RESTSupport.c" } else { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1614 "RESTSupport.c" +#line 1761 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_argument_unref (old); -#line 1620 "RESTSupport.c" +#line 1767 "RESTSupport.c" } } @@ -1636,17 +1783,17 @@ void publishing_rest_support_value_take_argument (GValue* value, gpointer v_obje g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 1639 "RESTSupport.c" +#line 1786 "RESTSupport.c" } else { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 1643 "RESTSupport.c" +#line 1790 "RESTSupport.c" } #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_argument_unref (old); -#line 1649 "RESTSupport.c" +#line 1796 "RESTSupport.c" } } @@ -1656,14 +1803,14 @@ static void publishing_rest_support_argument_class_init (PublishingRESTSupportAr publishing_rest_support_argument_parent_class = g_type_class_peek_parent (klass); #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportArgumentClass *) klass)->finalize = publishing_rest_support_argument_finalize; -#line 1659 "RESTSupport.c" +#line 1806 "RESTSupport.c" } static void publishing_rest_support_argument_instance_init (PublishingRESTSupportArgument * self) { #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->ref_count = 1; -#line 1666 "RESTSupport.c" +#line 1813 "RESTSupport.c" } @@ -1677,7 +1824,7 @@ static void publishing_rest_support_argument_finalize (PublishingRESTSupportArgu _g_free0 (self->key); #line 119 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->value); -#line 1680 "RESTSupport.c" +#line 1827 "RESTSupport.c" } @@ -1702,7 +1849,7 @@ gpointer publishing_rest_support_argument_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return instance; -#line 1705 "RESTSupport.c" +#line 1852 "RESTSupport.c" } @@ -1715,15 +1862,15 @@ void publishing_rest_support_argument_unref (gpointer instance) { PUBLISHING_REST_SUPPORT_ARGUMENT_GET_CLASS (self)->finalize (self); #line 117 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_free_instance ((GTypeInstance *) self); -#line 1718 "RESTSupport.c" +#line 1865 "RESTSupport.c" } } static void _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data (SoupMessage* _sender, SoupBuffer* chunk, gpointer self) { -#line 166 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_on_wrote_body_data ((PublishingRESTSupportTransaction*) self, chunk); -#line 1726 "RESTSupport.c" +#line 1873 "RESTSupport.c" } @@ -1741,60 +1888,60 @@ PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct gchar* _tmp9_; SoupMessage* _tmp10_; SoupMessage* _tmp11_; -#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL); -#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type); -#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = parent_session; -#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = publishing_rest_support_session_get_endpoint_url (_tmp0_); -#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_; -#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp2_ != NULL, "parent_session.get_endpoint_url() != null"); -#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp2_); -#line 163 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = parent_session; -#line 163 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->parent_session = _tmp3_; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = method; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = publishing_rest_support_http_method_to_string (_tmp4_); -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = parent_session; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = publishing_rest_support_session_get_endpoint_url (_tmp7_); -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = _tmp8_; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = soup_message_new (_tmp6_, _tmp9_); -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->message); -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->message = _tmp10_; -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp9_); -#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 180 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp6_); -#line 166 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = self->priv->message; -#line 166 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_connect (_tmp11_, "wrote-body-data", (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self); -#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 1790 "RESTSupport.c" +#line 1937 "RESTSupport.c" } PublishingRESTSupportTransaction* publishing_rest_support_transaction_new (PublishingRESTSupportSession* parent_session, PublishingRESTSupportHttpMethod method) { -#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, parent_session, method); -#line 1797 "RESTSupport.c" +#line 1944 "RESTSupport.c" } @@ -1808,50 +1955,50 @@ PublishingRESTSupportTransaction* publishing_rest_support_transaction_construct_ gchar* _tmp5_; const gchar* _tmp6_; SoupMessage* _tmp7_; -#line 169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (parent_session), NULL); -#line 169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (endpoint_url != NULL, NULL); -#line 169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportTransaction*) g_type_create_instance (object_type); -#line 171 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = parent_session; -#line 171 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->parent_session = _tmp0_; -#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = endpoint_url; -#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_strdup (_tmp1_); -#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->priv->endpoint_url); -#line 172 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 187 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->endpoint_url = _tmp2_; -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = method; -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = publishing_rest_support_http_method_to_string (_tmp3_); -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _tmp4_; -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = endpoint_url; -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = soup_message_new (_tmp5_, _tmp6_); -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->message); -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->message = _tmp7_; -#line 173 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp5_); -#line 169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 1847 "RESTSupport.c" +#line 1994 "RESTSupport.c" } PublishingRESTSupportTransaction* publishing_rest_support_transaction_new_with_endpoint_url (PublishingRESTSupportSession* parent_session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) { -#line 169 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 184 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, parent_session, endpoint_url, method); -#line 1854 "RESTSupport.c" +#line 2001 "RESTSupport.c" } @@ -1863,36 +2010,36 @@ static void publishing_rest_support_transaction_on_wrote_body_data (PublishingRE SoupMessage* _tmp4_; SoupMessageBody* _tmp5_; gint64 _tmp6_; -#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 191 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 176 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 191 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (written_data != NULL); -#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->bytes_written; -#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = written_data; -#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_->length; -#line 177 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 192 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->bytes_written = _tmp0_ + ((gint) _tmp2_); -#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = self->priv->bytes_written; -#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = self->priv->message; -#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _tmp4_->request_body; -#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_->length; -#line 178 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 193 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_CHUNK_TRANSMITTED_SIGNAL], 0, _tmp3_, (gint) _tmp6_); -#line 1888 "RESTSupport.c" +#line 2035 "RESTSupport.c" } static gpointer _g_error_copy0 (gpointer self) { -#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self ? g_error_copy (self) : NULL; -#line 1895 "RESTSupport.c" +#line 2042 "RESTSupport.c" } @@ -1900,40 +2047,40 @@ static void publishing_rest_support_transaction_on_message_unqueued (PublishingR SoupMessage* _tmp0_; SoupMessage* _tmp1_; GError * _inner_error_ = NULL; -#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 196 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 181 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 196 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (SOUP_IS_MESSAGE (message)); -#line 182 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->message; -#line 182 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = message; -#line 182 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp0_ != _tmp1_) { -#line 183 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 198 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 1915 "RESTSupport.c" +#line 2062 "RESTSupport.c" } { SoupMessage* _tmp2_; -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = message; -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_check_response (self, _tmp2_, &_inner_error_); -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 1927 "RESTSupport.c" +#line 2074 "RESTSupport.c" goto __catch0_spit_publishing_publishing_error; } -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 186 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 201 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 1936 "RESTSupport.c" +#line 2083 "RESTSupport.c" } } goto __finally0; @@ -1946,54 +2093,54 @@ static void publishing_rest_support_transaction_on_message_unqueued (PublishingR gchar* _tmp6_; GError* _tmp7_; GError* _tmp8_; -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" err = _inner_error_; -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = NULL; -#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = err; -#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = _tmp3_->message; -#line 188 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - g_warning ("RESTSupport.vala:188: Publishing error: %s", _tmp4_); -#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 203 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_warning ("RESTSupport.vala:203: Publishing error: %s", _tmp4_); +#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = publishing_rest_support_transaction_get_response (self); -#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_; -#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - g_warning ("RESTSupport.vala:189: response validation failed. bad response = '%s'.", _tmp6_); -#line 189 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_warning ("RESTSupport.vala:204: response validation failed. bad response = '%s'.", _tmp6_); +#line 204 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp6_); -#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = err; -#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = _g_error_copy0 (_tmp7_); -#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_error_free0 (self->priv->err); -#line 190 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->err = _tmp8_; -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_error_free0 (err); -#line 1977 "RESTSupport.c" +#line 2124 "RESTSupport.c" } __finally0: -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 185 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 1988 "RESTSupport.c" +#line 2135 "RESTSupport.c" } } static gpointer _g_object_ref0 (gpointer self) { -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self ? g_object_ref (self) : NULL; -#line 1996 "RESTSupport.c" +#line 2143 "RESTSupport.c" } @@ -2022,145 +2169,145 @@ gchar* publishing_rest_support_transaction_detailed_error_from_tls_flags (Publis GString* _tmp40_; const gchar* _tmp41_; gchar* _tmp42_; -#line 195 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 210 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->message; -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_get_https_status (_tmp0_, &_tmp1_, &_tmp2_); -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_vala_cert); -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _g_object_ref0 (_tmp1_); -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_cert = _tmp3_; -#line 197 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" tls_errors = _tmp2_; -#line 199 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 214 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 199 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 214 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" list = _tmp4_; -#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = tls_errors; -#line 200 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp5_ & G_TLS_CERTIFICATE_BAD_IDENTITY) == G_TLS_CERTIFICATE_BAD_IDENTITY) { -#line 2047 "RESTSupport.c" +#line 2194 "RESTSupport.c" GeeArrayList* _tmp6_; -#line 202 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = list; -#line 202 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website presented identification that belongs to a different we" \ "bsite.")); -#line 2053 "RESTSupport.c" +#line 2200 "RESTSupport.c" } -#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = tls_errors; -#line 205 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp7_ & G_TLS_CERTIFICATE_EXPIRED) == G_TLS_CERTIFICATE_EXPIRED) { -#line 2059 "RESTSupport.c" +#line 2206 "RESTSupport.c" GeeArrayList* _tmp8_; -#line 207 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = list; -#line 207 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification is too old to trust. Check the date on" \ " your computer’s calendar.")); -#line 2065 "RESTSupport.c" +#line 2212 "RESTSupport.c" } -#line 210 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = tls_errors; -#line 210 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp9_ & G_TLS_CERTIFICATE_UNKNOWN_CA) == G_TLS_CERTIFICATE_UNKNOWN_CA) { -#line 2071 "RESTSupport.c" +#line 2218 "RESTSupport.c" GeeArrayList* _tmp10_; -#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = list; -#line 212 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification was not issued by a trusted organizati" \ "on.")); -#line 2077 "RESTSupport.c" +#line 2224 "RESTSupport.c" } -#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = tls_errors; -#line 215 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp11_ & G_TLS_CERTIFICATE_GENERIC_ERROR) == G_TLS_CERTIFICATE_GENERIC_ERROR) { -#line 2083 "RESTSupport.c" +#line 2230 "RESTSupport.c" GeeArrayList* _tmp12_; -#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = list; -#line 217 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification could not be processed. It may be corr" \ "upted.")); -#line 2089 "RESTSupport.c" +#line 2236 "RESTSupport.c" } -#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = tls_errors; -#line 220 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp13_ & G_TLS_CERTIFICATE_REVOKED) == G_TLS_CERTIFICATE_REVOKED) { -#line 2095 "RESTSupport.c" +#line 2242 "RESTSupport.c" GeeArrayList* _tmp14_; -#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = list; -#line 222 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification has been revoked by the trusted organi" \ "zation that issued it.")); -#line 2101 "RESTSupport.c" +#line 2248 "RESTSupport.c" } -#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = tls_errors; -#line 225 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp15_ & G_TLS_CERTIFICATE_INSECURE) == G_TLS_CERTIFICATE_INSECURE) { -#line 2107 "RESTSupport.c" +#line 2254 "RESTSupport.c" GeeArrayList* _tmp16_; -#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 242 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = list; -#line 227 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 242 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification cannot be trusted because it uses very" \ " weak encryption.")); -#line 2113 "RESTSupport.c" +#line 2260 "RESTSupport.c" } -#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 245 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = tls_errors; -#line 230 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 245 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((_tmp17_ & G_TLS_CERTIFICATE_NOT_ACTIVATED) == G_TLS_CERTIFICATE_NOT_ACTIVATED) { -#line 2119 "RESTSupport.c" +#line 2266 "RESTSupport.c" GeeArrayList* _tmp18_; -#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = list; -#line 232 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _ ("⚫ This website’s identification is only valid for future dates. Check " \ "the date on your computer’s calendar.")); -#line 2125 "RESTSupport.c" +#line 2272 "RESTSupport.c" } -#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 250 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = g_string_new (""); -#line 235 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 250 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" builder = _tmp19_; -#line 236 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = list; -#line 236 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 236 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = _tmp21_; -#line 236 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 251 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp22_ == 1) { -#line 2139 "RESTSupport.c" +#line 2286 "RESTSupport.c" GString* _tmp23_; GeeArrayList* _tmp24_; gpointer _tmp25_; gchar* _tmp26_; -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = builder; -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = list; -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0); -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp26_ = (gchar*) _tmp25_; -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_string_append (_tmp23_, _tmp26_); -#line 237 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp26_); -#line 2156 "RESTSupport.c" +#line 2303 "RESTSupport.c" } else { { GeeArrayList* _entry_list = NULL; @@ -2171,25 +2318,25 @@ gchar* publishing_rest_support_transaction_detailed_error_from_tls_flags (Publis gint _tmp30_; gint _tmp31_; gint _entry_index = 0; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp27_ = list; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp28_ = _g_object_ref0 (_tmp27_); -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _entry_list = _tmp28_; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp29_ = _entry_list; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp30_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp31_ = _tmp30_; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _entry_size = _tmp31_; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _entry_index = -1; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 2185 "RESTSupport.c" +#line 2332 "RESTSupport.c" gint _tmp32_; gint _tmp33_; gint _tmp34_; @@ -2199,68 +2346,68 @@ gchar* publishing_rest_support_transaction_detailed_error_from_tls_flags (Publis gpointer _tmp37_; GString* _tmp38_; const gchar* _tmp39_; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp32_ = _entry_index; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _entry_index = _tmp32_ + 1; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33_ = _entry_index; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp34_ = _entry_size; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!(_tmp33_ < _tmp34_)) { -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 2207 "RESTSupport.c" +#line 2354 "RESTSupport.c" } -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp35_ = _entry_list; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp36_ = _entry_index; -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp37_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp36_); -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" entry = (gchar*) _tmp37_; -#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp38_ = builder; -#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp39_ = entry; -#line 240 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 255 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_string_append_printf (_tmp38_, "%s\n", _tmp39_); -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (entry); -#line 2225 "RESTSupport.c" +#line 2372 "RESTSupport.c" } -#line 239 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 254 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_entry_list); -#line 2229 "RESTSupport.c" +#line 2376 "RESTSupport.c" } } -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp40_ = builder; -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp41_ = _tmp40_->str; -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp42_ = g_strdup (_tmp41_); -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp42_; -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_string_free0 (builder); -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (list); -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (cert) { -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *cert = _vala_cert; -#line 2248 "RESTSupport.c" +#line 2395 "RESTSupport.c" } else { -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_vala_cert); -#line 2252 "RESTSupport.c" +#line 2399 "RESTSupport.c" } -#line 244 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 259 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2256 "RESTSupport.c" +#line 2403 "RESTSupport.c" } @@ -2274,33 +2421,33 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr guint8* _tmp45_; gint _tmp45__length1; GError * _inner_error_ = NULL; -#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 262 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 247 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 262 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (SOUP_IS_MESSAGE (message)); -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = message; -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp0_, "status-code", &_tmp1_, NULL); -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_; -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" switch (_tmp2_) { -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_OK: -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_CREATED: -#line 2286 "RESTSupport.c" +#line 2433 "RESTSupport.c" { -#line 252 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 267 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 2290 "RESTSupport.c" +#line 2437 "RESTSupport.c" } -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_CANT_RESOLVE: -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_CANT_RESOLVE_PROXY: -#line 2296 "RESTSupport.c" +#line 2443 "RESTSupport.c" { gchar* _tmp3_; gchar* _tmp4_; @@ -2309,46 +2456,46 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr guint _tmp7_; GError* _tmp8_; GError* _tmp9_; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = _tmp3_; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = message; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp5_, "status-code", &_tmp6_, NULL); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _tmp6_; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to resolve %s (error code %u)", _tmp4_, _tmp7_); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = _tmp8_; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp4_); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp9_; -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2329 "RESTSupport.c" +#line 2476 "RESTSupport.c" } else { -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 256 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 271 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2337 "RESTSupport.c" +#line 2484 "RESTSupport.c" } } -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_CANT_CONNECT: -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_CANT_CONNECT_PROXY: -#line 2344 "RESTSupport.c" +#line 2491 "RESTSupport.c" { gchar* _tmp10_; gchar* _tmp11_; @@ -2357,76 +2504,76 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr guint _tmp14_; GError* _tmp15_; GError* _tmp16_; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = _tmp10_; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = message; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp12_, "status-code", &_tmp13_, NULL); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = _tmp13_; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to connect to %s (error code %u)", _tmp11_, _tmp14_); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = _tmp15_; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp11_); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp16_; -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2377 "RESTSupport.c" +#line 2524 "RESTSupport.c" } else { -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 261 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 276 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2385 "RESTSupport.c" +#line 2532 "RESTSupport.c" } } -#line 248 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 263 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" case SOUP_STATUS_SSL_FAILED: -#line 2390 "RESTSupport.c" +#line 2537 "RESTSupport.c" { gchar* _tmp17_; gchar* _tmp18_; GError* _tmp19_; GError* _tmp20_; -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = _tmp17_; -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SSL_FAILED, "Unable to connect to %s: Secure connection failed", _tmp18_); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = _tmp19_; -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp18_); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp20_; -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2414 "RESTSupport.c" +#line 2561 "RESTSupport.c" } else { -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 264 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2422 "RESTSupport.c" +#line 2569 "RESTSupport.c" } } default: @@ -2434,15 +2581,15 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr SoupMessage* _tmp21_; guint _tmp22_; guint _tmp23_; -#line 269 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = message; -#line 269 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp21_, "status-code", &_tmp22_, NULL); -#line 269 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = _tmp22_; -#line 269 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp23_ >= ((guint) 100)) { -#line 2438 "RESTSupport.c" +#line 2585 "RESTSupport.c" gchar* _tmp24_; gchar* _tmp25_; SoupMessage* _tmp26_; @@ -2454,49 +2601,49 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr gchar* _tmp32_; GError* _tmp33_; GError* _tmp34_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = _tmp24_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp26_ = message; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp26_, "status-code", &_tmp27_, NULL); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp28_ = _tmp27_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp29_ = message; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp29_, "reason-phrase", &_tmp30_, NULL); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp31_ = _tmp30_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp32_ = _tmp31_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Service %s returned HTTP status code %u %s", _tmp25_, _tmp28_, _tmp32_); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp34_ = _tmp33_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp32_); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp25_); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp34_; -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2484 "RESTSupport.c" +#line 2631 "RESTSupport.c" } else { -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 270 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2492 "RESTSupport.c" +#line 2639 "RESTSupport.c" } } else { gchar* _tmp35_; @@ -2506,107 +2653,107 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr guint _tmp39_; GError* _tmp40_; GError* _tmp41_; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp35_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp36_ = _tmp35_; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp37_ = message; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp37_, "status-code", &_tmp38_, NULL); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp39_ = _tmp38_; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp40_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Failure communicating with %s (error code %u)", _tmp36_, _tmp39_); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp41_ = _tmp40_; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp36_); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp41_; -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2526 "RESTSupport.c" +#line 2673 "RESTSupport.c" } else { -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 273 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2534 "RESTSupport.c" +#line 2681 "RESTSupport.c" } } } } -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp43_ = message; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp44_ = _tmp43_->response_body; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp45_ = _tmp44_->data; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp45__length1 = (gint) _tmp44_->length; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp45_ == NULL) { -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp42_ = TRUE; -#line 2551 "RESTSupport.c" +#line 2698 "RESTSupport.c" } else { SoupMessage* _tmp46_; SoupMessageBody* _tmp47_; guint8* _tmp48_; gint _tmp48__length1; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp46_ = message; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp47_ = _tmp46_->response_body; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp48_ = _tmp47_->data; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp48__length1 = (gint) _tmp47_->length; -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp42_ = _tmp48__length1 == 0; -#line 2567 "RESTSupport.c" +#line 2714 "RESTSupport.c" } -#line 279 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 294 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp42_) { -#line 2571 "RESTSupport.c" +#line 2718 "RESTSupport.c" gchar* _tmp49_; gchar* _tmp50_; GError* _tmp51_; GError* _tmp52_; -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp49_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp50_ = _tmp49_; -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp51_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "No response data from %s", _tmp50_); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp52_ = _tmp51_; -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp50_); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp52_; -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2594 "RESTSupport.c" +#line 2741 "RESTSupport.c" } else { -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 280 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 295 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2602 "RESTSupport.c" +#line 2749 "RESTSupport.c" } } } @@ -2615,21 +2762,21 @@ void publishing_rest_support_transaction_check_response (PublishingRESTSupportTr static PublishingRESTSupportArgument** _vala_array_dup1 (PublishingRESTSupportArgument** self, int length) { PublishingRESTSupportArgument** result; int i; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = g_new0 (PublishingRESTSupportArgument*, length + 1); -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" for (i = 0; i < length; i++) { -#line 2615 "RESTSupport.c" +#line 2762 "RESTSupport.c" PublishingRESTSupportArgument* _tmp0_; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = _publishing_rest_support_argument_ref0 (self[i]); -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result[i] = _tmp0_; -#line 2621 "RESTSupport.c" +#line 2768 "RESTSupport.c" } -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2625 "RESTSupport.c" +#line 2772 "RESTSupport.c" } @@ -2641,31 +2788,31 @@ PublishingRESTSupportArgument** publishing_rest_support_transaction_get_argument gint _tmp1__length1; PublishingRESTSupportArgument** _tmp2_; gint _tmp2__length1; -#line 284 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 299 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->arguments; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = self->priv->arguments_length1; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1__length1 = _tmp0__length1; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2__length1 = _tmp1__length1; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (result_length1) { -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *result_length1 = _tmp2__length1; -#line 2655 "RESTSupport.c" +#line 2802 "RESTSupport.c" } -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp2_; -#line 285 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 300 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2661 "RESTSupport.c" +#line 2808 "RESTSupport.c" } @@ -2681,56 +2828,56 @@ PublishingRESTSupportArgument** publishing_rest_support_transaction_get_sorted_a gint _tmp5__length1; PublishingRESTSupportArgument** _tmp6_; gint _tmp6__length1; -#line 288 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 303 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = publishing_rest_support_transaction_get_arguments (self, &_tmp0_); -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2__length1 = _tmp0_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = publishing_rest_support_argument_sort (_tmp2_, _tmp0_, &_tmp3_); -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _tmp4_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5__length1 = _tmp3_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6__length1 = _tmp5__length1; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (result_length1) { -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *result_length1 = _tmp6__length1; -#line 2701 "RESTSupport.c" +#line 2848 "RESTSupport.c" } -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp6_; -#line 289 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2707 "RESTSupport.c" +#line 2854 "RESTSupport.c" } void publishing_rest_support_transaction_set_is_executed (PublishingRESTSupportTransaction* self, gboolean is_executed) { gboolean _tmp0_; -#line 292 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 307 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 293 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 308 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = is_executed; -#line 293 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 308 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->is_executed = _tmp0_; -#line 2719 "RESTSupport.c" +#line 2866 "RESTSupport.c" } static void _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued (PublishingRESTSupportSession* _sender, SoupMessage* message, gpointer self) { -#line 297 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_on_message_unqueued ((PublishingRESTSupportTransaction*) self, message); -#line 2726 "RESTSupport.c" +#line 2873 "RESTSupport.c" } @@ -2746,78 +2893,78 @@ void publishing_rest_support_transaction_send (PublishingRESTSupportTransaction* GError* _tmp8_; GError* _tmp10_; GError * _inner_error_ = NULL; -#line 296 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 311 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 297 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->parent_session; -#line 297 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 312 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_connect (_tmp0_, "wire-message-unqueued", (GCallback) _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued, self); -#line 298 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 313 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->message; -#line 298 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 313 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_connect (_tmp1_, "wrote-body-data", (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self); -#line 299 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = self->priv->parent_session; -#line 299 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = self->priv->message; -#line 299 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_session_send_wire_message (_tmp2_, _tmp3_); -#line 301 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = self->priv->parent_session; -#line 301 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_parse_name ("wire-message-unqueued", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp5_, NULL, FALSE); -#line 301 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 316 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_rest_support_transaction_on_message_unqueued_publishing_rest_support_session_wire_message_unqueued, self); -#line 302 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = self->priv->message; -#line 302 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_parse_name ("wrote-body-data", soup_message_get_type (), &_tmp7_, NULL, FALSE); -#line 302 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _publishing_rest_support_transaction_on_wrote_body_data_soup_message_wrote_body_data, self); -#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 319 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = self->priv->err; -#line 304 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 319 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp8_ != NULL) { -#line 2774 "RESTSupport.c" +#line 2921 "RESTSupport.c" GError* _tmp9_; -#line 305 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = self->priv->err; -#line 305 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 320 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_NETWORK_ERROR_SIGNAL], 0, _tmp9_); -#line 2780 "RESTSupport.c" +#line 2927 "RESTSupport.c" } else { -#line 307 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 322 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_COMPLETED_SIGNAL], 0); -#line 2784 "RESTSupport.c" +#line 2931 "RESTSupport.c" } -#line 309 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = self->priv->err; -#line 309 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 324 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp10_ != NULL) { -#line 2790 "RESTSupport.c" +#line 2937 "RESTSupport.c" GError* _tmp11_; GError* _tmp12_; -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = self->priv->err; -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = _g_error_copy0 (_tmp11_); -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp12_; -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2805 "RESTSupport.c" +#line 2952 "RESTSupport.c" } else { -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 310 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 325 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2813 "RESTSupport.c" +#line 2960 "RESTSupport.c" } } } @@ -2831,27 +2978,27 @@ PublishingRESTSupportHttpMethod publishing_rest_support_transaction_get_method ( gchar* _tmp3_; PublishingRESTSupportHttpMethod _tmp4_; PublishingRESTSupportHttpMethod _tmp5_; -#line 313 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 328 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), 0); -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->message; -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp0_, "method", &_tmp1_, NULL); -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_; -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _tmp2_; -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = publishing_rest_support_http_method_from_string (_tmp3_); -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _tmp4_; -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp3_); -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp5_; -#line 314 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2847 "RESTSupport.c" +#line 2994 "RESTSupport.c" } @@ -2860,30 +3007,30 @@ static void publishing_rest_support_transaction_real_add_header (PublishingRESTS SoupMessageHeaders* _tmp1_; const gchar* _tmp2_; const gchar* _tmp3_; -#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (key != NULL); -#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (value != NULL); -#line 318 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->message; -#line 318 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _tmp0_->request_headers; -#line 318 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = key; -#line 318 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = value; -#line 318 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_headers_append (_tmp1_, _tmp2_, _tmp3_); -#line 2870 "RESTSupport.c" +#line 3017 "RESTSupport.c" } void publishing_rest_support_transaction_add_header (PublishingRESTSupportTransaction* self, const gchar* key, const gchar* value) { -#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 317 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 332 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->add_header (self, key, value); -#line 2879 "RESTSupport.c" +#line 3026 "RESTSupport.c" } @@ -2901,104 +3048,104 @@ void publishing_rest_support_transaction_set_custom_payload (PublishingRESTSuppo guint8* _tmp12_; gint _tmp12__length1; gulong _tmp13_; -#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 329 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 344 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (payload_content_type != NULL); -#line 331 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 346 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_transaction_get_method (self); -#line 331 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 346 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_ != PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, "get_method() != HttpMethod.GET"); -#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 348 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = custom_payload; -#line 333 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 348 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp1_ == NULL) { -#line 334 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->use_custom_payload = FALSE; -#line 335 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 2913 "RESTSupport.c" +#line 3060 "RESTSupport.c" } -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = payload_length; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp3_ > ((gulong) 0)) { -#line 2919 "RESTSupport.c" +#line 3066 "RESTSupport.c" gulong _tmp4_; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = payload_length; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp4_; -#line 2925 "RESTSupport.c" +#line 3072 "RESTSupport.c" } else { const gchar* _tmp5_; gint _tmp6_; gint _tmp7_; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = custom_payload; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = strlen (_tmp5_); -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _tmp6_; -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = (gulong) _tmp7_; -#line 2938 "RESTSupport.c" +#line 3085 "RESTSupport.c" } -#line 338 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" length = _tmp2_; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = self->priv->message; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = payload_content_type; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = custom_payload; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = string_get_data (_tmp10_, &_tmp11__length1); -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = _tmp11_; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12__length1 = _tmp11__length1; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = length; -#line 339 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_set_request (_tmp8_, _tmp9_, SOUP_MEMORY_COPY, _tmp12_ + 0, (gsize) (((gint) _tmp13_) - 0)); -#line 341 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 356 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->use_custom_payload = TRUE; -#line 2960 "RESTSupport.c" +#line 3107 "RESTSupport.c" } void publishing_rest_support_transaction_set_message (PublishingRESTSupportTransaction* self, SoupMessage* message) { SoupMessage* _tmp0_; SoupMessage* _tmp1_; -#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 349 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 364 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (SOUP_IS_MESSAGE (message)); -#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = message; -#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->message); -#line 350 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 365 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->message = _tmp1_; -#line 2979 "RESTSupport.c" +#line 3126 "RESTSupport.c" } gboolean publishing_rest_support_transaction_get_is_executed (PublishingRESTSupportTransaction* self) { gboolean result = FALSE; gboolean _tmp0_; -#line 353 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), FALSE); -#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->is_executed; -#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp0_; -#line 354 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 369 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 2994 "RESTSupport.c" +#line 3141 "RESTSupport.c" } @@ -3008,30 +3155,30 @@ guint publishing_rest_support_transaction_get_status_code (PublishingRESTSupport SoupMessage* _tmp1_; guint _tmp2_; guint _tmp3_; -#line 357 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 372 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), 0U); -#line 358 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 373 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_transaction_get_is_executed (self); -#line 358 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 373 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_, "get_is_executed()"); -#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->message; -#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_object_get (_tmp1_, "status-code", &_tmp2_, NULL); -#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _tmp2_; -#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp3_; -#line 359 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3020 "RESTSupport.c" +#line 3167 "RESTSupport.c" } static void _vala_SoupURI_free (SoupURI* self) { -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_boxed_free (soup_uri_get_type (), self); -#line 3027 "RESTSupport.c" +#line 3174 "RESTSupport.c" } @@ -3045,69 +3192,69 @@ static void publishing_rest_support_transaction_real_execute (PublishingRESTSupp gboolean _tmp19_ = FALSE; PublishingRESTSupportHttpMethod _tmp20_; GError * _inner_error_ = NULL; -#line 366 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->use_custom_payload; -#line 366 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp0_) { -#line 367 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->is_executed = TRUE; -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_send (self, &_inner_error_); -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 3057 "RESTSupport.c" +#line 3204 "RESTSupport.c" } else { -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 368 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 383 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 3065 "RESTSupport.c" +#line 3212 "RESTSupport.c" } } -#line 370 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 385 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 3070 "RESTSupport.c" +#line 3217 "RESTSupport.c" } -#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = publishing_rest_support_transaction_get_method (self); -#line 374 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp1_ == PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST) { -#line 3076 "RESTSupport.c" +#line 3223 "RESTSupport.c" PublishingRESTSupportArgument** _tmp2_; gint _tmp2__length1; -#line 375 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = self->priv->arguments; -#line 375 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2__length1 = self->priv->arguments_length1; -#line 375 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp2__length1 > 0, "arguments.length > 0"); -#line 3085 "RESTSupport.c" +#line 3232 "RESTSupport.c" } -#line 378 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = g_strdup (""); -#line 378 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" formdata_string = _tmp3_; -#line 3091 "RESTSupport.c" +#line 3238 "RESTSupport.c" { gint i = 0; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" i = 0; -#line 3096 "RESTSupport.c" +#line 3243 "RESTSupport.c" { gboolean _tmp4_ = FALSE; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = TRUE; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 3103 "RESTSupport.c" +#line 3250 "RESTSupport.c" gint _tmp6_; PublishingRESTSupportArgument** _tmp7_; gint _tmp7__length1; @@ -3122,102 +3269,102 @@ static void publishing_rest_support_transaction_real_execute (PublishingRESTSupp gint _tmp15_; PublishingRESTSupportArgument** _tmp16_; gint _tmp16__length1; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!_tmp4_) { -#line 3120 "RESTSupport.c" +#line 3267 "RESTSupport.c" gint _tmp5_; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = i; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" i = _tmp5_ + 1; -#line 3126 "RESTSupport.c" +#line 3273 "RESTSupport.c" } -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = FALSE; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = i; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = self->priv->arguments; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7__length1 = self->priv->arguments_length1; -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!(_tmp6_ < _tmp7__length1)) { -#line 379 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 394 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 3140 "RESTSupport.c" +#line 3287 "RESTSupport.c" } -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = formdata_string; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = self->priv->arguments; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9__length1 = self->priv->arguments_length1; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = i; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = _tmp9_[_tmp10_]; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - _tmp12_ = publishing_rest_support_argument_to_string (_tmp11_); -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + _tmp12_ = publishing_rest_support_argument_to_string (_tmp11_, FALSE); +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = _tmp12_; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = g_strconcat (_tmp8_, _tmp13_, NULL); -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (formdata_string); -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" formdata_string = _tmp14_; -#line 380 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp13_); -#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = i; -#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = self->priv->arguments; -#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16__length1 = self->priv->arguments_length1; -#line 381 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 396 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp15_ < (_tmp16__length1 - 1)) { -#line 3172 "RESTSupport.c" +#line 3319 "RESTSupport.c" const gchar* _tmp17_; gchar* _tmp18_; -#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = formdata_string; -#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = g_strconcat (_tmp17_, "&", NULL); -#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (formdata_string); -#line 382 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 397 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" formdata_string = _tmp18_; -#line 3183 "RESTSupport.c" +#line 3330 "RESTSupport.c" } } } } -#line 388 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old_url = NULL; -#line 389 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 404 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" url_with_query = NULL; -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = publishing_rest_support_transaction_get_method (self); -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp20_ == PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET) { -#line 3196 "RESTSupport.c" +#line 3343 "RESTSupport.c" PublishingRESTSupportArgument** _tmp21_; gint _tmp21__length1; -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = self->priv->arguments; -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21__length1 = self->priv->arguments_length1; -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = _tmp21__length1 > 0; -#line 3205 "RESTSupport.c" +#line 3352 "RESTSupport.c" } else { -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = FALSE; -#line 3209 "RESTSupport.c" +#line 3356 "RESTSupport.c" } -#line 390 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 405 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp19_) { -#line 3213 "RESTSupport.c" +#line 3360 "RESTSupport.c" SoupMessage* _tmp22_; SoupURI* _tmp23_; gchar* _tmp24_; @@ -3231,49 +3378,49 @@ static void publishing_rest_support_transaction_real_execute (PublishingRESTSupp const gchar* _tmp32_; SoupURI* _tmp33_; SoupURI* _tmp34_; -#line 391 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = self->priv->message; -#line 391 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = soup_message_get_uri (_tmp22_); -#line 391 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = soup_uri_to_string (_tmp23_, FALSE); -#line 391 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (old_url); -#line 391 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old_url = _tmp24_; -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = publishing_rest_support_transaction_get_endpoint_url (self); -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp26_ = _tmp25_; -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp27_ = g_strconcat (_tmp26_, "?", NULL); -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp28_ = _tmp27_; -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp29_ = formdata_string; -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp30_ = g_strconcat (_tmp28_, _tmp29_, NULL); -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (url_with_query); -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" url_with_query = _tmp30_; -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp28_); -#line 392 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp26_); -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp31_ = self->priv->message; -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp32_ = url_with_query; -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33_ = soup_uri_new (_tmp32_); -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp34_ = _tmp33_; -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_set_uri (_tmp31_, _tmp34_); -#line 393 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 408 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupURI_free0 (_tmp34_); -#line 3269 "RESTSupport.c" +#line 3416 "RESTSupport.c" } else { SoupMessage* _tmp35_; const gchar* _tmp36_; @@ -3281,122 +3428,122 @@ static void publishing_rest_support_transaction_real_execute (PublishingRESTSupp gint _tmp37__length1; guint8* _tmp38_; gint _tmp38__length1; -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp35_ = self->priv->message; -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp36_ = formdata_string; -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp37_ = string_get_data (_tmp36_, &_tmp37__length1); -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp38_ = _tmp37_; -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp38__length1 = _tmp37__length1; -#line 395 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 410 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_set_request (_tmp35_, "application/x-www-form-urlencoded", SOUP_MEMORY_COPY, _tmp38_, (gsize) _tmp38__length1); -#line 3289 "RESTSupport.c" +#line 3436 "RESTSupport.c" } -#line 399 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 414 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->is_executed = TRUE; -#line 3293 "RESTSupport.c" +#line 3440 "RESTSupport.c" { SoupMessage* _tmp39_; SoupURI* _tmp40_; gchar* _tmp41_; gchar* _tmp42_; -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp39_ = self->priv->message; -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp40_ = soup_message_get_uri (_tmp39_); -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp41_ = soup_uri_to_string (_tmp40_, FALSE); -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp42_ = _tmp41_; -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - g_debug ("RESTSupport.vala:402: sending message to URI = '%s'", _tmp42_); -#line 402 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_debug ("RESTSupport.vala:417: sending message to URI = '%s'", _tmp42_); +#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp42_); -#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_send (self, &_inner_error_); -#line 403 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 3315 "RESTSupport.c" +#line 3462 "RESTSupport.c" goto __finally1; } } __finally1: { const gchar* _tmp43_; -#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 421 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp43_ = old_url; -#line 406 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 421 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp43_ != NULL) { -#line 3326 "RESTSupport.c" +#line 3473 "RESTSupport.c" SoupMessage* _tmp44_; const gchar* _tmp45_; SoupURI* _tmp46_; SoupURI* _tmp47_; -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp44_ = self->priv->message; -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp45_ = old_url; -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp46_ = soup_uri_new (_tmp45_); -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp47_ = _tmp46_; -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_set_uri (_tmp44_, _tmp47_); -#line 407 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupURI_free0 (_tmp47_); -#line 3343 "RESTSupport.c" +#line 3490 "RESTSupport.c" } } -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (url_with_query); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (old_url); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (formdata_string); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 3360 "RESTSupport.c" +#line 3507 "RESTSupport.c" } else { -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (url_with_query); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (old_url); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (formdata_string); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 401 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 3374 "RESTSupport.c" +#line 3521 "RESTSupport.c" } } -#line 362 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (url_with_query); -#line 362 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (old_url); -#line 362 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (formdata_string); -#line 3383 "RESTSupport.c" +#line 3530 "RESTSupport.c" } void publishing_rest_support_transaction_execute (PublishingRESTSupportTransaction* self, GError** error) { -#line 362 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 362 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 377 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->execute (self, error); -#line 3392 "RESTSupport.c" +#line 3539 "RESTSupport.c" } @@ -3408,27 +3555,27 @@ gchar* publishing_rest_support_transaction_get_response (PublishingRESTSupportTr guint8* _tmp3_; gint _tmp3__length1; gchar* _tmp4_; -#line 411 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 426 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 412 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_transaction_get_is_executed (self); -#line 412 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_, "get_is_executed()"); -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->message; -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_->response_body; -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _tmp2_->data; -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3__length1 = (gint) _tmp2_->length; -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = g_strdup ((const gchar*) _tmp3_); -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp4_; -#line 413 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 428 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3424 "RESTSupport.c" +#line 3571 "RESTSupport.c" } @@ -3437,21 +3584,21 @@ SoupMessageHeaders* publishing_rest_support_transaction_get_response_headers (Pu gboolean _tmp0_; SoupMessage* _tmp1_; SoupMessageHeaders* _tmp2_; -#line 416 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 432 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_transaction_get_is_executed (self); -#line 417 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 432 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_, "get_is_executed()"); -#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->message; -#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp1_->response_headers; -#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp2_; -#line 418 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 433 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3447 "RESTSupport.c" +#line 3594 "RESTSupport.c" } @@ -3460,38 +3607,38 @@ SoupMessage* publishing_rest_support_transaction_get_message (PublishingRESTSupp gboolean _tmp0_; SoupMessage* _tmp1_; SoupMessage* _tmp2_; -#line 421 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 436 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_transaction_get_is_executed (self); -#line 422 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 437 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_, "get_is_executed()"); -#line 423 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->message; -#line 423 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _g_object_ref0 (_tmp1_); -#line 423 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp2_; -#line 423 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 438 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3470 "RESTSupport.c" +#line 3617 "RESTSupport.c" } static void _vala_array_add1 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if ((*length) == (*size)) { -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 3481 "RESTSupport.c" +#line 3628 "RESTSupport.c" } -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" (*array)[(*length)++] = value; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" (*array)[*length] = NULL; -#line 3487 "RESTSupport.c" +#line 3634 "RESTSupport.c" } @@ -3501,25 +3648,25 @@ void publishing_rest_support_transaction_add_argument (PublishingRESTSupportTran const gchar* _tmp1_; const gchar* _tmp2_; PublishingRESTSupportArgument* _tmp3_; -#line 426 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self)); -#line 426 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (name != NULL); -#line 426 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (value != NULL); -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->arguments; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = self->priv->arguments_length1; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = name; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = value; -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = publishing_rest_support_argument_new (_tmp1_, _tmp2_); -#line 427 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_array_add1 (&self->priv->arguments, &self->priv->arguments_length1, &self->priv->_arguments_size_, _tmp3_); -#line 3515 "RESTSupport.c" +#line 3662 "RESTSupport.c" } @@ -3527,49 +3674,49 @@ gchar* publishing_rest_support_transaction_get_endpoint_url (PublishingRESTSuppo gchar* result = NULL; gchar* _tmp0_ = NULL; const gchar* _tmp1_; -#line 430 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->endpoint_url; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp1_ != NULL) { -#line 3529 "RESTSupport.c" +#line 3676 "RESTSupport.c" const gchar* _tmp2_; gchar* _tmp3_; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = self->priv->endpoint_url; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = g_strdup (_tmp2_); -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp0_); -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = _tmp3_; -#line 3540 "RESTSupport.c" +#line 3687 "RESTSupport.c" } else { PublishingRESTSupportSession* _tmp4_; gchar* _tmp5_; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = self->priv->parent_session; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = publishing_rest_support_session_get_endpoint_url (_tmp4_); -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp0_); -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = _tmp5_; -#line 3552 "RESTSupport.c" +#line 3699 "RESTSupport.c" } -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp0_; -#line 431 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3558 "RESTSupport.c" +#line 3705 "RESTSupport.c" } static gpointer _publishing_rest_support_session_ref0 (gpointer self) { -#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self ? publishing_rest_support_session_ref (self) : NULL; -#line 3565 "RESTSupport.c" +#line 3712 "RESTSupport.c" } @@ -3577,17 +3724,17 @@ PublishingRESTSupportSession* publishing_rest_support_transaction_get_parent_ses PublishingRESTSupportSession* result = NULL; PublishingRESTSupportSession* _tmp0_; PublishingRESTSupportSession* _tmp1_; -#line 434 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 449 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (self), NULL); -#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->parent_session; -#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _publishing_rest_support_session_ref0 (_tmp0_); -#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 435 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 3583 "RESTSupport.c" +#line 3730 "RESTSupport.c" } @@ -3598,267 +3745,267 @@ static void g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure, GValue * register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (n_param_values == 3); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" data1 = closure->data; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" data2 = param_values->data[0].v_pointer; -#line 3602 "RESTSupport.c" +#line 3749 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" data1 = param_values->data[0].v_pointer; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" data2 = closure->data; -#line 3608 "RESTSupport.c" +#line 3755 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), data2); -#line 3614 "RESTSupport.c" +#line 3761 "RESTSupport.c" } static void publishing_rest_support_value_transaction_init (GValue* value) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 3621 "RESTSupport.c" +#line 3768 "RESTSupport.c" } static void publishing_rest_support_value_transaction_free_value (GValue* value) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (value->data[0].v_pointer) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_unref (value->data[0].v_pointer); -#line 3630 "RESTSupport.c" +#line 3777 "RESTSupport.c" } } static void publishing_rest_support_value_transaction_copy_value (const GValue* src_value, GValue* dest_value) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (src_value->data[0].v_pointer) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = publishing_rest_support_transaction_ref (src_value->data[0].v_pointer); -#line 3640 "RESTSupport.c" +#line 3787 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = NULL; -#line 3644 "RESTSupport.c" +#line 3791 "RESTSupport.c" } } static gpointer publishing_rest_support_value_transaction_peek_pointer (const GValue* value) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 3652 "RESTSupport.c" +#line 3799 "RESTSupport.c" } static gchar* publishing_rest_support_value_transaction_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (collect_values[0].v_pointer) { -#line 3659 "RESTSupport.c" +#line 3806 "RESTSupport.c" PublishingRESTSupportTransaction * object; object = collect_values[0].v_pointer; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (object->parent_instance.g_class == NULL) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3666 "RESTSupport.c" +#line 3813 "RESTSupport.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3670 "RESTSupport.c" +#line 3817 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = publishing_rest_support_transaction_ref (object); -#line 3674 "RESTSupport.c" +#line 3821 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 3678 "RESTSupport.c" +#line 3825 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 3682 "RESTSupport.c" +#line 3829 "RESTSupport.c" } static gchar* publishing_rest_support_value_transaction_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingRESTSupportTransaction ** object_p; object_p = collect_values[0].v_pointer; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!object_p) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 3693 "RESTSupport.c" +#line 3840 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!value->data[0].v_pointer) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = NULL; -#line 3699 "RESTSupport.c" +#line 3846 "RESTSupport.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = value->data[0].v_pointer; -#line 3703 "RESTSupport.c" +#line 3850 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = publishing_rest_support_transaction_ref (value->data[0].v_pointer); -#line 3707 "RESTSupport.c" +#line 3854 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 3711 "RESTSupport.c" +#line 3858 "RESTSupport.c" } GParamSpec* publishing_rest_support_param_spec_transaction (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingRESTSupportParamSpecTransaction* spec; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION), NULL); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return G_PARAM_SPEC (spec); -#line 3725 "RESTSupport.c" +#line 3872 "RESTSupport.c" } gpointer publishing_rest_support_value_get_transaction (const GValue* value) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION), NULL); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 3734 "RESTSupport.c" +#line 3881 "RESTSupport.c" } void publishing_rest_support_value_set_transaction (GValue* value, gpointer v_object) { PublishingRESTSupportTransaction * old; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_ref (value->data[0].v_pointer); -#line 3754 "RESTSupport.c" +#line 3901 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 3758 "RESTSupport.c" +#line 3905 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_unref (old); -#line 3764 "RESTSupport.c" +#line 3911 "RESTSupport.c" } } void publishing_rest_support_value_take_transaction (GValue* value, gpointer v_object) { PublishingRESTSupportTransaction * old; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION)); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 3783 "RESTSupport.c" +#line 3930 "RESTSupport.c" } else { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 3787 "RESTSupport.c" +#line 3934 "RESTSupport.c" } -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_unref (old); -#line 3793 "RESTSupport.c" +#line 3940 "RESTSupport.c" } } static void publishing_rest_support_transaction_class_init (PublishingRESTSupportTransactionClass * klass) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_parent_class = g_type_class_peek_parent (klass); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_transaction_finalize; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_class_add_private (klass, sizeof (PublishingRESTSupportTransactionPrivate)); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->add_header = (void (*) (PublishingRESTSupportTransaction *, const gchar*, const gchar*)) publishing_rest_support_transaction_real_add_header; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_rest_support_transaction_real_execute; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_CHUNK_TRANSMITTED_SIGNAL] = g_signal_new ("chunk-transmitted", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_NETWORK_ERROR_SIGNAL] = g_signal_new ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_signals[PUBLISHING_REST_SUPPORT_TRANSACTION_COMPLETED_SIGNAL] = g_signal_new ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 3815 "RESTSupport.c" +#line 3962 "RESTSupport.c" } static void publishing_rest_support_transaction_instance_init (PublishingRESTSupportTransaction * self) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv = PUBLISHING_REST_SUPPORT_TRANSACTION_GET_PRIVATE (self); -#line 146 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 160 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->is_executed = FALSE; -#line 147 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 161 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->parent_session = NULL; -#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 162 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->message = NULL; -#line 149 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 163 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->bytes_written = 0; -#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->err = NULL; -#line 151 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->endpoint_url = NULL; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->ref_count = 1; -#line 3836 "RESTSupport.c" +#line 3983 "RESTSupport.c" } static void publishing_rest_support_transaction_finalize (PublishingRESTSupportTransaction * obj) { PublishingRESTSupportTransaction * self; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_destroy (self); -#line 145 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 159 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->arguments = (_vala_array_free (self->priv->arguments, self->priv->arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 148 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 162 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->message); -#line 150 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 164 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_error_free0 (self->priv->err); -#line 151 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 165 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->priv->endpoint_url); -#line 3854 "RESTSupport.c" +#line 4001 "RESTSupport.c" } @@ -3879,24 +4026,24 @@ GType publishing_rest_support_transaction_get_type (void) { gpointer publishing_rest_support_transaction_ref (gpointer instance) { PublishingRESTSupportTransaction * self; self = instance; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_atomic_int_inc (&self->ref_count); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return instance; -#line 3879 "RESTSupport.c" +#line 4026 "RESTSupport.c" } void publishing_rest_support_transaction_unref (gpointer instance) { PublishingRESTSupportTransaction * self; self = instance; -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_GET_CLASS (self)->finalize (self); -#line 144 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 158 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_free_instance ((GTypeInstance *) self); -#line 3892 "RESTSupport.c" +#line 4039 "RESTSupport.c" } } @@ -3911,54 +4058,54 @@ PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transacti gchar* _tmp5_; GHashTable* _tmp6_; GeeHashMap* _tmp7_; -#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL); -#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = session; -#line 446 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); -#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = publishable; -#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _g_object_ref0 (_tmp1_); -#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->publishable); -#line 447 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 462 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->publishable = _tmp2_; -#line 448 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = publishable; -#line 448 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = spit_publishing_publishable_get_media_type (_tmp3_); -#line 448 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (_tmp4_); -#line 448 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->mime_type); -#line 448 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->mime_type = _tmp5_; -#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self); -#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_hash_table_unref0 (self->binary_disposition_table); -#line 450 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 465 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->binary_disposition_table = _tmp6_; -#line 452 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 452 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->message_headers); -#line 452 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->message_headers = _tmp7_; -#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 3947 "RESTSupport.c" +#line 4094 "RESTSupport.c" } PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new (PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable) { -#line 445 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 460 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_upload_transaction_construct (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, session, publishable); -#line 3954 "RESTSupport.c" +#line 4101 "RESTSupport.c" } @@ -3973,58 +4120,58 @@ PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transacti gchar* _tmp6_; GHashTable* _tmp7_; GeeHashMap* _tmp8_; -#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL); -#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (endpoint_url != NULL, NULL); -#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = session; -#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = endpoint_url; -#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportUploadTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, _tmp0_, _tmp1_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); -#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = publishable; -#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _g_object_ref0 (_tmp2_); -#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->publishable); -#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->publishable = _tmp3_; -#line 459 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = publishable; -#line 459 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = spit_publishing_publishable_get_media_type (_tmp4_); -#line 459 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = publishing_rest_support_upload_transaction_media_type_to_mime_type (_tmp5_); -#line 459 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->mime_type); -#line 459 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->mime_type = _tmp6_; -#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = publishing_rest_support_upload_transaction_create_default_binary_disposition_table (self); -#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_hash_table_unref0 (self->binary_disposition_table); -#line 461 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->binary_disposition_table = _tmp7_; -#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->message_headers); -#line 463 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 478 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->message_headers = _tmp8_; -#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 4013 "RESTSupport.c" +#line 4160 "RESTSupport.c" } PublishingRESTSupportUploadTransaction* publishing_rest_support_upload_transaction_new_with_endpoint_url (PublishingRESTSupportSession* session, SpitPublishingPublishable* publishable, const gchar* endpoint_url) { -#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 470 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_upload_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, session, publishable, endpoint_url); -#line 4020 "RESTSupport.c" +#line 4167 "RESTSupport.c" } @@ -4033,74 +4180,74 @@ static void publishing_rest_support_upload_transaction_real_add_header (Publishi GeeHashMap* _tmp0_; const gchar* _tmp1_; const gchar* _tmp2_; -#line 466 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction); -#line 466 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (key != NULL); -#line 466 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 481 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (value != NULL); -#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->message_headers; -#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = key; -#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = value; -#line 467 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 482 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, _tmp2_); -#line 4043 "RESTSupport.c" +#line 4190 "RESTSupport.c" } static gchar* publishing_rest_support_upload_transaction_media_type_to_mime_type (SpitPublishingPublisherMediaType media_type) { gchar* result = NULL; SpitPublishingPublisherMediaType _tmp0_; -#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 486 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = media_type; -#line 471 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 486 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp0_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) { -#line 4054 "RESTSupport.c" +#line 4201 "RESTSupport.c" gchar* _tmp1_; -#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = g_strdup ("image/jpeg"); -#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 472 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 487 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4062 "RESTSupport.c" +#line 4209 "RESTSupport.c" } else { SpitPublishingPublisherMediaType _tmp2_; -#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 488 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = media_type; -#line 473 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 488 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp2_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { -#line 4069 "RESTSupport.c" +#line 4216 "RESTSupport.c" gchar* _tmp3_; -#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = g_strdup ("video/mpeg"); -#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp3_; -#line 474 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4077 "RESTSupport.c" +#line 4224 "RESTSupport.c" } else { SpitPublishingPublisherMediaType _tmp4_; GEnumValue* _tmp5_; -#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 491 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = media_type; -#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 491 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = g_enum_get_value (g_type_class_ref (SPIT_PUBLISHING_PUBLISHER_TYPE_MEDIA_TYPE), _tmp4_); -#line 476 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" - g_error ("RESTSupport.vala:476: UploadTransaction: unknown media type %s.", (_tmp5_ != NULL) ? _tmp5_->value_name : NULL); -#line 4087 "RESTSupport.c" +#line 491 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" + g_error ("RESTSupport.vala:491: UploadTransaction: unknown media type %s.", (_tmp5_ != NULL) ? _tmp5_->value_name : NULL); +#line 4234 "RESTSupport.c" } } } static void _g_free0_ (gpointer var) { -#line 480 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" var = (g_free (var), NULL); -#line 4096 "RESTSupport.c" +#line 4243 "RESTSupport.c" } @@ -4117,81 +4264,81 @@ static GHashTable* publishing_rest_support_upload_transaction_create_default_bin gchar* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; -#line 479 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION (self), NULL); -#line 480 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = g_str_hash; -#line 480 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = g_str_equal; -#line 480 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_); -#line 480 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _result_ = _tmp2_; -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = g_strdup ("filename"); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = self->publishable; -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = spit_publishing_publishable_get_serialized_file (_tmp4_); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_; -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = g_file_get_basename (_tmp6_); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = _tmp7_; -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = soup_uri_encode (_tmp8_, NULL); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_hash_table_insert (_result_, _tmp3_, _tmp9_); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp8_); -#line 483 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 498 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_tmp6_); -#line 486 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _result_; -#line 486 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 501 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4147 "RESTSupport.c" +#line 4294 "RESTSupport.c" } static gpointer _g_hash_table_ref0 (gpointer self) { -#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self ? g_hash_table_ref (self) : NULL; -#line 4154 "RESTSupport.c" +#line 4301 "RESTSupport.c" } void publishing_rest_support_upload_transaction_set_binary_disposition_table (PublishingRESTSupportUploadTransaction* self, GHashTable* new_disp_table) { GHashTable* _tmp0_; GHashTable* _tmp1_; -#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_UPLOAD_TRANSACTION (self)); -#line 489 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (new_disp_table != NULL); -#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = new_disp_table; -#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _g_hash_table_ref0 (_tmp0_); -#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_hash_table_unref0 (self->binary_disposition_table); -#line 490 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->binary_disposition_table = _tmp1_; -#line 4173 "RESTSupport.c" +#line 4320 "RESTSupport.c" } static void _vala_SoupMultipart_free (SoupMultipart* self) { -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_boxed_free (soup_multipart_get_type (), self); -#line 4180 "RESTSupport.c" +#line 4327 "RESTSupport.c" } static void _vala_SoupBuffer_free (SoupBuffer* self) { -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_boxed_free (soup_buffer_get_type (), self); -#line 4187 "RESTSupport.c" +#line 4334 "RESTSupport.c" } @@ -4251,71 +4398,71 @@ static void publishing_rest_support_upload_transaction_real_execute (PublishingR gboolean _tmp48_; SoupMessage* _tmp60_; GError * _inner_error_ = NULL; -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction); -#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = publishing_rest_support_transaction_get_arguments (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_tmp0_); -#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = _tmp1_; -#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments_length1 = _tmp0_; -#line 494 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 509 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _request_arguments_size_ = request_arguments_length1; -#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = request_arguments; -#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2__length1 = request_arguments_length1; -#line 495 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 510 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp2__length1 > 0, "request_arguments.length > 0"); -#line 497 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = soup_multipart_new ("multipart/form-data"); -#line 497 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" message_parts = _tmp3_; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = request_arguments; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4__length1 = request_arguments_length1; -#line 4271 "RESTSupport.c" +#line 4418 "RESTSupport.c" { PublishingRESTSupportArgument** arg_collection = NULL; gint arg_collection_length1 = 0; gint _arg_collection_size_ = 0; gint arg_it = 0; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg_collection = _tmp4_; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg_collection_length1 = _tmp4__length1; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" for (arg_it = 0; arg_it < _tmp4__length1; arg_it = arg_it + 1) { -#line 4283 "RESTSupport.c" +#line 4430 "RESTSupport.c" PublishingRESTSupportArgument* _tmp5_; PublishingRESTSupportArgument* arg = NULL; -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" arg = _tmp5_; -#line 4290 "RESTSupport.c" +#line 4437 "RESTSupport.c" { SoupMultipart* _tmp6_; PublishingRESTSupportArgument* _tmp7_; const gchar* _tmp8_; PublishingRESTSupportArgument* _tmp9_; const gchar* _tmp10_; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = message_parts; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = arg; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = _tmp7_->key; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = arg; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = _tmp9_->value; -#line 500 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_multipart_append_form_string (_tmp6_, _tmp8_, _tmp10_); -#line 499 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_argument_unref0 (arg); -#line 4311 "RESTSupport.c" +#line 4458 "RESTSupport.c" } } } @@ -4327,48 +4474,48 @@ static void publishing_rest_support_upload_transaction_real_execute (PublishingR gchar* _tmp15_; gchar* _tmp16_ = NULL; gsize _tmp17_ = 0UL; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = self->publishable; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = spit_publishing_publishable_get_serialized_file (_tmp11_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = _tmp12_; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = g_file_get_path (_tmp13_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = _tmp14_; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_file_get_contents (_tmp15_, &_tmp16_, &_tmp17_, &_inner_error_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" payload = _tmp16_; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" payload_length = _tmp17_; -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp15_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_tmp13_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == G_FILE_ERROR) { -#line 4349 "RESTSupport.c" +#line 4496 "RESTSupport.c" goto __catch2_g_file_error; } -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 505 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 4364 "RESTSupport.c" +#line 4511 "RESTSupport.c" } } goto __finally2; @@ -4376,138 +4523,138 @@ static void publishing_rest_support_upload_transaction_real_execute (PublishingR { GError* e = NULL; GError* _tmp18_; -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" e = _inner_error_; -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = NULL; -#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A temporary file needed for publishing is unavailable")); -#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp18_; -#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_error_free0 (e); -#line 4382 "RESTSupport.c" +#line 4529 "RESTSupport.c" goto __finally2; } __finally2: -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 4400 "RESTSupport.c" +#line 4547 "RESTSupport.c" } else { -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 504 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 519 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 4414 "RESTSupport.c" +#line 4561 "RESTSupport.c" } } -#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = message_parts; -#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = soup_multipart_get_length (_tmp19_); -#line 512 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" payload_part_num = _tmp20_; -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = payload; -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = string_get_data (_tmp21_, &_tmp22__length1); -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = _tmp22_; -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23__length1 = _tmp22__length1; -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = payload_length; -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp23_ + 0, ((gint) _tmp24_) - 0); -#line 514 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" bindable_data = _tmp25_; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp26_ = message_parts; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp27_ = self->publishable; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp28_ = spit_publishing_publishable_get_serialized_file (_tmp27_); -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp29_ = _tmp28_; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp30_ = g_file_get_path (_tmp29_); -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp31_ = _tmp30_; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp32_ = self->mime_type; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33_ = bindable_data; -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_multipart_append_form_file (_tmp26_, "", _tmp31_, _tmp32_, _tmp33_); -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp31_); -#line 515 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (_tmp29_); -#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp34_ = message_parts; -#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp35_ = payload_part_num; -#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_multipart_get_part (_tmp34_, _tmp35_, &_tmp36_, &_tmp37_); -#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" image_part_header = _tmp36_; -#line 520 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" image_part_body = _tmp37_; -#line 521 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp38_ = image_part_header; -#line 521 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp39_ = self->binary_disposition_table; -#line 521 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 536 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_headers_set_content_disposition (_tmp38_, "form-data", _tmp39_); -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp40_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp41_ = _tmp40_; -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp42_ = message_parts; -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp43_ = soup_form_request_new_from_multipart (_tmp41_, _tmp42_); -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp44_ = _tmp43_; -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp41_); -#line 523 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 538 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" outbound_message = _tmp44_; -#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp45_ = self->message_headers; -#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp46_ = gee_abstract_map_map_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 526 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 541 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" i = _tmp46_; -#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp47_ = i; -#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp48_ = gee_map_iterator_next (_tmp47_); -#line 527 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 542 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" cont = _tmp48_; -#line 528 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 4503 "RESTSupport.c" +#line 4650 "RESTSupport.c" gboolean _tmp49_; SoupMessage* _tmp50_; SoupMessageHeaders* _tmp51_; @@ -4519,150 +4666,150 @@ static void publishing_rest_support_upload_transaction_real_execute (PublishingR gchar* _tmp57_; GeeMapIterator* _tmp58_; gboolean _tmp59_; -#line 528 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp49_ = cont; -#line 528 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!_tmp49_) { -#line 528 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 543 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 4521 "RESTSupport.c" +#line 4668 "RESTSupport.c" } -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp50_ = outbound_message; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp51_ = _tmp50_->request_headers; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp52_ = i; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp53_ = gee_map_iterator_get_key (_tmp52_); -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp54_ = (gchar*) _tmp53_; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp55_ = i; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp56_ = gee_map_iterator_get_value (_tmp55_); -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp57_ = (gchar*) _tmp56_; -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" soup_message_headers_append (_tmp51_, _tmp54_, _tmp57_); -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp57_); -#line 529 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 544 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp54_); -#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 545 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp58_ = i; -#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 545 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp59_ = gee_map_iterator_next (_tmp58_); -#line 530 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 545 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" cont = _tmp59_; -#line 4551 "RESTSupport.c" +#line 4698 "RESTSupport.c" } -#line 532 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp60_ = outbound_message; -#line 532 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp60_); -#line 534 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 549 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (i); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (outbound_message); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupBuffer_free0 (bindable_data); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 4581 "RESTSupport.c" +#line 4728 "RESTSupport.c" } else { -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (i); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (outbound_message); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupBuffer_free0 (bindable_data); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 535 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 550 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 4601 "RESTSupport.c" +#line 4748 "RESTSupport.c" } } -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (i); -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (outbound_message); -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupBuffer_free0 (bindable_data); -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (payload); -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" __vala_SoupMultipart_free0 (message_parts); -#line 493 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 508 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 4616 "RESTSupport.c" +#line 4763 "RESTSupport.c" } static void publishing_rest_support_upload_transaction_class_init (PublishingRESTSupportUploadTransactionClass * klass) { -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_upload_transaction_parent_class = g_type_class_peek_parent (klass); -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_rest_support_upload_transaction_finalize; -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->add_header = (void (*) (PublishingRESTSupportTransaction *, const gchar*, const gchar*)) publishing_rest_support_upload_transaction_real_add_header; -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_rest_support_upload_transaction_real_execute; -#line 4629 "RESTSupport.c" +#line 4776 "RESTSupport.c" } static void publishing_rest_support_upload_transaction_instance_init (PublishingRESTSupportUploadTransaction * self) { -#line 440 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->binary_disposition_table = NULL; -#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->publishable = NULL; -#line 443 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->message_headers = NULL; -#line 4640 "RESTSupport.c" +#line 4787 "RESTSupport.c" } static void publishing_rest_support_upload_transaction_finalize (PublishingRESTSupportTransaction * obj) { PublishingRESTSupportUploadTransaction * self; -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction); -#line 440 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 455 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_hash_table_unref0 (self->binary_disposition_table); -#line 441 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 456 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->publishable); -#line 442 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 457 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->mime_type); -#line 443 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 458 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->message_headers); -#line 439 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 454 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_rest_support_upload_transaction_parent_class)->finalize (obj); -#line 4658 "RESTSupport.c" +#line 4805 "RESTSupport.c" } @@ -4681,22 +4828,22 @@ GType publishing_rest_support_upload_transaction_get_type (void) { static PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_construct (GType object_type, xmlDoc* doc) { PublishingRESTSupportXmlDocument* self = NULL; xmlDoc* _tmp0_; -#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportXmlDocument*) g_type_create_instance (object_type); -#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = doc; -#line 548 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->document = _tmp0_; -#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 4685 "RESTSupport.c" +#line 4832 "RESTSupport.c" } static PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_new (xmlDoc* doc) { -#line 547 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 562 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_xml_document_construct (PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, doc); -#line 4692 "RESTSupport.c" +#line 4839 "RESTSupport.c" } @@ -4704,17 +4851,17 @@ xmlNode* publishing_rest_support_xml_document_get_root_node (PublishingRESTSuppo xmlNode* result = NULL; xmlDoc* _tmp0_; xmlNode* _tmp1_; -#line 555 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 570 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL); -#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->document; -#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = xmlDocGetRootElement (_tmp0_); -#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 556 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 571 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4710 "RESTSupport.c" +#line 4857 "RESTSupport.c" } @@ -4726,92 +4873,92 @@ xmlNode* publishing_rest_support_xml_document_get_named_child (PublishingRESTSup const gchar* _tmp10_; GError* _tmp11_; GError * _inner_error_ = NULL; -#line 559 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL); -#line 559 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (child_name != NULL, NULL); -#line 561 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = parent; -#line 561 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _tmp0_->children; -#line 561 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" doc_node_iter = _tmp1_; -#line 4732 "RESTSupport.c" +#line 4879 "RESTSupport.c" { gboolean _tmp2_ = FALSE; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = TRUE; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 4739 "RESTSupport.c" +#line 4886 "RESTSupport.c" xmlNode* _tmp5_; xmlNode* _tmp6_; const gchar* _tmp7_; const gchar* _tmp8_; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!_tmp2_) { -#line 4746 "RESTSupport.c" +#line 4893 "RESTSupport.c" xmlNode* _tmp3_; xmlNode* _tmp4_; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = doc_node_iter; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = _tmp3_->next; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" doc_node_iter = _tmp4_; -#line 4755 "RESTSupport.c" +#line 4902 "RESTSupport.c" } -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = FALSE; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = doc_node_iter; -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!(_tmp5_ != NULL)) { -#line 563 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 578 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 4765 "RESTSupport.c" +#line 4912 "RESTSupport.c" } -#line 564 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = doc_node_iter; -#line 564 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _tmp6_->name; -#line 564 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = child_name; -#line 564 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (g_strcmp0 (_tmp7_, _tmp8_) == 0) { -#line 4775 "RESTSupport.c" +#line 4922 "RESTSupport.c" xmlNode* _tmp9_; -#line 565 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = doc_node_iter; -#line 565 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp9_; -#line 565 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 580 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4783 "RESTSupport.c" +#line 4930 "RESTSupport.c" } } } -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = child_name; -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML node %s", _tmp10_); -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp11_; -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 4799 "RESTSupport.c" +#line 4946 "RESTSupport.c" } else { -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 568 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 583 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 4807 "RESTSupport.c" +#line 4954 "RESTSupport.c" } } @@ -4824,63 +4971,63 @@ gchar* publishing_rest_support_xml_document_get_property_value (PublishingRESTSu gchar* _tmp2_; const gchar* _tmp3_; GError * _inner_error_ = NULL; -#line 572 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 587 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (self), NULL); -#line 572 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 587 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (property_key != NULL, NULL); -#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = node; -#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = property_key; -#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = (gchar*) xmlGetProp (_tmp0_, (xmlChar*) _tmp1_); -#line 574 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value_string = _tmp2_; -#line 575 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 590 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = value_string; -#line 575 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 590 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp3_ == NULL) { -#line 4836 "RESTSupport.c" +#line 4983 "RESTSupport.c" const gchar* _tmp4_; xmlNode* _tmp5_; const gchar* _tmp6_; GError* _tmp7_; -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = property_key; -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = node; -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp5_->name; -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Can't find XML " "property %s on node %s", _tmp4_, _tmp6_); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp7_; -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (value_string); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 4859 "RESTSupport.c" +#line 5006 "RESTSupport.c" } else { -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (value_string); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 576 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 4869 "RESTSupport.c" +#line 5016 "RESTSupport.c" } } -#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = value_string; -#line 579 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 594 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 4876 "RESTSupport.c" +#line 5023 "RESTSupport.c" } @@ -4903,7 +5050,7 @@ static gchar* string_chug (const gchar* self) { result = _result_; #line 1229 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 4899 "RESTSupport.c" +#line 5046 "RESTSupport.c" } @@ -4926,7 +5073,7 @@ static gchar* string_chomp (const gchar* self) { result = _result_; #line 1221 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 4922 "RESTSupport.c" +#line 5069 "RESTSupport.c" } @@ -4961,75 +5108,75 @@ PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_parse_str gchar* _tmp35_; const gchar* _tmp36_; GError * _inner_error_ = NULL; -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = input_string; -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp1_ == NULL) { -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = TRUE; -#line 4963 "RESTSupport.c" +#line 5110 "RESTSupport.c" } else { const gchar* _tmp2_; gint _tmp3_; gint _tmp4_; -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = input_string; -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = strlen (_tmp2_); -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = _tmp3_; -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = _tmp4_ == 0; -#line 4976 "RESTSupport.c" +#line 5123 "RESTSupport.c" } -#line 584 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp0_) { -#line 4980 "RESTSupport.c" +#line 5127 "RESTSupport.c" GError* _tmp5_; -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Empty XML string"); -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp5_; -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 4992 "RESTSupport.c" +#line 5139 "RESTSupport.c" } else { -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 585 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5000 "RESTSupport.c" +#line 5147 "RESTSupport.c" } } -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = input_string; -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = string_chug (_tmp7_); -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = _tmp8_; -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = string_chomp (_tmp9_); -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = _tmp10_; -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = g_str_has_prefix (_tmp11_, "<"); -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = !_tmp12_; -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp11_); -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp9_); -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp13_) { -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = TRUE; -#line 5025 "RESTSupport.c" +#line 5172 "RESTSupport.c" } else { const gchar* _tmp14_; gchar* _tmp15_; @@ -5037,395 +5184,395 @@ PublishingRESTSupportXmlDocument* publishing_rest_support_xml_document_parse_str gchar* _tmp17_; gchar* _tmp18_; gboolean _tmp19_; -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = input_string; -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = string_chug (_tmp14_); -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = _tmp15_; -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = string_chomp (_tmp16_); -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = _tmp17_; -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = g_str_has_suffix (_tmp18_, ">"); -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = !_tmp19_; -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp18_); -#line 589 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 604 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp16_); -#line 5051 "RESTSupport.c" +#line 5198 "RESTSupport.c" } -#line 588 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 603 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp6_) { -#line 5055 "RESTSupport.c" +#line 5202 "RESTSupport.c" GError* _tmp20_; -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document"); -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp20_; -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5067 "RESTSupport.c" +#line 5214 "RESTSupport.c" } else { -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 591 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5075 "RESTSupport.c" +#line 5222 "RESTSupport.c" } } -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = input_string; -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = input_string; -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = strlen (_tmp22_); -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = _tmp23_; -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = xmlReadMemory (_tmp21_, (gint) _tmp24_, NULL, NULL, (gint) (XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)); -#line 597 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" doc = _tmp25_; -#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp26_ = doc; -#line 599 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp26_ == NULL) { -#line 5094 "RESTSupport.c" +#line 5241 "RESTSupport.c" GError* _tmp27_; -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp27_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document"); -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp27_; -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5106 "RESTSupport.c" +#line 5253 "RESTSupport.c" } else { -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 600 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 615 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5114 "RESTSupport.c" +#line 5261 "RESTSupport.c" } } -#line 605 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp28_ = doc; -#line 605 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp29_ = _tmp28_->children; -#line 605 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 620 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp29_ == NULL) { -#line 5123 "RESTSupport.c" +#line 5270 "RESTSupport.c" GError* _tmp30_; -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp30_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to parse XML " "document"); -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp30_; -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5135 "RESTSupport.c" +#line 5282 "RESTSupport.c" } else { -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 606 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 621 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5143 "RESTSupport.c" +#line 5290 "RESTSupport.c" } } -#line 610 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp31_ = doc; -#line 610 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp32_ = publishing_rest_support_xml_document_new (_tmp31_); -#line 610 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" rest_doc = _tmp32_; -#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33_ = check_for_error_response; -#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp33__target = check_for_error_response_target; -#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp34_ = rest_doc; -#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp35_ = _tmp33_ (_tmp34_, _tmp33__target); -#line 612 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _result_ = _tmp35_; -#line 613 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp36_ = _result_; -#line 613 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp36_ != NULL) { -#line 5166 "RESTSupport.c" +#line 5313 "RESTSupport.c" const gchar* _tmp37_; GError* _tmp38_; -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp37_ = _result_; -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp38_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SERVICE_ERROR, "%s", _tmp37_); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = _tmp38_; -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_propagate_error (error, _inner_error_); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_result_); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_xml_document_unref0 (rest_doc); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5185 "RESTSupport.c" +#line 5332 "RESTSupport.c" } else { -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_result_); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_xml_document_unref0 (rest_doc); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 614 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5197 "RESTSupport.c" +#line 5344 "RESTSupport.c" } } -#line 616 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = rest_doc; -#line 616 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_result_); -#line 616 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 631 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 5206 "RESTSupport.c" +#line 5353 "RESTSupport.c" } static void publishing_rest_support_value_xml_document_init (GValue* value) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 5213 "RESTSupport.c" +#line 5360 "RESTSupport.c" } static void publishing_rest_support_value_xml_document_free_value (GValue* value) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (value->data[0].v_pointer) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_xml_document_unref (value->data[0].v_pointer); -#line 5222 "RESTSupport.c" +#line 5369 "RESTSupport.c" } } static void publishing_rest_support_value_xml_document_copy_value (const GValue* src_value, GValue* dest_value) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (src_value->data[0].v_pointer) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = publishing_rest_support_xml_document_ref (src_value->data[0].v_pointer); -#line 5232 "RESTSupport.c" +#line 5379 "RESTSupport.c" } else { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = NULL; -#line 5236 "RESTSupport.c" +#line 5383 "RESTSupport.c" } } static gpointer publishing_rest_support_value_xml_document_peek_pointer (const GValue* value) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 5244 "RESTSupport.c" +#line 5391 "RESTSupport.c" } static gchar* publishing_rest_support_value_xml_document_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (collect_values[0].v_pointer) { -#line 5251 "RESTSupport.c" +#line 5398 "RESTSupport.c" PublishingRESTSupportXmlDocument * object; object = collect_values[0].v_pointer; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (object->parent_instance.g_class == NULL) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 5258 "RESTSupport.c" +#line 5405 "RESTSupport.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 5262 "RESTSupport.c" +#line 5409 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = publishing_rest_support_xml_document_ref (object); -#line 5266 "RESTSupport.c" +#line 5413 "RESTSupport.c" } else { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 5270 "RESTSupport.c" +#line 5417 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5274 "RESTSupport.c" +#line 5421 "RESTSupport.c" } static gchar* publishing_rest_support_value_xml_document_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingRESTSupportXmlDocument ** object_p; object_p = collect_values[0].v_pointer; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!object_p) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 5285 "RESTSupport.c" +#line 5432 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!value->data[0].v_pointer) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = NULL; -#line 5291 "RESTSupport.c" +#line 5438 "RESTSupport.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = value->data[0].v_pointer; -#line 5295 "RESTSupport.c" +#line 5442 "RESTSupport.c" } else { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = publishing_rest_support_xml_document_ref (value->data[0].v_pointer); -#line 5299 "RESTSupport.c" +#line 5446 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 5303 "RESTSupport.c" +#line 5450 "RESTSupport.c" } GParamSpec* publishing_rest_support_param_spec_xml_document (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingRESTSupportParamSpecXmlDocument* spec; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT), NULL); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return G_PARAM_SPEC (spec); -#line 5317 "RESTSupport.c" +#line 5464 "RESTSupport.c" } gpointer publishing_rest_support_value_get_xml_document (const GValue* value) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT), NULL); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 5326 "RESTSupport.c" +#line 5473 "RESTSupport.c" } void publishing_rest_support_value_set_xml_document (GValue* value, gpointer v_object) { PublishingRESTSupportXmlDocument * old; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT)); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT)); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_xml_document_ref (value->data[0].v_pointer); -#line 5346 "RESTSupport.c" +#line 5493 "RESTSupport.c" } else { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 5350 "RESTSupport.c" +#line 5497 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_xml_document_unref (old); -#line 5356 "RESTSupport.c" +#line 5503 "RESTSupport.c" } } void publishing_rest_support_value_take_xml_document (GValue* value, gpointer v_object) { PublishingRESTSupportXmlDocument * old; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT)); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT)); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 5375 "RESTSupport.c" +#line 5522 "RESTSupport.c" } else { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 5379 "RESTSupport.c" +#line 5526 "RESTSupport.c" } -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_xml_document_unref (old); -#line 5385 "RESTSupport.c" +#line 5532 "RESTSupport.c" } } static void publishing_rest_support_xml_document_class_init (PublishingRESTSupportXmlDocumentClass * klass) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_xml_document_parent_class = g_type_class_peek_parent (klass); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportXmlDocumentClass *) klass)->finalize = publishing_rest_support_xml_document_finalize; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_class_add_private (klass, sizeof (PublishingRESTSupportXmlDocumentPrivate)); -#line 5397 "RESTSupport.c" +#line 5544 "RESTSupport.c" } static void publishing_rest_support_xml_document_instance_init (PublishingRESTSupportXmlDocument * self) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv = PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_PRIVATE (self); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->ref_count = 1; -#line 5406 "RESTSupport.c" +#line 5553 "RESTSupport.c" } static void publishing_rest_support_xml_document_finalize (PublishingRESTSupportXmlDocument * obj) { PublishingRESTSupportXmlDocument * self; xmlDoc* _tmp0_; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_XML_DOCUMENT, PublishingRESTSupportXmlDocument); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_destroy (self); -#line 552 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 567 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->document; -#line 552 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 567 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" xmlFreeDoc (_tmp0_); -#line 5421 "RESTSupport.c" +#line 5568 "RESTSupport.c" } @@ -5446,24 +5593,24 @@ GType publishing_rest_support_xml_document_get_type (void) { gpointer publishing_rest_support_xml_document_ref (gpointer instance) { PublishingRESTSupportXmlDocument * self; self = instance; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_atomic_int_inc (&self->ref_count); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return instance; -#line 5446 "RESTSupport.c" +#line 5593 "RESTSupport.c" } void publishing_rest_support_xml_document_unref (gpointer instance) { PublishingRESTSupportXmlDocument * self; self = instance; -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_XML_DOCUMENT_GET_CLASS (self)->finalize (self); -#line 539 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 554 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_free_instance ((GTypeInstance *) self); -#line 5459 "RESTSupport.c" +#line 5606 "RESTSupport.c" } } @@ -5478,21 +5625,21 @@ gchar* publishing_rest_support_decimal_entity_encode (const gchar* source) { GString* _tmp23_; const gchar* _tmp24_; gchar* _tmp25_; -#line 625 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 640 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (source != NULL, NULL); -#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = g_string_new (""); -#line 626 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" encoded_str_builder = _tmp0_; -#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 642 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = source; -#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 642 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_strdup (_tmp1_); -#line 627 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 642 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" current_char = _tmp2_; -#line 628 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 5488 "RESTSupport.c" +#line 5635 "RESTSupport.c" gint current_char_value = 0; const gchar* _tmp3_; gunichar _tmp4_; @@ -5504,146 +5651,146 @@ gchar* publishing_rest_support_decimal_entity_encode (const gchar* source) { const gchar* _tmp20_; const gchar* _tmp21_; gchar* _tmp22_; -#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = current_char; -#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = g_utf8_get_char_validated (_tmp3_, (gssize) -1); -#line 629 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 644 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" current_char_value = (gint) _tmp4_; -#line 632 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = current_char_value; -#line 632 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 647 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp5_ < 1) { -#line 633 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 648 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 5512 "RESTSupport.c" +#line 5659 "RESTSupport.c" } -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = current_char_value; -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp9_ < 128) { -#line 5518 "RESTSupport.c" +#line 5665 "RESTSupport.c" gint _tmp10_; -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = current_char_value; -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = _tmp10_ != ((gint) '&'); -#line 5524 "RESTSupport.c" +#line 5671 "RESTSupport.c" } else { -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = FALSE; -#line 5528 "RESTSupport.c" +#line 5675 "RESTSupport.c" } -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp8_) { -#line 5532 "RESTSupport.c" +#line 5679 "RESTSupport.c" gint _tmp11_; -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = current_char_value; -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _tmp11_ != ((gint) '<'); -#line 5538 "RESTSupport.c" +#line 5685 "RESTSupport.c" } else { -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = FALSE; -#line 5542 "RESTSupport.c" +#line 5689 "RESTSupport.c" } -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp7_) { -#line 5546 "RESTSupport.c" +#line 5693 "RESTSupport.c" gint _tmp12_; -#line 638 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = current_char_value; -#line 638 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = _tmp12_ != ((gint) '>'); -#line 5552 "RESTSupport.c" +#line 5699 "RESTSupport.c" } else { -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = FALSE; -#line 5556 "RESTSupport.c" +#line 5703 "RESTSupport.c" } -#line 637 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp6_) { -#line 5560 "RESTSupport.c" +#line 5707 "RESTSupport.c" GString* _tmp13_; const gchar* _tmp14_; gunichar _tmp15_; -#line 639 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = encoded_str_builder; -#line 639 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = current_char; -#line 639 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = g_utf8_get_char_validated (_tmp14_, (gssize) -1); -#line 639 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 654 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_string_append_unichar (_tmp13_, _tmp15_); -#line 5572 "RESTSupport.c" +#line 5719 "RESTSupport.c" } else { GString* _tmp16_; gint _tmp17_; gchar* _tmp18_; gchar* _tmp19_; -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = encoded_str_builder; -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = current_char_value; -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = g_strdup_printf ("&#%d;", _tmp17_); -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = _tmp18_; -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_string_append (_tmp16_, _tmp19_); -#line 641 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 656 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp19_); -#line 5590 "RESTSupport.c" +#line 5737 "RESTSupport.c" } -#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp20_ = current_char; -#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = g_utf8_next_char (_tmp20_); -#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = g_strdup (_tmp21_); -#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (current_char); -#line 643 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" current_char = _tmp22_; -#line 5602 "RESTSupport.c" +#line 5749 "RESTSupport.c" } -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = encoded_str_builder; -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = _tmp23_->str; -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp25_ = g_strdup (_tmp24_); -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp25_; -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (current_char); -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_string_free0 (encoded_str_builder); -#line 646 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 661 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 5618 "RESTSupport.c" +#line 5765 "RESTSupport.c" } static SpitPublishingPublishable** _vala_array_dup2 (SpitPublishingPublishable** self, int length) { SpitPublishingPublishable** result; int i; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = g_new0 (SpitPublishingPublishable*, length + 1); -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" for (i = 0; i < length; i++) { -#line 5629 "RESTSupport.c" +#line 5776 "RESTSupport.c" SpitPublishingPublishable* _tmp0_; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = _g_object_ref0 (self[i]); -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result[i] = _tmp0_; -#line 5635 "RESTSupport.c" +#line 5782 "RESTSupport.c" } -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 5639 "RESTSupport.c" +#line 5786 "RESTSupport.c" } @@ -5655,44 +5802,44 @@ PublishingRESTSupportBatchUploader* publishing_rest_support_batch_uploader_const gint _tmp1__length1; PublishingRESTSupportSession* _tmp2_; PublishingRESTSupportSession* _tmp3_; -#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_SESSION (session), NULL); -#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportBatchUploader*) g_type_create_instance (object_type); -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishables; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = publishables_length1; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup2 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1__length1 = _tmp0__length1; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL); -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables = _tmp1_; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables_length1 = _tmp1__length1; -#line 659 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 674 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->_publishables_size_ = self->priv->publishables_length1; -#line 660 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = session; -#line 660 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _publishing_rest_support_session_ref0 (_tmp2_); -#line 660 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 660 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->session = _tmp3_; -#line 658 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 673 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 5681 "RESTSupport.c" +#line 5828 "RESTSupport.c" } static void _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted (PublishingRESTSupportTransaction* _sender, gint bytes_written_so_far, gint total_bytes, gpointer self) { -#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_on_chunk_transmitted ((PublishingRESTSupportBatchUploader*) self, bytes_written_so_far, total_bytes); -#line 5688 "RESTSupport.c" +#line 5835 "RESTSupport.c" } @@ -5702,36 +5849,36 @@ static void publishing_rest_support_batch_uploader_send_files (PublishingRESTSup gint _tmp0__length1; gboolean _tmp23_; GError * _inner_error_ = NULL; -#line 663 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 678 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self)); -#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->current_file = 0; -#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 680 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" stop = FALSE; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->publishables; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = self->priv->publishables_length1; -#line 5708 "RESTSupport.c" +#line 5855 "RESTSupport.c" { SpitPublishingPublishable** publishable_collection = NULL; gint publishable_collection_length1 = 0; gint _publishable_collection_size_ = 0; gint publishable_it = 0; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishable_collection = _tmp0_; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishable_collection_length1 = _tmp0__length1; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" for (publishable_it = 0; publishable_it < _tmp0__length1; publishable_it = publishable_it + 1) { -#line 5720 "RESTSupport.c" +#line 5867 "RESTSupport.c" SpitPublishingPublishable* _tmp1_; SpitPublishingPublishable* publishable = NULL; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _g_object_ref0 (publishable_collection[publishable_it]); -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishable = _tmp1_; -#line 5727 "RESTSupport.c" +#line 5874 "RESTSupport.c" { GFile* file = NULL; SpitPublishingPublishable* _tmp2_; @@ -5754,104 +5901,104 @@ static void publishing_rest_support_batch_uploader_send_files (PublishingRESTSup guint _tmp20_; gboolean _tmp21_; gint _tmp22_; -#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = publishable; -#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = spit_publishing_publishable_get_serialized_file (_tmp2_); -#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 682 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" file = _tmp3_; -#line 670 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = file; -#line 670 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 685 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp4_ == NULL) { -#line 5760 "RESTSupport.c" +#line 5907 "RESTSupport.c" gint _tmp5_; -#line 671 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = self->priv->current_file; -#line 671 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->current_file = _tmp5_ + 1; -#line 672 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (file); -#line 672 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (publishable); -#line 672 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" continue; -#line 5772 "RESTSupport.c" +#line 5919 "RESTSupport.c" } -#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = self->priv->current_file; -#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = self->priv->publishables; -#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7__length1 = self->priv->publishables_length1; -#line 675 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" fraction_complete = ((gdouble) _tmp6_) / _tmp7__length1; -#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = self->priv->status_updated; -#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8__target = self->priv->status_updated_target; -#line 676 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 691 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp8_ != NULL) { -#line 5788 "RESTSupport.c" +#line 5935 "RESTSupport.c" SpitPublishingProgressCallback _tmp9_; void* _tmp9__target; gint _tmp10_; gdouble _tmp11_; -#line 677 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = self->priv->status_updated; -#line 677 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9__target = self->priv->status_updated_target; -#line 677 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = self->priv->current_file; -#line 677 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = fraction_complete; -#line 677 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ (_tmp10_ + 1, _tmp11_, _tmp9__target); -#line 5803 "RESTSupport.c" +#line 5950 "RESTSupport.c" } -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = self->priv->publishables; -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12__length1 = self->priv->publishables_length1; -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = self->priv->current_file; -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = _tmp12_[_tmp13_]; -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = publishing_rest_support_batch_uploader_create_transaction (self, _tmp14_); -#line 679 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 694 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" txn = _tmp15_; -#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = txn; -#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 696 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_connect (_tmp16_, "chunk-transmitted", (GCallback) _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted, self); -#line 5821 "RESTSupport.c" +#line 5968 "RESTSupport.c" { PublishingRESTSupportTransaction* _tmp17_; -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = txn; -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_execute (_tmp17_, &_inner_error_); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 5832 "RESTSupport.c" +#line 5979 "RESTSupport.c" goto __catch3_spit_publishing_publishing_error; } -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (file); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (publishable); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 684 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 5847 "RESTSupport.c" +#line 5994 "RESTSupport.c" } } goto __finally3; @@ -5859,82 +6006,82 @@ static void publishing_rest_support_batch_uploader_send_files (PublishingRESTSup { GError* err = NULL; GError* _tmp18_; -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" err = _inner_error_; -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _inner_error_ = NULL; -#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 701 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = err; -#line 686 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 701 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_ERROR_SIGNAL], 0, _tmp18_); -#line 687 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 702 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" stop = TRUE; -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_error_free0 (err); -#line 5867 "RESTSupport.c" +#line 6014 "RESTSupport.c" } __finally3: -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (file); -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (publishable); -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_clear_error (&_inner_error_); -#line 683 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 5884 "RESTSupport.c" +#line 6031 "RESTSupport.c" } -#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = txn; -#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_parse_name ("chunk-transmitted", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp20_, NULL, FALSE); -#line 690 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_disconnect_matched (_tmp19_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _publishing_rest_support_batch_uploader_on_chunk_transmitted_publishing_rest_support_transaction_chunk_transmitted, self); -#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp21_ = stop; -#line 692 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 707 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp21_) { -#line 693 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 693 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (file); -#line 693 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (publishable); -#line 693 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 5904 "RESTSupport.c" +#line 6051 "RESTSupport.c" } -#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 710 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp22_ = self->priv->current_file; -#line 695 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 710 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->current_file = _tmp22_ + 1; -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (file); -#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 681 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (publishable); -#line 5916 "RESTSupport.c" +#line 6063 "RESTSupport.c" } } } -#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp23_ = stop; -#line 698 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!_tmp23_) { -#line 5924 "RESTSupport.c" +#line 6071 "RESTSupport.c" gint _tmp24_; -#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 714 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp24_ = self->priv->current_file; -#line 699 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 714 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_emit (self, publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_COMPLETE_SIGNAL], 0, _tmp24_); -#line 5930 "RESTSupport.c" +#line 6077 "RESTSupport.c" } } @@ -5953,52 +6100,52 @@ static void publishing_rest_support_batch_uploader_on_chunk_transmitted (Publish gdouble _tmp6_; SpitPublishingProgressCallback _tmp7_; void* _tmp7__target; -#line 702 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self)); -#line 703 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->publishables; -#line 703 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = self->priv->publishables_length1; -#line 703 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 718 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" file_span = 1.0 / _tmp0__length1; -#line 704 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 719 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = bytes_written_so_far; -#line 704 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 719 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = total_bytes; -#line 704 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 719 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" this_file_fraction_complete = ((gdouble) _tmp1_) / _tmp2_; -#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = self->priv->current_file; -#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = file_span; -#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = this_file_fraction_complete; -#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = file_span; -#line 705 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" fraction_complete = (_tmp3_ * _tmp4_) + (_tmp5_ * _tmp6_); -#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = self->priv->status_updated; -#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7__target = self->priv->status_updated_target; -#line 708 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp7_ != NULL) { -#line 5979 "RESTSupport.c" +#line 6126 "RESTSupport.c" SpitPublishingProgressCallback _tmp8_; void* _tmp8__target; gint _tmp9_; gdouble _tmp10_; -#line 709 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = self->priv->status_updated; -#line 709 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8__target = self->priv->status_updated_target; -#line 709 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = self->priv->current_file; -#line 709 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = fraction_complete; -#line 709 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 724 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ (_tmp9_ + 1, _tmp10_, _tmp8__target); -#line 5994 "RESTSupport.c" +#line 6141 "RESTSupport.c" } } @@ -6007,17 +6154,17 @@ PublishingRESTSupportSession* publishing_rest_support_batch_uploader_get_session PublishingRESTSupportSession* result = NULL; PublishingRESTSupportSession* _tmp0_; PublishingRESTSupportSession* _tmp1_; -#line 712 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 727 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL); -#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->session; -#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _publishing_rest_support_session_ref0 (_tmp0_); -#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 713 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 728 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6013 "RESTSupport.c" +#line 6160 "RESTSupport.c" } @@ -6028,41 +6175,41 @@ SpitPublishingPublishable* publishing_rest_support_batch_uploader_get_current_pu gint _tmp1_; SpitPublishingPublishable* _tmp2_; SpitPublishingPublishable* _tmp3_; -#line 716 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 731 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL); -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->publishables; -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__length1 = self->priv->publishables_length1; -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->current_file; -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = _tmp0_[_tmp1_]; -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _g_object_ref0 (_tmp2_); -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp3_; -#line 717 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 732 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6040 "RESTSupport.c" +#line 6187 "RESTSupport.c" } static PublishingRESTSupportTransaction* publishing_rest_support_batch_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* self, SpitPublishingPublishable* publishable) { -#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_batch_uploader_create_transaction'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6049 "RESTSupport.c" +#line 6196 "RESTSupport.c" } PublishingRESTSupportTransaction* publishing_rest_support_batch_uploader_create_transaction (PublishingRESTSupportBatchUploader* self, SpitPublishingPublishable* publishable) { -#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self), NULL); -#line 720 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 735 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_CLASS (self)->create_transaction (self, publishable); -#line 6058 "RESTSupport.c" +#line 6205 "RESTSupport.c" } @@ -6071,260 +6218,260 @@ void publishing_rest_support_batch_uploader_upload (PublishingRESTSupportBatchUp void* _tmp0__target; SpitPublishingPublishable** _tmp1_; gint _tmp1__length1; -#line 722 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (self)); -#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = status_updated; -#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0__target = status_updated_target; -#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->status_updated = _tmp0_; -#line 723 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->status_updated_target = _tmp0__target; -#line 725 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->priv->publishables; -#line 725 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1__length1 = self->priv->publishables_length1; -#line 725 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (_tmp1__length1 > 0) { -#line 726 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 741 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_send_files (self); -#line 6085 "RESTSupport.c" +#line 6232 "RESTSupport.c" } } static void publishing_rest_support_value_batch_uploader_init (GValue* value) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 6093 "RESTSupport.c" +#line 6240 "RESTSupport.c" } static void publishing_rest_support_value_batch_uploader_free_value (GValue* value) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (value->data[0].v_pointer) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_unref (value->data[0].v_pointer); -#line 6102 "RESTSupport.c" +#line 6249 "RESTSupport.c" } } static void publishing_rest_support_value_batch_uploader_copy_value (const GValue* src_value, GValue* dest_value) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (src_value->data[0].v_pointer) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = publishing_rest_support_batch_uploader_ref (src_value->data[0].v_pointer); -#line 6112 "RESTSupport.c" +#line 6259 "RESTSupport.c" } else { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" dest_value->data[0].v_pointer = NULL; -#line 6116 "RESTSupport.c" +#line 6263 "RESTSupport.c" } } static gpointer publishing_rest_support_value_batch_uploader_peek_pointer (const GValue* value) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 6124 "RESTSupport.c" +#line 6271 "RESTSupport.c" } static gchar* publishing_rest_support_value_batch_uploader_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (collect_values[0].v_pointer) { -#line 6131 "RESTSupport.c" +#line 6278 "RESTSupport.c" PublishingRESTSupportBatchUploader * object; object = collect_values[0].v_pointer; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (object->parent_instance.g_class == NULL) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 6138 "RESTSupport.c" +#line 6285 "RESTSupport.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 6142 "RESTSupport.c" +#line 6289 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = publishing_rest_support_batch_uploader_ref (object); -#line 6146 "RESTSupport.c" +#line 6293 "RESTSupport.c" } else { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 6150 "RESTSupport.c" +#line 6297 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6154 "RESTSupport.c" +#line 6301 "RESTSupport.c" } static gchar* publishing_rest_support_value_batch_uploader_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingRESTSupportBatchUploader ** object_p; object_p = collect_values[0].v_pointer; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!object_p) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 6165 "RESTSupport.c" +#line 6312 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!value->data[0].v_pointer) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = NULL; -#line 6171 "RESTSupport.c" +#line 6318 "RESTSupport.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = value->data[0].v_pointer; -#line 6175 "RESTSupport.c" +#line 6322 "RESTSupport.c" } else { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" *object_p = publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer); -#line 6179 "RESTSupport.c" +#line 6326 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6183 "RESTSupport.c" +#line 6330 "RESTSupport.c" } GParamSpec* publishing_rest_support_param_spec_batch_uploader (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingRESTSupportParamSpecBatchUploader* spec; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER), NULL); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return G_PARAM_SPEC (spec); -#line 6197 "RESTSupport.c" +#line 6344 "RESTSupport.c" } gpointer publishing_rest_support_value_get_batch_uploader (const GValue* value) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER), NULL); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return value->data[0].v_pointer; -#line 6206 "RESTSupport.c" +#line 6353 "RESTSupport.c" } void publishing_rest_support_value_set_batch_uploader (GValue* value, gpointer v_object) { PublishingRESTSupportBatchUploader * old; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER)); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER)); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_ref (value->data[0].v_pointer); -#line 6226 "RESTSupport.c" +#line 6373 "RESTSupport.c" } else { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 6230 "RESTSupport.c" +#line 6377 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_unref (old); -#line 6236 "RESTSupport.c" +#line 6383 "RESTSupport.c" } } void publishing_rest_support_value_take_batch_uploader (GValue* value, gpointer v_object) { PublishingRESTSupportBatchUploader * old; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER)); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" old = value->data[0].v_pointer; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (v_object) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER)); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = v_object; -#line 6255 "RESTSupport.c" +#line 6402 "RESTSupport.c" } else { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" value->data[0].v_pointer = NULL; -#line 6259 "RESTSupport.c" +#line 6406 "RESTSupport.c" } -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (old) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_unref (old); -#line 6265 "RESTSupport.c" +#line 6412 "RESTSupport.c" } } static void publishing_rest_support_batch_uploader_class_init (PublishingRESTSupportBatchUploaderClass * klass) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_parent_class = g_type_class_peek_parent (klass); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_rest_support_batch_uploader_finalize; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_class_add_private (klass, sizeof (PublishingRESTSupportBatchUploaderPrivate)); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = (PublishingRESTSupportTransaction* (*) (PublishingRESTSupportBatchUploader *, SpitPublishingPublishable*)) publishing_rest_support_batch_uploader_real_create_transaction; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_COMPLETE_SIGNAL] = g_signal_new ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_batch_uploader_signals[PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_UPLOAD_ERROR_SIGNAL] = g_signal_new ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); -#line 6283 "RESTSupport.c" +#line 6430 "RESTSupport.c" } static void publishing_rest_support_batch_uploader_instance_init (PublishingRESTSupportBatchUploader * self) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv = PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_PRIVATE (self); -#line 650 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 665 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->current_file = 0; -#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables = NULL; -#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables_length1 = 0; -#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->_publishables_size_ = self->priv->publishables_length1; -#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->session = NULL; -#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 668 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->status_updated = NULL; -#line 653 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 668 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->status_updated_target = self; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->ref_count = 1; -#line 6306 "RESTSupport.c" +#line 6453 "RESTSupport.c" } static void publishing_rest_support_batch_uploader_finalize (PublishingRESTSupportBatchUploader * obj) { PublishingRESTSupportBatchUploader * self; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_handlers_destroy (self); -#line 651 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 666 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL); -#line 652 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 667 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 6320 "RESTSupport.c" +#line 6467 "RESTSupport.c" } @@ -6345,24 +6492,24 @@ GType publishing_rest_support_batch_uploader_get_type (void) { gpointer publishing_rest_support_batch_uploader_ref (gpointer instance) { PublishingRESTSupportBatchUploader * self; self = instance; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_atomic_int_inc (&self->ref_count); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return instance; -#line 6345 "RESTSupport.c" +#line 6492 "RESTSupport.c" } void publishing_rest_support_batch_uploader_unref (gpointer instance) { PublishingRESTSupportBatchUploader * self; self = instance; -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_GET_CLASS (self)->finalize (self); -#line 649 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 664 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_free_instance ((GTypeInstance *) self); -#line 6358 "RESTSupport.c" +#line 6505 "RESTSupport.c" } } @@ -6381,7 +6528,7 @@ static gunichar string_get_char (const gchar* self, glong index) { result = _tmp1_; #line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 6377 "RESTSupport.c" +#line 6524 "RESTSupport.c" } @@ -6395,181 +6542,181 @@ gchar* publishing_rest_support_asciify_string (const gchar* s) { GString* _tmp14_; const gchar* _tmp15_; gchar* _tmp16_; -#line 733 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (s != NULL, NULL); -#line 734 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = s; -#line 734 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = g_utf8_normalize (_tmp0_, (gssize) -1, G_NORMALIZE_DEFAULT); -#line 734 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" t = _tmp1_; -#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_string_new (""); -#line 736 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 751 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" b = _tmp2_; -#line 6403 "RESTSupport.c" +#line 6550 "RESTSupport.c" { const gchar* u = NULL; const gchar* _tmp3_; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = t; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" u = _tmp3_; -#line 6411 "RESTSupport.c" +#line 6558 "RESTSupport.c" { gboolean _tmp4_ = FALSE; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = TRUE; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" while (TRUE) { -#line 6418 "RESTSupport.c" +#line 6565 "RESTSupport.c" const gchar* _tmp7_; gunichar _tmp8_; gunichar c = 0U; const gchar* _tmp9_; gunichar _tmp10_; gunichar _tmp11_; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!_tmp4_) { -#line 6427 "RESTSupport.c" +#line 6574 "RESTSupport.c" const gchar* _tmp5_; const gchar* _tmp6_; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = u; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = g_utf8_next_char (_tmp5_); -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" u = _tmp6_; -#line 6436 "RESTSupport.c" +#line 6583 "RESTSupport.c" } -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = FALSE; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = u; -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = string_get_char (_tmp7_, (glong) 0); -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (!(_tmp8_ != ((gunichar) 0))) { -#line 737 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" break; -#line 6448 "RESTSupport.c" +#line 6595 "RESTSupport.c" } -#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = u; -#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = string_get_char (_tmp9_, (glong) 0); -#line 738 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 753 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" c = _tmp10_; -#line 739 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = c; -#line 739 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 754 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" if (((gint) _tmp11_) < 128) { -#line 6460 "RESTSupport.c" +#line 6607 "RESTSupport.c" GString* _tmp12_; gunichar _tmp13_; -#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = b; -#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = c; -#line 740 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 755 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_string_append_unichar (_tmp12_, _tmp13_); -#line 6469 "RESTSupport.c" +#line 6616 "RESTSupport.c" } } } } -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = b; -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = _tmp14_->str; -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = g_strdup (_tmp15_); -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp16_; -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_string_free0 (b); -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (t); -#line 743 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6488 "RESTSupport.c" +#line 6635 "RESTSupport.c" } static gchar* publishing_rest_support_google_session_real_get_user_name (PublishingRESTSupportGoogleSession* self) { -#line 747 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_get_user_name'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 747 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6497 "RESTSupport.c" +#line 6644 "RESTSupport.c" } gchar* publishing_rest_support_google_session_get_user_name (PublishingRESTSupportGoogleSession* self) { -#line 747 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self), NULL); -#line 747 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->get_user_name (self); -#line 6506 "RESTSupport.c" +#line 6653 "RESTSupport.c" } static gchar* publishing_rest_support_google_session_real_get_access_token (PublishingRESTSupportGoogleSession* self) { -#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_get_access_token'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6515 "RESTSupport.c" +#line 6662 "RESTSupport.c" } gchar* publishing_rest_support_google_session_get_access_token (PublishingRESTSupportGoogleSession* self) { -#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self), NULL); -#line 748 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->get_access_token (self); -#line 6524 "RESTSupport.c" +#line 6671 "RESTSupport.c" } static void publishing_rest_support_google_session_real_deauthenticate (PublishingRESTSupportGoogleSession* self) { -#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_session_deauthenticate'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 6533 "RESTSupport.c" +#line 6680 "RESTSupport.c" } void publishing_rest_support_google_session_deauthenticate (PublishingRESTSupportGoogleSession* self) { -#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (self)); -#line 749 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_GOOGLE_SESSION_GET_CLASS (self)->deauthenticate (self); -#line 6542 "RESTSupport.c" +#line 6689 "RESTSupport.c" } PublishingRESTSupportGoogleSession* publishing_rest_support_google_session_construct (GType object_type) { PublishingRESTSupportGoogleSession* self = NULL; -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportGoogleSession*) publishing_rest_support_session_construct (object_type, NULL); -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 6552 "RESTSupport.c" +#line 6699 "RESTSupport.c" } static void publishing_rest_support_google_session_class_init (PublishingRESTSupportGoogleSessionClass * klass) { -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_session_parent_class = g_type_class_peek_parent (klass); -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_get_user_name; -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_get_access_token; -#line 746 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = (void (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_session_real_deauthenticate; -#line 6565 "RESTSupport.c" +#line 6712 "RESTSupport.c" } @@ -6590,9 +6737,9 @@ GType publishing_rest_support_google_session_get_type (void) { static void _publishing_rest_support_google_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender, gpointer self) { -#line 816 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_on_authenticator_authenticated ((PublishingRESTSupportGooglePublisher*) self); -#line 6588 "RESTSupport.c" +#line 6735 "RESTSupport.c" } @@ -6605,82 +6752,82 @@ PublishingRESTSupportGooglePublisher* publishing_rest_support_google_publisher_c SpitPublishingPluginHost* _tmp4_; SpitPublishingAuthenticator* _tmp5_; SpitPublishingAuthenticator* _tmp6_; -#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); -#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (scope != NULL, NULL); -#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportGooglePublisher*) g_object_new (object_type, NULL); -#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = scope; -#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = g_strdup (_tmp0_); -#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->priv->scope); -#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->scope = _tmp1_; -#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = publishing_rest_support_google_publisher_google_session_impl_new (); -#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 827 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->session = _tmp2_; -#line 813 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 828 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = service; -#line 813 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 828 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->service = _tmp3_; -#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = host; -#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->host = _tmp4_; -#line 815 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = publishing_rest_support_google_publisher_get_authenticator (self); -#line 815 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->authenticator); -#line 815 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 830 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv->authenticator = _tmp5_; -#line 816 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = self->priv->authenticator; -#line 816 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_signal_connect_object (_tmp6_, "authenticated", (GCallback) _publishing_rest_support_google_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated, self, 0); -#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 824 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 6643 "RESTSupport.c" +#line 6790 "RESTSupport.c" } static SpitPublishingAuthenticator* publishing_rest_support_google_publisher_real_get_authenticator (PublishingRESTSupportGooglePublisher* self) { -#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_get_authenticator'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return NULL; -#line 6652 "RESTSupport.c" +#line 6799 "RESTSupport.c" } SpitPublishingAuthenticator* publishing_rest_support_google_publisher_get_authenticator (PublishingRESTSupportGooglePublisher* self) { -#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL); -#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 834 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->get_authenticator (self); -#line 6661 "RESTSupport.c" +#line 6808 "RESTSupport.c" } SpitPublishingPluginHost* publishing_rest_support_google_publisher_get_host (PublishingRESTSupportGooglePublisher* self) { SpitPublishingPluginHost* result = NULL; SpitPublishingPluginHost* _tmp0_; -#line 821 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 836 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL); -#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->host; -#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp0_; -#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6676 "RESTSupport.c" +#line 6823 "RESTSupport.c" } @@ -6688,108 +6835,108 @@ PublishingRESTSupportGoogleSession* publishing_rest_support_google_publisher_get PublishingRESTSupportGoogleSession* result = NULL; PublishingRESTSupportGooglePublisherGoogleSessionImpl* _tmp0_; PublishingRESTSupportGoogleSession* _tmp1_; -#line 825 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), NULL); -#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->session; -#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _publishing_rest_support_session_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession)); -#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 826 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 841 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6694 "RESTSupport.c" +#line 6841 "RESTSupport.c" } static void publishing_rest_support_google_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self) { -#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_on_login_flow_complete'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 6703 "RESTSupport.c" +#line 6850 "RESTSupport.c" } void publishing_rest_support_google_publisher_on_login_flow_complete (PublishingRESTSupportGooglePublisher* self) { -#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self)); -#line 829 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->on_login_flow_complete (self); -#line 6712 "RESTSupport.c" +#line 6859 "RESTSupport.c" } static void publishing_rest_support_google_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* self) { -#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_do_logout'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 6721 "RESTSupport.c" +#line 6868 "RESTSupport.c" } void publishing_rest_support_google_publisher_do_logout (PublishingRESTSupportGooglePublisher* self) { -#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self)); -#line 831 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->do_logout (self); -#line 6730 "RESTSupport.c" +#line 6877 "RESTSupport.c" } static gboolean publishing_rest_support_google_publisher_real_is_running (PublishingRESTSupportGooglePublisher* self) { gboolean _tmp0_ = FALSE; -#line 833 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_is_running'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 833 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return _tmp0_; -#line 6740 "RESTSupport.c" +#line 6887 "RESTSupport.c" } gboolean publishing_rest_support_google_publisher_is_running (PublishingRESTSupportGooglePublisher* self) { -#line 833 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self), FALSE); -#line 833 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 848 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->is_running (self); -#line 6749 "RESTSupport.c" +#line 6896 "RESTSupport.c" } static void publishing_rest_support_google_publisher_real_start (PublishingRESTSupportGooglePublisher* self) { -#line 835 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_start'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 835 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 6758 "RESTSupport.c" +#line 6905 "RESTSupport.c" } void publishing_rest_support_google_publisher_start (PublishingRESTSupportGooglePublisher* self) { -#line 835 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self)); -#line 835 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->start (self); -#line 6767 "RESTSupport.c" +#line 6914 "RESTSupport.c" } static void publishing_rest_support_google_publisher_real_stop (PublishingRESTSupportGooglePublisher* self) { -#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_critical ("Type `%s' does not implement abstract method `publishing_rest_support_google_publisher_stop'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return; -#line 6776 "RESTSupport.c" +#line 6923 "RESTSupport.c" } void publishing_rest_support_google_publisher_stop (PublishingRESTSupportGooglePublisher* self) { -#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self)); -#line 837 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 852 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_CLASS (self)->stop (self); -#line 6785 "RESTSupport.c" +#line 6932 "RESTSupport.c" } @@ -6798,24 +6945,24 @@ static SpitPublishingService* publishing_rest_support_google_publisher_real_get_ SpitPublishingService* result = NULL; SpitPublishingService* _tmp0_; SpitPublishingService* _tmp1_; -#line 839 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher); -#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->service; -#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp1_; -#line 840 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6804 "RESTSupport.c" +#line 6951 "RESTSupport.c" } static gpointer _g_variant_ref0 (gpointer self) { -#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self ? g_variant_ref (self) : NULL; -#line 6811 "RESTSupport.c" +#line 6958 "RESTSupport.c" } @@ -6844,120 +6991,120 @@ static void publishing_rest_support_google_publisher_on_authenticator_authentica GVariant* _tmp17_; const gchar* _tmp18_; gchar* _tmp19_; -#line 843 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_PUBLISHER (self)); -#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->priv->authenticator; -#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = spit_publishing_authenticator_get_authentication_parameter (_tmp0_); -#line 844 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 859 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" params = _tmp1_; -#line 845 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 860 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" refresh_token = NULL; -#line 846 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 861 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" access_token = NULL; -#line 847 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 862 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" user_name = NULL; -#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_hash_table_lookup_extended (params, "RefreshToken", NULL, &_tmp2_); -#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (refresh_token); -#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = _g_variant_ref0 (_tmp2_); -#line 849 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 864 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" refresh_token = _tmp3_; -#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_hash_table_lookup_extended (params, "AccessToken", NULL, &_tmp4_); -#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (access_token); -#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = _g_variant_ref0 (_tmp4_); -#line 850 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 865 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" access_token = _tmp5_; -#line 851 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_hash_table_lookup_extended (params, "UserName", NULL, &_tmp6_); -#line 851 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (user_name); -#line 851 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _g_variant_ref0 (_tmp6_); -#line 851 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 866 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" user_name = _tmp7_; -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = self->priv->session; -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = refresh_token; -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp10_ = g_variant_get_string (_tmp9_, NULL); -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp11_ = g_strdup (_tmp10_); -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp8_->refresh_token); -#line 853 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 868 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_->refresh_token = _tmp11_; -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_ = self->priv->session; -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp13_ = access_token; -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp14_ = g_variant_get_string (_tmp13_, NULL); -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp15_ = g_strdup (_tmp14_); -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp12_->access_token); -#line 854 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 869 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp12_->access_token = _tmp15_; -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_ = self->priv->session; -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp17_ = user_name; -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp18_ = g_variant_get_string (_tmp17_, NULL); -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp19_ = g_strdup (_tmp18_); -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp16_->user_name); -#line 855 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 870 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp16_->user_name = _tmp19_; -#line 857 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 872 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_on_login_flow_complete (self); -#line 843 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (user_name); -#line 843 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (access_token); -#line 843 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_variant_unref0 (refresh_token); -#line 843 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 858 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_hash_table_unref0 (params); -#line 6924 "RESTSupport.c" +#line 7071 "RESTSupport.c" } static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_construct (GType object_type) { PublishingRESTSupportGooglePublisherGoogleSessionImpl* self = NULL; -#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportGooglePublisherGoogleSessionImpl*) publishing_rest_support_google_session_construct (object_type); -#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->access_token); -#line 762 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->access_token = NULL; -#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->user_name); -#line 763 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->user_name = NULL; -#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 779 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->refresh_token); -#line 764 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 779 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->refresh_token = NULL; -#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 6946 "RESTSupport.c" +#line 7093 "RESTSupport.c" } static PublishingRESTSupportGooglePublisherGoogleSessionImpl* publishing_rest_support_google_publisher_google_session_impl_new (void) { -#line 761 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_google_publisher_google_session_impl_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL); -#line 6953 "RESTSupport.c" +#line 7100 "RESTSupport.c" } @@ -6965,15 +7112,15 @@ static gboolean publishing_rest_support_google_publisher_google_session_impl_rea PublishingRESTSupportGooglePublisherGoogleSessionImpl * self; gboolean result = FALSE; const gchar* _tmp0_; -#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl); -#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->access_token; -#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp0_ != NULL; -#line 768 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6969 "RESTSupport.c" +#line 7116 "RESTSupport.c" } @@ -6983,21 +7130,21 @@ static gchar* publishing_rest_support_google_publisher_google_session_impl_real_ const gchar* _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; -#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 786 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl); -#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 787 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = self->user_name; -#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 787 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_ != NULL, "user_name != null"); -#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->user_name; -#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_strdup (_tmp1_); -#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp2_; -#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 6993 "RESTSupport.c" +#line 7140 "RESTSupport.c" } @@ -7007,58 +7154,58 @@ static gchar* publishing_rest_support_google_publisher_google_session_impl_real_ gboolean _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; -#line 776 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl); -#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 792 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 777 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 792 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp0_, "is_authenticated()"); -#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = self->access_token; -#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = g_strdup (_tmp1_); -#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" result = _tmp2_; -#line 778 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 793 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return result; -#line 7017 "RESTSupport.c" +#line 7164 "RESTSupport.c" } static void publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate (PublishingRESTSupportGoogleSession* base) { PublishingRESTSupportGooglePublisherGoogleSessionImpl * self; -#line 781 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl); -#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->access_token); -#line 782 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->access_token = NULL; -#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 798 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->user_name); -#line 783 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 798 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->user_name = NULL; -#line 784 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->refresh_token); -#line 784 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->refresh_token = NULL; -#line 7037 "RESTSupport.c" +#line 7184 "RESTSupport.c" } static void publishing_rest_support_google_publisher_google_session_impl_class_init (PublishingRESTSupportGooglePublisherGoogleSessionImplClass * klass) { -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_google_session_impl_parent_class = g_type_class_peek_parent (klass); -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_rest_support_google_publisher_google_session_impl_finalize; -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_rest_support_google_publisher_google_session_impl_real_is_authenticated; -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->get_user_name = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_get_user_name; -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->get_access_token = (gchar* (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_get_access_token; -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGoogleSessionClass *) klass)->deauthenticate = (void (*) (PublishingRESTSupportGoogleSession *)) publishing_rest_support_google_publisher_google_session_impl_real_deauthenticate; -#line 7054 "RESTSupport.c" +#line 7201 "RESTSupport.c" } @@ -7068,17 +7215,17 @@ static void publishing_rest_support_google_publisher_google_session_impl_instanc static void publishing_rest_support_google_publisher_google_session_impl_finalize (PublishingRESTSupportSession * obj) { PublishingRESTSupportGooglePublisherGoogleSessionImpl * self; -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_GOOGLE_SESSION_IMPL, PublishingRESTSupportGooglePublisherGoogleSessionImpl); -#line 757 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 772 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->access_token); -#line 758 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 773 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->user_name); -#line 759 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 774 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->refresh_token); -#line 756 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 771 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_rest_support_google_publisher_google_session_impl_parent_class)->finalize (obj); -#line 7074 "RESTSupport.c" +#line 7221 "RESTSupport.c" } @@ -7099,28 +7246,28 @@ static PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_ PublishingRESTSupportGoogleSession* _tmp0_; const gchar* _tmp1_; PublishingRESTSupportHttpMethod _tmp2_; -#line 789 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); -#line 789 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (endpoint_url != NULL, NULL); -#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = session; -#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = endpoint_url; -#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = method; -#line 791 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 806 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportGooglePublisherAuthenticatedTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); -#line 789 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 7109 "RESTSupport.c" +#line 7256 "RESTSupport.c" } static PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new_with_endpoint_url (PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) { -#line 789 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_google_publisher_authenticated_transaction_construct_with_endpoint_url (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, session, endpoint_url, method); -#line 7116 "RESTSupport.c" +#line 7263 "RESTSupport.c" } @@ -7136,57 +7283,57 @@ PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_su gchar* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; -#line 794 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); -#line 794 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_return_val_if_fail (endpoint_url != NULL, NULL); -#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp0_ = session; -#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp1_ = endpoint_url; -#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp2_ = method; -#line 796 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 811 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = (PublishingRESTSupportGooglePublisherAuthenticatedTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); -#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp3_ = session; -#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp4_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 797 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 812 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _vala_assert (_tmp4_, "session.is_authenticated()"); -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp5_ = session; -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp6_ = publishing_rest_support_google_session_get_access_token (_tmp5_); -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp7_ = _tmp6_; -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp8_ = g_strconcat ("Bearer ", _tmp7_, NULL); -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _tmp9_ = _tmp8_; -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", _tmp9_); -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp9_); -#line 799 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 814 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (_tmp7_); -#line 794 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return self; -#line 7168 "RESTSupport.c" +#line 7315 "RESTSupport.c" } PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new (PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method) { -#line 794 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 809 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" return publishing_rest_support_google_publisher_authenticated_transaction_construct (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, session, endpoint_url, method); -#line 7175 "RESTSupport.c" +#line 7322 "RESTSupport.c" } static void publishing_rest_support_google_publisher_authenticated_transaction_class_init (PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass * klass) { -#line 788 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_authenticated_transaction_parent_class = g_type_class_peek_parent (klass); -#line 7182 "RESTSupport.c" +#line 7329 "RESTSupport.c" } @@ -7207,63 +7354,63 @@ GType publishing_rest_support_google_publisher_authenticated_transaction_get_typ static void publishing_rest_support_google_publisher_class_init (PublishingRESTSupportGooglePublisherClass * klass) { -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_parent_class = g_type_class_peek_parent (klass); -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" g_type_class_add_private (klass, sizeof (PublishingRESTSupportGooglePublisherPrivate)); -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->get_authenticator = (SpitPublishingAuthenticator* (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_get_authenticator; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->on_login_flow_complete = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_on_login_flow_complete; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->do_logout = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_do_logout; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->is_running = (gboolean (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_is_running; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->start = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_start; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" ((PublishingRESTSupportGooglePublisherClass *) klass)->stop = (void (*) (PublishingRESTSupportGooglePublisher *)) publishing_rest_support_google_publisher_real_stop; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" G_OBJECT_CLASS (klass)->finalize = publishing_rest_support_google_publisher_finalize; -#line 7221 "RESTSupport.c" +#line 7368 "RESTSupport.c" } static void publishing_rest_support_google_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" publishing_rest_support_google_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" iface->is_running = (gboolean (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_is_running; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" iface->start = (void (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_start; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" iface->stop = (void (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_stop; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" iface->get_service = (SpitPublishingService* (*) (SpitPublishingPublisher *)) publishing_rest_support_google_publisher_real_get_service; -#line 7236 "RESTSupport.c" +#line 7383 "RESTSupport.c" } static void publishing_rest_support_google_publisher_instance_init (PublishingRESTSupportGooglePublisher * self) { -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self->priv = PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_GET_PRIVATE (self); -#line 7243 "RESTSupport.c" +#line 7390 "RESTSupport.c" } static void publishing_rest_support_google_publisher_finalize (GObject * obj) { PublishingRESTSupportGooglePublisher * self; -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher); -#line 803 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 818 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_free0 (self->priv->scope); -#line 804 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 819 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 807 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 822 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" _g_object_unref0 (self->priv->authenticator); -#line 752 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" +#line 767 "/home/jens/Source/shotwell/plugins/common/RESTSupport.vala" G_OBJECT_CLASS (publishing_rest_support_google_publisher_parent_class)->finalize (obj); -#line 7259 "RESTSupport.c" +#line 7406 "RESTSupport.c" } diff --git a/plugins/common/RESTSupport.vala b/plugins/common/RESTSupport.vala index f06473c..d92c264 100644 --- a/plugins/common/RESTSupport.vala +++ b/plugins/common/RESTSupport.vala @@ -123,6 +123,20 @@ public class Argument { this.value = value; } + public static string serialize_list(Argument[] args, bool escape = false, string? separator = "&") { + var builder = new StringBuilder(""); + + foreach (var arg in args) { + builder.append(arg.to_string(escape)); + builder.append(separator); + } + + if (builder.len > 0) + builder.truncate(builder.len - separator.length); + + return builder.str; + } + public static int compare(Argument arg1, Argument arg2) { return strcmp(arg1.key, arg2.key); } @@ -136,8 +150,8 @@ public class Argument { return sorted_args.to_array(); } - public string to_string () { - return "%s=%s".printf (this.key, this.value); + public string to_string (bool escape = false) { + return "%s=%s%s%s".printf (this.key, escape ? "\"" : "", this.value, escape ? "\"" : ""); } } @@ -154,6 +168,7 @@ public class Transaction { public signal void chunk_transmitted(int bytes_written_so_far, int total_bytes); public signal void network_error(Spit.Publishing.PublishingError err); public signal void completed(); + public Transaction(Session parent_session, HttpMethod method = HttpMethod.POST) { // if our creator doesn't specify an endpoint url by using the Transaction.with_endpoint_url diff --git a/plugins/common/Resources.c b/plugins/common/Resources.c index fa81657..9558cc1 100644 --- a/plugins/common/Resources.c +++ b/plugins/common/Resources.c @@ -47,9 +47,9 @@ "51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n" #define RESOURCES_TRANSLATORS _ ("translator-credits") GdkPixbuf** resources_load_icon_set (GFile* icon_file, int* result_length1); -static void _vala_array_add2 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value); +static void _vala_array_add4 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value); GdkPixbuf** resources_load_from_resource (const gchar* resource_path, int* result_length1); -static void _vala_array_add3 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value); +static void _vala_array_add5 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value); 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); @@ -61,7 +61,7 @@ static gpointer _g_object_ref0 (gpointer self) { } -static void _vala_array_add2 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value) { +static void _vala_array_add4 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value) { #line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" if ((*length) == (*size)) { #line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" @@ -199,7 +199,7 @@ GdkPixbuf** resources_load_icon_set (GFile* icon_file, int* result_length1) { #line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" _tmp14_ = _g_object_ref0 (_tmp13_); #line 50 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _vala_array_add2 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp14_); + _vala_array_add4 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp14_); #line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala" _tmp15_ = icon_pixbuf_set; #line 51 "/home/jens/Source/shotwell/plugins/common/Resources.vala" @@ -238,7 +238,7 @@ GdkPixbuf** resources_load_icon_set (GFile* icon_file, int* result_length1) { } -static void _vala_array_add3 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value) { +static void _vala_array_add5 (GdkPixbuf** * array, int* length, int* size, GdkPixbuf* value) { #line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" if ((*length) == (*size)) { #line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" @@ -357,7 +357,7 @@ GdkPixbuf** resources_load_from_resource (const gchar* resource_path, int* resul #line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" _tmp9_ = _g_object_ref0 (_tmp8_); #line 67 "/home/jens/Source/shotwell/plugins/common/Resources.vala" - _vala_array_add3 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp9_); + _vala_array_add5 (&icon_pixbuf_set, &icon_pixbuf_set_length1, &_icon_pixbuf_set_size_, _tmp9_); #line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala" _tmp10_ = icon_pixbuf_set; #line 68 "/home/jens/Source/shotwell/plugins/common/Resources.vala" diff --git a/plugins/common/meson.build b/plugins/common/meson.build new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/common/meson.build diff --git a/plugins/meson.build b/plugins/meson.build new file mode 100644 index 0000000..66096c7 --- /dev/null +++ b/plugins/meson.build @@ -0,0 +1,24 @@ +# Plugin helper library + +sw_plugin_common = library('shotwell-plugin-common', + ['common/RESTSupport.vala', + 'common/Resources.vala', + 'common/WebAuthenticationPane.vala', + 'common/BuilderPane.vala', + 'common/OAuth1Support.vala'], + version: meson.project_version(), + dependencies : [gtk, gee, webkit, soup, xml, sw_plugin], + vala_header : 'shotwell-plugin-common.h', + vala_vapi : 'shotwell-plugin-common.vapi', + include_directories : config_incdir, + install : true) + +sw_plugin_common_dep = declare_dependency(include_directories : include_directories('.'), + link_with : sw_plugin_common) + +subdir('authenticator') +subdir('shotwell-publishing') +if get_option('enable-extra-plugins') + subdir('shotwell-publishing-extras') +endif +subdir('shotwell-transitions') diff --git a/plugins/shotwell-data-imports/FSpotDatabase.c b/plugins/shotwell-data-imports/FSpotDatabase.c deleted file mode 100644 index 617edb9..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabase.c +++ /dev/null @@ -1,555 +0,0 @@ -/* FSpotDatabase.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotDatabase.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <sqlite3.h> -#include <gio/gio.h> -#include <shotwell-plugin-dev-1.0.h> -#include <stdlib.h> -#include <string.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE (data_imports_fspot_db_fspot_database_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabase)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabase DataImportsFSpotDbFSpotDatabase; -typedef struct _DataImportsFSpotDbFSpotDatabaseClass DataImportsFSpotDbFSpotDatabaseClass; -typedef struct _DataImportsFSpotDbFSpotDatabasePrivate DataImportsFSpotDbFSpotDatabasePrivate; - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE (data_imports_fspot_db_fspot_photos_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosTable DataImportsFSpotDbFSpotPhotosTable; -typedef struct _DataImportsFSpotDbFSpotPhotosTableClass DataImportsFSpotDbFSpotPhotosTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE (data_imports_fspot_db_fspot_photo_versions_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTable DataImportsFSpotDbFSpotPhotoVersionsTable; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTableClass DataImportsFSpotDbFSpotPhotoVersionsTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE (data_imports_fspot_db_fspot_tags_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotTagsTable DataImportsFSpotDbFSpotTagsTable; -typedef struct _DataImportsFSpotDbFSpotTagsTableClass DataImportsFSpotDbFSpotTagsTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE (data_imports_fspot_db_fspot_rolls_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsTable DataImportsFSpotDbFSpotRollsTable; -typedef struct _DataImportsFSpotDbFSpotRollsTableClass DataImportsFSpotDbFSpotRollsTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE (data_imports_fspot_db_fspot_meta_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass)) - -typedef struct _DataImportsFSpotDbFSpotMetaTable DataImportsFSpotDbFSpotMetaTable; -typedef struct _DataImportsFSpotDbFSpotMetaTableClass DataImportsFSpotDbFSpotMetaTableClass; -#define _sqlite3_close0(var) ((var == NULL) ? NULL : (var = (sqlite3_close (var), NULL))) -#define _importable_database_table_unref0(var) ((var == NULL) ? NULL : (var = (importable_database_table_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define UTILS_TYPE_VERSION_NUMBER (utils_version_number_get_type ()) -#define UTILS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber)) -#define UTILS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) -#define UTILS_IS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_IS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_VERSION_NUMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) - -typedef struct _UtilsVersionNumber UtilsVersionNumber; -typedef struct _UtilsVersionNumberClass UtilsVersionNumberClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; - -struct _DataImportsFSpotDbFSpotDatabase { - GObject parent_instance; - DataImportsFSpotDbFSpotDatabasePrivate * priv; - DataImportsFSpotDbFSpotPhotosTable* photos_table; - DataImportsFSpotDbFSpotPhotoVersionsTable* photo_versions_table; - DataImportsFSpotDbFSpotTagsTable* tags_table; - DataImportsFSpotDbFSpotRollsTable* rolls_table; - gint64 hidden_tag_id; -}; - -struct _DataImportsFSpotDbFSpotDatabaseClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotDatabasePrivate { - sqlite3* fspot_db; - DataImportsFSpotDbFSpotMetaTable* meta_table; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () - -static gpointer data_imports_fspot_db_fspot_database_parent_class = NULL; - -#define DATA_IMPORTS_FSPOT_DB_NULL_ID ((gint64) 0) -#define DATA_IMPORTS_FSPOT_DB_INVALID_ID ((gint64) -1) -void data_imports_fspot_db_init (void); -void data_imports_fspot_db_fspot_database_behavior_create_behavior_map (void); -GType data_imports_fspot_db_fspot_database_get_type (void) G_GNUC_CONST; -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photos_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_versions_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_tags_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_rolls_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_meta_table_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabasePrivate)) -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_DUMMY_PROPERTY -}; -GQuark database_error_quark (void); -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_new (GFile* db_file, GError** error); -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_construct (GType object_type, GFile* db_file, GError** error); -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_new (sqlite3* db); -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_construct (GType object_type, sqlite3* db); -gint64 data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (DataImportsFSpotDbFSpotMetaTable* self, GError** error); -GType utils_version_number_get_type (void) G_GNUC_CONST; -static UtilsVersionNumber* data_imports_fspot_db_fspot_database_get_version (DataImportsFSpotDbFSpotDatabase* self, GError** error); -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_new (UtilsVersionNumber* version, GError** error); -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_construct (GType object_type, UtilsVersionNumber* version, GError** error); -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -gchar* data_imports_fspot_db_fspot_meta_table_get_db_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error); -UtilsVersionNumber* utils_version_number_new_from_string (const gchar* str_version, const gchar* separator); -UtilsVersionNumber* utils_version_number_construct_from_string (GType object_type, const gchar* str_version, const gchar* separator); -static void data_imports_fspot_db_fspot_database_finalize (GObject * obj); - - -/** - * Initialization method for the whole module. - */ -void data_imports_fspot_db_init (void) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - data_imports_fspot_db_fspot_database_behavior_create_behavior_map (); -#line 209 "FSpotDatabase.c" -} - - -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_construct (GType object_type, GFile* db_file, GError** error) { - DataImportsFSpotDbFSpotDatabase * self = NULL; - gchar* filename = NULL; - GFile* _tmp0_; - gchar* _tmp1_; - gint res = 0; - sqlite3* _tmp2_ = NULL; - gint _tmp3_; - sqlite3* _tmp5_; - DataImportsFSpotDbFSpotMetaTable* _tmp6_; - gint64 _tmp7_ = 0LL; - DataImportsFSpotDbFSpotMetaTable* _tmp8_; - gint64 _tmp9_; - UtilsVersionNumber* _tmp10_ = NULL; - UtilsVersionNumber* _tmp11_; - DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior = NULL; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp12_; - sqlite3* _tmp13_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp14_; - DataImportsFSpotDbFSpotPhotosTable* _tmp15_; - sqlite3* _tmp16_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp17_; - DataImportsFSpotDbFSpotPhotoVersionsTable* _tmp18_; - sqlite3* _tmp19_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp20_; - DataImportsFSpotDbFSpotTagsTable* _tmp21_; - sqlite3* _tmp22_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp23_; - DataImportsFSpotDbFSpotRollsTable* _tmp24_; - GError * _inner_error_ = NULL; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_return_val_if_fail (G_IS_FILE (db_file), NULL); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self = (DataImportsFSpotDbFSpotDatabase*) g_object_new (object_type, NULL); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp0_ = db_file; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp1_ = g_file_get_path (_tmp0_); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - filename = _tmp1_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp3_ = sqlite3_open_v2 (filename, &_tmp2_, SQLITE_OPEN_READONLY, NULL); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _sqlite3_close0 (self->priv->fspot_db); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->priv->fspot_db = _tmp2_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - res = _tmp3_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (res != SQLITE_OK) { -#line 263 "FSpotDatabase.c" - GError* _tmp4_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp4_ = g_error_new (DATABASE_ERROR, DATABASE_ERROR_ERROR, "Unable to open F-Spot database %s: %d", filename, res); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _inner_error_ = _tmp4_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) { -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_propagate_error (error, _inner_error_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (self); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 279 "FSpotDatabase.c" - } else { -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_clear_error (&_inner_error_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 289 "FSpotDatabase.c" - } - } -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp5_ = self->priv->fspot_db; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp6_ = data_imports_fspot_db_fspot_meta_table_new (_tmp5_); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->priv->meta_table); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->priv->meta_table = _tmp6_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp8_ = self->priv->meta_table; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp9_ = data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (_tmp8_, &_inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp7_ = _tmp9_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_propagate_error (error, _inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (self); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 318 "FSpotDatabase.c" - } else { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_clear_error (&_inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 328 "FSpotDatabase.c" - } - } -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->hidden_tag_id = _tmp7_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp11_ = data_imports_fspot_db_fspot_database_get_version (self, &_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp10_ = _tmp11_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_propagate_error (error, _inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (self); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 349 "FSpotDatabase.c" - } else { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_clear_error (&_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 359 "FSpotDatabase.c" - } - } -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp12_ = data_imports_fspot_db_fspot_database_behavior_new (_tmp10_, &_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - db_behavior = _tmp12_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_propagate_error (error, _inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (_tmp10_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (self); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 380 "FSpotDatabase.c" - } else { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (_tmp10_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_clear_error (&_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 392 "FSpotDatabase.c" - } - } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp13_ = self->priv->fspot_db; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp14_ = db_behavior; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp15_ = data_imports_fspot_db_fspot_photos_table_new (_tmp13_, _tmp14_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->photos_table); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->photos_table = _tmp15_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp16_ = self->priv->fspot_db; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp17_ = db_behavior; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp18_ = data_imports_fspot_db_fspot_photo_versions_table_new (_tmp16_, _tmp17_); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->photo_versions_table); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->photo_versions_table = _tmp18_; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp19_ = self->priv->fspot_db; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp20_ = db_behavior; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp21_ = data_imports_fspot_db_fspot_tags_table_new (_tmp19_, _tmp20_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->tags_table); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->tags_table = _tmp21_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp22_ = self->priv->fspot_db; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp23_ = db_behavior; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp24_ = data_imports_fspot_db_fspot_rolls_table_new (_tmp22_, _tmp23_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->rolls_table); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->rolls_table = _tmp24_; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (db_behavior); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_object_unref0 (_tmp10_); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (filename); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return self; -#line 443 "FSpotDatabase.c" -} - - -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_new (GFile* db_file, GError** error) { -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return data_imports_fspot_db_fspot_database_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, db_file, error); -#line 450 "FSpotDatabase.c" -} - - -static UtilsVersionNumber* data_imports_fspot_db_fspot_database_get_version (DataImportsFSpotDbFSpotDatabase* self, GError** error) { - UtilsVersionNumber* result = NULL; - gchar* _tmp0_ = NULL; - DataImportsFSpotDbFSpotMetaTable* _tmp1_; - gchar* _tmp2_; - UtilsVersionNumber* _tmp3_; - GError * _inner_error_ = NULL; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE (self), NULL); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp1_ = self->priv->meta_table; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp2_ = data_imports_fspot_db_fspot_meta_table_get_db_version (_tmp1_, &_inner_error_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp0_ = _tmp2_; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_propagate_error (error, _inner_error_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 477 "FSpotDatabase.c" - } else { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_clear_error (&_inner_error_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return NULL; -#line 485 "FSpotDatabase.c" - } - } -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _tmp3_ = utils_version_number_new_from_string (_tmp0_, "."); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - result = _tmp3_; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _g_free0 (_tmp0_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - return result; -#line 496 "FSpotDatabase.c" -} - - -static void data_imports_fspot_db_fspot_database_class_init (DataImportsFSpotDbFSpotDatabaseClass * klass) { -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - data_imports_fspot_db_fspot_database_parent_class = g_type_class_peek_parent (klass); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotDatabasePrivate)); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_database_finalize; -#line 507 "FSpotDatabase.c" -} - - -static void data_imports_fspot_db_fspot_database_instance_init (DataImportsFSpotDbFSpotDatabase * self) { -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_PRIVATE (self); -#line 514 "FSpotDatabase.c" -} - - -static void data_imports_fspot_db_fspot_database_finalize (GObject * obj) { - DataImportsFSpotDbFSpotDatabase * self; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabase); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _sqlite3_close0 (self->priv->fspot_db); -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->priv->meta_table); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->photos_table); -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->photo_versions_table); -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->tags_table); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - _importable_database_table_unref0 (self->rolls_table); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_database_parent_class)->finalize (obj); -#line 536 "FSpotDatabase.c" -} - - -/** - * An object that is able to read from the F-Spot - * database and extract the relevant objects. - */ -GType data_imports_fspot_db_fspot_database_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_database_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_database_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotDatabaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_database_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotDatabase), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_database_instance_init, NULL }; - GType data_imports_fspot_db_fspot_database_type_id; - data_imports_fspot_db_fspot_database_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotDatabase", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_database_type_id__volatile, data_imports_fspot_db_fspot_database_type_id); - } - return data_imports_fspot_db_fspot_database_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotDatabase.vala b/plugins/shotwell-data-imports/FSpotDatabase.vala deleted file mode 100644 index 979171c..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabase.vala +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -public const int64 NULL_ID = 0; -public const int64 INVALID_ID = -1; - -/** - * Initialization method for the whole module. - */ -public void init() { - FSpotDatabaseBehavior.create_behavior_map(); -} - -/** - * An object that is able to read from the F-Spot - * database and extract the relevant objects. - */ -public class FSpotDatabase : Object { - private Sqlite.Database fspot_db; - private FSpotMetaTable meta_table; - public FSpotPhotosTable photos_table; - public FSpotPhotoVersionsTable photo_versions_table; - public FSpotTagsTable tags_table; - public FSpotRollsTable rolls_table; - public int64 hidden_tag_id; - - public FSpotDatabase(File db_file) throws DatabaseError, Spit.DataImports.DataImportError { - string filename = db_file.get_path(); - int res = Sqlite.Database.open_v2(filename, out fspot_db, - Sqlite.OPEN_READONLY, null); - if (res != Sqlite.OK) - throw new DatabaseError.ERROR("Unable to open F-Spot database %s: %d", filename, res); - meta_table = new FSpotMetaTable(fspot_db); - hidden_tag_id = meta_table.get_hidden_tag_id(); - - FSpotDatabaseBehavior db_behavior = new FSpotDatabaseBehavior(get_version()); - - photos_table = new FSpotPhotosTable(fspot_db, db_behavior); - photo_versions_table = new FSpotPhotoVersionsTable(fspot_db, db_behavior); - tags_table = new FSpotTagsTable(fspot_db, db_behavior); - rolls_table = new FSpotRollsTable(fspot_db, db_behavior); - } - - ~FSpotDatabase() { - } - - private Utils.VersionNumber get_version() throws DatabaseError { - return new Utils.VersionNumber.from_string(meta_table.get_db_version()); - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotDatabaseBehavior.c b/plugins/shotwell-data-imports/FSpotDatabaseBehavior.c deleted file mode 100644 index 74516f1..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabaseBehavior.c +++ /dev/null @@ -1,2085 +0,0 @@ -/* FSpotDatabaseBehavior.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotDatabaseBehavior.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> -#include <gee.h> -#include <shotwell-plugin-dev-1.0.h> -#include <gobject/gvaluecollector.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY (data_imports_fspot_db_fspot_behavior_entry_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, DataImportsFSpotDbFSpotBehaviorEntry)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, DataImportsFSpotDbFSpotBehaviorEntryClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_BEHAVIOR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_BEHAVIOR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, DataImportsFSpotDbFSpotBehaviorEntryClass)) - -typedef struct _DataImportsFSpotDbFSpotBehaviorEntry DataImportsFSpotDbFSpotBehaviorEntry; -typedef struct _DataImportsFSpotDbFSpotBehaviorEntryClass DataImportsFSpotDbFSpotBehaviorEntryClass; -typedef struct _DataImportsFSpotDbFSpotBehaviorEntryPrivate DataImportsFSpotDbFSpotBehaviorEntryPrivate; - -#define UTILS_TYPE_VERSION_NUMBER (utils_version_number_get_type ()) -#define UTILS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber)) -#define UTILS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) -#define UTILS_IS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_IS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_VERSION_NUMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) - -typedef struct _UtilsVersionNumber UtilsVersionNumber; -typedef struct _UtilsVersionNumberClass UtilsVersionNumberClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -typedef struct _DataImportsFSpotDbParamSpecFSpotBehaviorEntry DataImportsFSpotDbParamSpecFSpotBehaviorEntry; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorPrivate DataImportsFSpotDbFSpotDatabaseBehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW (data_imports_fspot_db_fspot_photo_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoRow DataImportsFSpotDbFSpotPhotoRow; -typedef struct _DataImportsFSpotDbFSpotPhotoRowClass DataImportsFSpotDbFSpotPhotoRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW (data_imports_fspot_db_fspot_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotTagRow DataImportsFSpotDbFSpotTagRow; -typedef struct _DataImportsFSpotDbFSpotTagRowClass DataImportsFSpotDbFSpotTagRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW (data_imports_fspot_db_fspot_photo_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagRow DataImportsFSpotDbFSpotPhotoTagRow; -typedef struct _DataImportsFSpotDbFSpotPhotoTagRowClass DataImportsFSpotDbFSpotPhotoTagRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW (data_imports_fspot_db_fspot_photo_version_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRow DataImportsFSpotDbFSpotPhotoVersionRow; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRowClass DataImportsFSpotDbFSpotPhotoVersionRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW (data_imports_fspot_db_fspot_roll_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) - -typedef struct _DataImportsFSpotDbFSpotRollRow DataImportsFSpotDbFSpotRollRow; -typedef struct _DataImportsFSpotDbFSpotRollRowClass DataImportsFSpotDbFSpotRollRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photos_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV0Behavior DataImportsFSpotDbFSpotPhotosV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV0BehaviorClass DataImportsFSpotDbFSpotPhotosV0BehaviorClass; -#define _data_imports_fspot_db_fspot_behavior_entry_unref0(var) ((var == NULL) ? NULL : (var = (data_imports_fspot_db_fspot_behavior_entry_unref (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR (data_imports_fspot_db_fspot_photos_v5_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV5Behavior DataImportsFSpotDbFSpotPhotosV5Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV5BehaviorClass DataImportsFSpotDbFSpotPhotosV5BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR (data_imports_fspot_db_fspot_photos_v7_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V7_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V7_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV7Behavior DataImportsFSpotDbFSpotPhotosV7Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV7BehaviorClass DataImportsFSpotDbFSpotPhotosV7BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR (data_imports_fspot_db_fspot_photos_v11_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V11_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V11_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV11Behavior DataImportsFSpotDbFSpotPhotosV11Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV11BehaviorClass DataImportsFSpotDbFSpotPhotosV11BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR (data_imports_fspot_db_fspot_photos_v16_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV16Behavior DataImportsFSpotDbFSpotPhotosV16Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV16BehaviorClass DataImportsFSpotDbFSpotPhotosV16BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR (data_imports_fspot_db_fspot_photos_v17_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV17Behavior DataImportsFSpotDbFSpotPhotosV17Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV17BehaviorClass DataImportsFSpotDbFSpotPhotosV17BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR (data_imports_fspot_db_fspot_photos_v18_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV18Behavior DataImportsFSpotDbFSpotPhotosV18Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV18BehaviorClass DataImportsFSpotDbFSpotPhotosV18BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR (data_imports_fspot_db_fspot_tags_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotTagsV0Behavior DataImportsFSpotDbFSpotTagsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotTagsV0BehaviorClass DataImportsFSpotDbFSpotTagsV0BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagsV0Behavior DataImportsFSpotDbFSpotPhotoTagsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV0Behavior DataImportsFSpotDbFSpotPhotoVersionsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV9Behavior DataImportsFSpotDbFSpotPhotoVersionsV9Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV16Behavior DataImportsFSpotDbFSpotPhotoVersionsV16Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV17Behavior DataImportsFSpotDbFSpotPhotoVersionsV17Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV18Behavior DataImportsFSpotDbFSpotPhotoVersionsV18Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR (data_imports_fspot_db_fspot_rolls_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsV0Behavior DataImportsFSpotDbFSpotRollsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotRollsV0BehaviorClass DataImportsFSpotDbFSpotRollsV0BehaviorClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR (data_imports_fspot_db_fspot_rolls_v5_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsV5Behavior DataImportsFSpotDbFSpotRollsV5Behavior; -typedef struct _DataImportsFSpotDbFSpotRollsV5BehaviorClass DataImportsFSpotDbFSpotRollsV5BehaviorClass; -#define _g_free0(var) (var = (g_free (var), NULL)) - -struct _DataImportsFSpotDbFSpotBehaviorEntry { - GTypeInstance parent_instance; - volatile int ref_count; - DataImportsFSpotDbFSpotBehaviorEntryPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotBehaviorEntryClass { - GTypeClass parent_class; - void (*finalize) (DataImportsFSpotDbFSpotBehaviorEntry *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotBehaviorEntryPrivate { - UtilsVersionNumber* version; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbParamSpecFSpotBehaviorEntry { - GParamSpec parent_instance; -}; - -struct _DataImportsFSpotDbFSpotDatabaseBehavior { - GObject parent_instance; - DataImportsFSpotDbFSpotDatabaseBehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotDatabaseBehaviorPrivate { - DataImportsFSpotDbFSpotTableBehavior* photos_behavior; - DataImportsFSpotDbFSpotTableBehavior* tags_behavior; - DataImportsFSpotDbFSpotTableBehavior* photo_tags_behavior; - DataImportsFSpotDbFSpotTableBehavior* photo_versions_behavior; - DataImportsFSpotDbFSpotTableBehavior* rolls_behavior; -}; - - -static gpointer data_imports_fspot_db_fspot_behavior_entry_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_database_behavior_parent_class = NULL; -extern UtilsVersionNumber* data_imports_fspot_db_fspot_database_behavior_MIN_UNSUPPORTED_VERSION; -UtilsVersionNumber* data_imports_fspot_db_fspot_database_behavior_MIN_UNSUPPORTED_VERSION = NULL; -static GeeMap* data_imports_fspot_db_fspot_database_behavior_behavior_map; -static GeeMap* data_imports_fspot_db_fspot_database_behavior_behavior_map = NULL; - -gpointer data_imports_fspot_db_fspot_behavior_entry_ref (gpointer instance); -void data_imports_fspot_db_fspot_behavior_entry_unref (gpointer instance); -GParamSpec* data_imports_fspot_db_param_spec_fspot_behavior_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void data_imports_fspot_db_value_set_fspot_behavior_entry (GValue* value, gpointer v_object); -void data_imports_fspot_db_value_take_fspot_behavior_entry (GValue* value, gpointer v_object); -gpointer data_imports_fspot_db_value_get_fspot_behavior_entry (const GValue* value); -GType data_imports_fspot_db_fspot_behavior_entry_get_type (void) G_GNUC_CONST; -GType utils_version_number_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, DataImportsFSpotDbFSpotBehaviorEntryPrivate)) -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotBehaviorEntry* data_imports_fspot_db_fspot_behavior_entry_new (UtilsVersionNumber* version, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotBehaviorEntry* data_imports_fspot_db_fspot_behavior_entry_construct (GType object_type, UtilsVersionNumber* version, DataImportsFSpotDbFSpotTableBehavior* behavior); -UtilsVersionNumber* data_imports_fspot_db_fspot_behavior_entry_get_version (DataImportsFSpotDbFSpotBehaviorEntry* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_behavior_entry_get_behavior (DataImportsFSpotDbFSpotBehaviorEntry* self); -static void data_imports_fspot_db_fspot_behavior_entry_finalize (DataImportsFSpotDbFSpotBehaviorEntry * obj); -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_tag_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_tag_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_version_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_roll_row_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorPrivate)) -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_DUMMY_PROPERTY -}; -UtilsVersionNumber* utils_version_number_new (gint* version, int version_length1); -UtilsVersionNumber* utils_version_number_construct (GType object_type, gint* version, int version_length1); -void data_imports_fspot_db_fspot_database_behavior_create_behavior_map (void); -GType data_imports_fspot_db_fspot_photos_v0_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v5_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v7_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v11_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v16_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v17_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photos_v18_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_get_instance (void); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME "Photos" -GType data_imports_fspot_db_fspot_tags_v0_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (void); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME "Tags" -GType data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_instance (void); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_TABLE_NAME "Photo_Tags" -GType data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_instance (void); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME "Photo_versions" -GType data_imports_fspot_db_fspot_rolls_v0_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_get_instance (void); -GType data_imports_fspot_db_fspot_rolls_v5_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_get_instance (void); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME "Rolls" -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_find_behavior (const gchar* table_name, UtilsVersionNumber* version); -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_new (UtilsVersionNumber* version, GError** error); -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_construct (GType object_type, UtilsVersionNumber* version, GError** error); -gchar* utils_version_number_to_string (UtilsVersionNumber* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photos_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_versions_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_rolls_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -static void data_imports_fspot_db_fspot_database_behavior_finalize (GObject * obj); - - -static gpointer _g_object_ref0 (gpointer self) { -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return self ? g_object_ref (self) : NULL; -#line 410 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotBehaviorEntry* data_imports_fspot_db_fspot_behavior_entry_construct (GType object_type, UtilsVersionNumber* version, DataImportsFSpotDbFSpotTableBehavior* behavior) { - DataImportsFSpotDbFSpotBehaviorEntry* self = NULL; - UtilsVersionNumber* _tmp0_; - UtilsVersionNumber* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (UTILS_IS_VERSION_NUMBER (version), NULL); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR (behavior), NULL); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self = (DataImportsFSpotDbFSpotBehaviorEntry*) g_type_create_instance (object_type); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = version; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->version); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->version = _tmp1_; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_ = behavior; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->behavior); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->behavior = _tmp3_; -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return self; -#line 444 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotBehaviorEntry* data_imports_fspot_db_fspot_behavior_entry_new (UtilsVersionNumber* version, DataImportsFSpotDbFSpotTableBehavior* behavior) { -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return data_imports_fspot_db_fspot_behavior_entry_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, version, behavior); -#line 451 "FSpotDatabaseBehavior.c" -} - - -UtilsVersionNumber* data_imports_fspot_db_fspot_behavior_entry_get_version (DataImportsFSpotDbFSpotBehaviorEntry* self) { - UtilsVersionNumber* result = NULL; - UtilsVersionNumber* _tmp0_; - UtilsVersionNumber* _tmp1_; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_BEHAVIOR_ENTRY (self), NULL); -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->version; -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 469 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_behavior_entry_get_behavior (DataImportsFSpotDbFSpotBehaviorEntry* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_BEHAVIOR_ENTRY (self), NULL); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->behavior; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 487 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_value_fspot_behavior_entry_init (GValue* value) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = NULL; -#line 494 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_value_fspot_behavior_entry_free_value (GValue* value) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (value->data[0].v_pointer) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_behavior_entry_unref (value->data[0].v_pointer); -#line 503 "FSpotDatabaseBehavior.c" - } -} - - -static void data_imports_fspot_db_value_fspot_behavior_entry_copy_value (const GValue* src_value, GValue* dest_value) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (src_value->data[0].v_pointer) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - dest_value->data[0].v_pointer = data_imports_fspot_db_fspot_behavior_entry_ref (src_value->data[0].v_pointer); -#line 513 "FSpotDatabaseBehavior.c" - } else { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - dest_value->data[0].v_pointer = NULL; -#line 517 "FSpotDatabaseBehavior.c" - } -} - - -static gpointer data_imports_fspot_db_value_fspot_behavior_entry_peek_pointer (const GValue* value) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return value->data[0].v_pointer; -#line 525 "FSpotDatabaseBehavior.c" -} - - -static gchar* data_imports_fspot_db_value_fspot_behavior_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (collect_values[0].v_pointer) { -#line 532 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotBehaviorEntry * object; - object = collect_values[0].v_pointer; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (object->parent_instance.g_class == NULL) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 539 "FSpotDatabaseBehavior.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 543 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = data_imports_fspot_db_fspot_behavior_entry_ref (object); -#line 547 "FSpotDatabaseBehavior.c" - } else { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = NULL; -#line 551 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 555 "FSpotDatabaseBehavior.c" -} - - -static gchar* data_imports_fspot_db_value_fspot_behavior_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { - DataImportsFSpotDbFSpotBehaviorEntry ** object_p; - object_p = collect_values[0].v_pointer; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (!object_p) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 566 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (!value->data[0].v_pointer) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - *object_p = NULL; -#line 572 "FSpotDatabaseBehavior.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - *object_p = value->data[0].v_pointer; -#line 576 "FSpotDatabaseBehavior.c" - } else { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - *object_p = data_imports_fspot_db_fspot_behavior_entry_ref (value->data[0].v_pointer); -#line 580 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 584 "FSpotDatabaseBehavior.c" -} - - -GParamSpec* data_imports_fspot_db_param_spec_fspot_behavior_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { - DataImportsFSpotDbParamSpecFSpotBehaviorEntry* spec; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (g_type_is_a (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY), NULL); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return G_PARAM_SPEC (spec); -#line 598 "FSpotDatabaseBehavior.c" -} - - -gpointer data_imports_fspot_db_value_get_fspot_behavior_entry (const GValue* value) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY), NULL); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return value->data[0].v_pointer; -#line 607 "FSpotDatabaseBehavior.c" -} - - -void data_imports_fspot_db_value_set_fspot_behavior_entry (GValue* value, gpointer v_object) { - DataImportsFSpotDbFSpotBehaviorEntry * old; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - old = value->data[0].v_pointer; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (v_object) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = v_object; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_behavior_entry_ref (value->data[0].v_pointer); -#line 627 "FSpotDatabaseBehavior.c" - } else { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = NULL; -#line 631 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (old) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_behavior_entry_unref (old); -#line 637 "FSpotDatabaseBehavior.c" - } -} - - -void data_imports_fspot_db_value_take_fspot_behavior_entry (GValue* value, gpointer v_object) { - DataImportsFSpotDbFSpotBehaviorEntry * old; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - old = value->data[0].v_pointer; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (v_object) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY)); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = v_object; -#line 656 "FSpotDatabaseBehavior.c" - } else { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - value->data[0].v_pointer = NULL; -#line 660 "FSpotDatabaseBehavior.c" - } -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (old) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_behavior_entry_unref (old); -#line 666 "FSpotDatabaseBehavior.c" - } -} - - -static void data_imports_fspot_db_fspot_behavior_entry_class_init (DataImportsFSpotDbFSpotBehaviorEntryClass * klass) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_behavior_entry_parent_class = g_type_class_peek_parent (klass); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - ((DataImportsFSpotDbFSpotBehaviorEntryClass *) klass)->finalize = data_imports_fspot_db_fspot_behavior_entry_finalize; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotBehaviorEntryPrivate)); -#line 678 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_fspot_behavior_entry_instance_init (DataImportsFSpotDbFSpotBehaviorEntry * self) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_GET_PRIVATE (self); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->ref_count = 1; -#line 687 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_fspot_behavior_entry_finalize (DataImportsFSpotDbFSpotBehaviorEntry * obj) { - DataImportsFSpotDbFSpotBehaviorEntry * self; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, DataImportsFSpotDbFSpotBehaviorEntry); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_signal_handlers_destroy (self); -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->version); -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->behavior); -#line 701 "FSpotDatabaseBehavior.c" -} - - -GType data_imports_fspot_db_fspot_behavior_entry_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_behavior_entry_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_behavior_entry_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { data_imports_fspot_db_value_fspot_behavior_entry_init, data_imports_fspot_db_value_fspot_behavior_entry_free_value, data_imports_fspot_db_value_fspot_behavior_entry_copy_value, data_imports_fspot_db_value_fspot_behavior_entry_peek_pointer, "p", data_imports_fspot_db_value_fspot_behavior_entry_collect_value, "p", data_imports_fspot_db_value_fspot_behavior_entry_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotBehaviorEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_behavior_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotBehaviorEntry), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_behavior_entry_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType data_imports_fspot_db_fspot_behavior_entry_type_id; - data_imports_fspot_db_fspot_behavior_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DataImportsFSpotDbFSpotBehaviorEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_behavior_entry_type_id__volatile, data_imports_fspot_db_fspot_behavior_entry_type_id); - } - return data_imports_fspot_db_fspot_behavior_entry_type_id__volatile; -} - - -gpointer data_imports_fspot_db_fspot_behavior_entry_ref (gpointer instance) { - DataImportsFSpotDbFSpotBehaviorEntry * self; - self = instance; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_atomic_int_inc (&self->ref_count); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return instance; -#line 726 "FSpotDatabaseBehavior.c" -} - - -void data_imports_fspot_db_fspot_behavior_entry_unref (gpointer instance) { - DataImportsFSpotDbFSpotBehaviorEntry * self; - self = instance; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - DATA_IMPORTS_FSPOT_DB_FSPOT_BEHAVIOR_ENTRY_GET_CLASS (self)->finalize (self); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 739 "FSpotDatabaseBehavior.c" - } -} - - -void data_imports_fspot_db_fspot_database_behavior_create_behavior_map (void) { - GeeHashMap* _tmp0_; - GeeList* photos_list = NULL; - GeeArrayList* _tmp1_; - gint* _tmp2_; - gint* _tmp3_; - gint _tmp3__length1; - UtilsVersionNumber* _tmp4_; - UtilsVersionNumber* _tmp5_; - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp6_; - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp7_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp8_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp9_; - gint* _tmp10_; - gint* _tmp11_; - gint _tmp11__length1; - UtilsVersionNumber* _tmp12_; - UtilsVersionNumber* _tmp13_; - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp14_; - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp15_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp16_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp17_; - gint* _tmp18_; - gint* _tmp19_; - gint _tmp19__length1; - UtilsVersionNumber* _tmp20_; - UtilsVersionNumber* _tmp21_; - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp22_; - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp23_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp24_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp25_; - gint* _tmp26_; - gint* _tmp27_; - gint _tmp27__length1; - UtilsVersionNumber* _tmp28_; - UtilsVersionNumber* _tmp29_; - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp30_; - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp31_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp32_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp33_; - gint* _tmp34_; - gint* _tmp35_; - gint _tmp35__length1; - UtilsVersionNumber* _tmp36_; - UtilsVersionNumber* _tmp37_; - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp38_; - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp39_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp40_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp41_; - gint* _tmp42_; - gint* _tmp43_; - gint _tmp43__length1; - UtilsVersionNumber* _tmp44_; - UtilsVersionNumber* _tmp45_; - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp46_; - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp47_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp48_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp49_; - gint* _tmp50_; - gint* _tmp51_; - gint _tmp51__length1; - UtilsVersionNumber* _tmp52_; - UtilsVersionNumber* _tmp53_; - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp54_; - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp55_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp56_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp57_; - GeeMap* _tmp58_; - GeeList* tags_list = NULL; - GeeArrayList* _tmp59_; - gint* _tmp60_; - gint* _tmp61_; - gint _tmp61__length1; - UtilsVersionNumber* _tmp62_; - UtilsVersionNumber* _tmp63_; - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp64_; - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp65_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp66_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp67_; - GeeMap* _tmp68_; - GeeList* photo_tags_list = NULL; - GeeArrayList* _tmp69_; - gint* _tmp70_; - gint* _tmp71_; - gint _tmp71__length1; - UtilsVersionNumber* _tmp72_; - UtilsVersionNumber* _tmp73_; - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp74_; - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp75_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp76_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp77_; - GeeMap* _tmp78_; - GeeList* photo_versions_list = NULL; - GeeArrayList* _tmp79_; - gint* _tmp80_; - gint* _tmp81_; - gint _tmp81__length1; - UtilsVersionNumber* _tmp82_; - UtilsVersionNumber* _tmp83_; - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp84_; - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp85_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp86_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp87_; - gint* _tmp88_; - gint* _tmp89_; - gint _tmp89__length1; - UtilsVersionNumber* _tmp90_; - UtilsVersionNumber* _tmp91_; - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp92_; - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp93_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp94_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp95_; - gint* _tmp96_; - gint* _tmp97_; - gint _tmp97__length1; - UtilsVersionNumber* _tmp98_; - UtilsVersionNumber* _tmp99_; - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp100_; - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp101_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp102_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp103_; - gint* _tmp104_; - gint* _tmp105_; - gint _tmp105__length1; - UtilsVersionNumber* _tmp106_; - UtilsVersionNumber* _tmp107_; - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp108_; - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp109_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp110_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp111_; - gint* _tmp112_; - gint* _tmp113_; - gint _tmp113__length1; - UtilsVersionNumber* _tmp114_; - UtilsVersionNumber* _tmp115_; - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp116_; - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp117_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp118_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp119_; - GeeMap* _tmp120_; - GeeList* rolls_list = NULL; - GeeArrayList* _tmp121_; - gint* _tmp122_; - gint* _tmp123_; - gint _tmp123__length1; - UtilsVersionNumber* _tmp124_; - UtilsVersionNumber* _tmp125_; - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp126_; - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp127_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp128_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp129_; - gint* _tmp130_; - gint* _tmp131_; - gint _tmp131__length1; - UtilsVersionNumber* _tmp132_; - UtilsVersionNumber* _tmp133_; - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp134_; - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp135_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp136_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp137_; - GeeMap* _tmp138_; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_database_behavior_behavior_map); -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_database_behavior_behavior_map = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, (GBoxedCopyFunc) data_imports_fspot_db_fspot_behavior_entry_ref, (GDestroyNotify) data_imports_fspot_db_fspot_behavior_entry_unref, NULL, NULL, NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photos_list = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_LIST, GeeList); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_ = g_new0 (gint, 1); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_[0] = 0; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3_ = _tmp2_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3__length1 = 1; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp4_ = utils_version_number_new (_tmp3_, 1); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp5_ = _tmp4_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp6_ = data_imports_fspot_db_fspot_photos_v0_behavior_get_instance (); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp7_ = _tmp6_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp8_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp9_ = _tmp8_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp9_); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp7_); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp5_); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3_ = (g_free (_tmp3_), NULL); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp10_ = g_new0 (gint, 1); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp10_[0] = 5; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp11_ = _tmp10_; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp11__length1 = 1; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp12_ = utils_version_number_new (_tmp11_, 1); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp13_ = _tmp12_; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp14_ = data_imports_fspot_db_fspot_photos_v5_behavior_get_instance (); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp15_ = _tmp14_; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp16_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp17_ = _tmp16_; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp17_); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp15_); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp13_); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp11_ = (g_free (_tmp11_), NULL); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp18_ = g_new0 (gint, 1); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp18_[0] = 7; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp19_ = _tmp18_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp19__length1 = 1; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp20_ = utils_version_number_new (_tmp19_, 1); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp21_ = _tmp20_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp22_ = data_imports_fspot_db_fspot_photos_v7_behavior_get_instance (); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp23_ = _tmp22_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp24_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp25_ = _tmp24_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp25_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp23_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp21_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp19_ = (g_free (_tmp19_), NULL); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp26_ = g_new0 (gint, 1); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp26_[0] = 11; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp27_ = _tmp26_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp27__length1 = 1; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp28_ = utils_version_number_new (_tmp27_, 1); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp29_ = _tmp28_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp30_ = data_imports_fspot_db_fspot_photos_v11_behavior_get_instance (); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp31_ = _tmp30_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp32_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp29_, G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp33_ = _tmp32_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp33_); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp33_); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp31_); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp29_); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp27_ = (g_free (_tmp27_), NULL); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp34_ = g_new0 (gint, 1); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp34_[0] = 16; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp35_ = _tmp34_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp35__length1 = 1; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp36_ = utils_version_number_new (_tmp35_, 1); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp37_ = _tmp36_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp38_ = data_imports_fspot_db_fspot_photos_v16_behavior_get_instance (); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp39_ = _tmp38_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp40_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp37_, G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp41_ = _tmp40_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp41_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp41_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp39_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp37_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp35_ = (g_free (_tmp35_), NULL); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp42_ = g_new0 (gint, 1); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp42_[0] = 17; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp43_ = _tmp42_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp43__length1 = 1; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp44_ = utils_version_number_new (_tmp43_, 1); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp45_ = _tmp44_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp46_ = data_imports_fspot_db_fspot_photos_v17_behavior_get_instance (); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp47_ = _tmp46_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp48_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp45_, G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp49_ = _tmp48_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp49_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp49_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp47_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp45_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp43_ = (g_free (_tmp43_), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp50_ = g_new0 (gint, 1); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp50_[0] = 18; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp51_ = _tmp50_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp51__length1 = 1; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp52_ = utils_version_number_new (_tmp51_, 1); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp53_ = _tmp52_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp54_ = data_imports_fspot_db_fspot_photos_v18_behavior_get_instance (); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp55_ = _tmp54_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp56_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp53_, G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp57_ = _tmp56_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photos_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp57_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp57_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp55_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp53_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp51_ = (g_free (_tmp51_), NULL); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp58_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_map_set (_tmp58_, DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME, photos_list); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp59_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, (GBoxedCopyFunc) data_imports_fspot_db_fspot_behavior_entry_ref, (GDestroyNotify) data_imports_fspot_db_fspot_behavior_entry_unref, NULL, NULL, NULL); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - tags_list = G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, GEE_TYPE_LIST, GeeList); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp60_ = g_new0 (gint, 1); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp60_[0] = 0; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp61_ = _tmp60_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp61__length1 = 1; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp62_ = utils_version_number_new (_tmp61_, 1); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp63_ = _tmp62_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp64_ = data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp65_ = _tmp64_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp66_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp63_, G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp67_ = _tmp66_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (tags_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp67_); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp67_); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp65_); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp63_); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp61_ = (g_free (_tmp61_), NULL); -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp68_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_map_set (_tmp68_, DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME, tags_list); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp69_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, (GBoxedCopyFunc) data_imports_fspot_db_fspot_behavior_entry_ref, (GDestroyNotify) data_imports_fspot_db_fspot_behavior_entry_unref, NULL, NULL, NULL); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photo_tags_list = G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, GEE_TYPE_LIST, GeeList); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp70_ = g_new0 (gint, 1); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp70_[0] = 0; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp71_ = _tmp70_; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp71__length1 = 1; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp72_ = utils_version_number_new (_tmp71_, 1); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp73_ = _tmp72_; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp74_ = data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_instance (); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp75_ = _tmp74_; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp76_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp73_, G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp77_ = _tmp76_; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_tags_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp77_); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp77_); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp75_); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp73_); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp71_ = (g_free (_tmp71_), NULL); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp78_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_map_set (_tmp78_, DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_TABLE_NAME, photo_tags_list); -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp79_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, (GBoxedCopyFunc) data_imports_fspot_db_fspot_behavior_entry_ref, (GDestroyNotify) data_imports_fspot_db_fspot_behavior_entry_unref, NULL, NULL, NULL); -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photo_versions_list = G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, GEE_TYPE_LIST, GeeList); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp80_ = g_new0 (gint, 1); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp80_[0] = 0; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp81_ = _tmp80_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp81__length1 = 1; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp82_ = utils_version_number_new (_tmp81_, 1); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp83_ = _tmp82_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp84_ = data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_instance (); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp85_ = _tmp84_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp86_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp83_, G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp87_ = _tmp86_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_versions_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp87_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp87_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp85_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp83_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp81_ = (g_free (_tmp81_), NULL); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp88_ = g_new0 (gint, 1); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp88_[0] = 9; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp89_ = _tmp88_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp89__length1 = 1; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp90_ = utils_version_number_new (_tmp89_, 1); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp91_ = _tmp90_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp92_ = data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_instance (); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp93_ = _tmp92_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp94_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp91_, G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp95_ = _tmp94_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_versions_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp95_); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp95_); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp93_); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp91_); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp89_ = (g_free (_tmp89_), NULL); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp96_ = g_new0 (gint, 1); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp96_[0] = 16; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp97_ = _tmp96_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp97__length1 = 1; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp98_ = utils_version_number_new (_tmp97_, 1); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp99_ = _tmp98_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp100_ = data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_instance (); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp101_ = _tmp100_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp102_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp99_, G_TYPE_CHECK_INSTANCE_CAST (_tmp101_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp103_ = _tmp102_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_versions_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp103_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp103_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp101_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp99_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp97_ = (g_free (_tmp97_), NULL); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp104_ = g_new0 (gint, 1); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp104_[0] = 17; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp105_ = _tmp104_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp105__length1 = 1; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp106_ = utils_version_number_new (_tmp105_, 1); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp107_ = _tmp106_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp108_ = data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_instance (); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp109_ = _tmp108_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp110_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp107_, G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp111_ = _tmp110_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_versions_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp111_); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp111_); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp109_); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp107_); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp105_ = (g_free (_tmp105_), NULL); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp112_ = g_new0 (gint, 1); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp112_[0] = 18; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp113_ = _tmp112_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp113__length1 = 1; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp114_ = utils_version_number_new (_tmp113_, 1); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp115_ = _tmp114_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp116_ = data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_instance (); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp117_ = _tmp116_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp118_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp115_, G_TYPE_CHECK_INSTANCE_CAST (_tmp117_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp119_ = _tmp118_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (photo_versions_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp119_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp119_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp117_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp115_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp113_ = (g_free (_tmp113_), NULL); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp120_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_map_set (_tmp120_, DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME, photo_versions_list); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp121_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_BEHAVIOR_ENTRY, (GBoxedCopyFunc) data_imports_fspot_db_fspot_behavior_entry_ref, (GDestroyNotify) data_imports_fspot_db_fspot_behavior_entry_unref, NULL, NULL, NULL); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - rolls_list = G_TYPE_CHECK_INSTANCE_CAST (_tmp121_, GEE_TYPE_LIST, GeeList); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp122_ = g_new0 (gint, 1); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp122_[0] = 0; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp123_ = _tmp122_; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp123__length1 = 1; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp124_ = utils_version_number_new (_tmp123_, 1); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp125_ = _tmp124_; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp126_ = data_imports_fspot_db_fspot_rolls_v0_behavior_get_instance (); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp127_ = _tmp126_; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp128_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp125_, G_TYPE_CHECK_INSTANCE_CAST (_tmp127_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp129_ = _tmp128_; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (rolls_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp129_); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp129_); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp127_); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp125_); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp123_ = (g_free (_tmp123_), NULL); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp130_ = g_new0 (gint, 1); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp130_[0] = 5; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp131_ = _tmp130_; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp131__length1 = 1; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp132_ = utils_version_number_new (_tmp131_, 1); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp133_ = _tmp132_; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp134_ = data_imports_fspot_db_fspot_rolls_v5_behavior_get_instance (); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp135_ = _tmp134_; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp136_ = data_imports_fspot_db_fspot_behavior_entry_new (_tmp133_, G_TYPE_CHECK_INSTANCE_CAST (_tmp135_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp137_ = _tmp136_; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (rolls_list, GEE_TYPE_COLLECTION, GeeCollection), _tmp137_); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (_tmp137_); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp135_); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp133_); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp131_ = (g_free (_tmp131_), NULL); -#line 143 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp138_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 143 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - gee_map_set (_tmp138_, DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME, rolls_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (rolls_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_versions_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_tags_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (tags_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photos_list); -#line 1441 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_find_behavior (const gchar* table_name, UtilsVersionNumber* version) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* behavior = NULL; - GeeList* behavior_list = NULL; - GeeMap* _tmp0_; - const gchar* _tmp1_; - gpointer _tmp2_; - GeeList* _tmp3_; -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (table_name != NULL, NULL); -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (UTILS_IS_VERSION_NUMBER (version), NULL); -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - behavior = NULL; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = data_imports_fspot_db_fspot_database_behavior_behavior_map; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = table_name; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_ = gee_map_get (_tmp0_, _tmp1_); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - behavior_list = (GeeList*) _tmp2_; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3_ = behavior_list; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp3_ != NULL) { -#line 1471 "FSpotDatabaseBehavior.c" - { - GeeList* _entry_list = NULL; - GeeList* _tmp4_; - GeeList* _tmp5_; - gint _entry_size = 0; - GeeList* _tmp6_; - gint _tmp7_; - gint _tmp8_; - gint _entry_index = 0; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp4_ = behavior_list; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp5_ = _g_object_ref0 (_tmp4_); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _entry_list = _tmp5_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp6_ = _entry_list; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp8_ = _tmp7_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _entry_size = _tmp8_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _entry_index = -1; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - while (TRUE) { -#line 1499 "FSpotDatabaseBehavior.c" - gint _tmp9_; - gint _tmp10_; - gint _tmp11_; - DataImportsFSpotDbFSpotBehaviorEntry* entry = NULL; - GeeList* _tmp12_; - gint _tmp13_; - gpointer _tmp14_; - UtilsVersionNumber* _tmp15_; - DataImportsFSpotDbFSpotBehaviorEntry* _tmp16_; - UtilsVersionNumber* _tmp17_; - UtilsVersionNumber* _tmp18_; - gint _tmp19_; - gboolean _tmp20_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp9_ = _entry_index; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _entry_index = _tmp9_ + 1; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp10_ = _entry_index; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp11_ = _entry_size; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (!(_tmp10_ < _tmp11_)) { -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - break; -#line 1525 "FSpotDatabaseBehavior.c" - } -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp12_ = _entry_list; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp13_ = _entry_index; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp14_ = gee_list_get (_tmp12_, _tmp13_); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - entry = (DataImportsFSpotDbFSpotBehaviorEntry*) _tmp14_; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp15_ = version; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp16_ = entry; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp17_ = data_imports_fspot_db_fspot_behavior_entry_get_version (_tmp16_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp18_ = _tmp17_; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp19_ = gee_comparable_compare_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COMPARABLE, GeeComparable), _tmp18_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp20_ = _tmp19_ >= 0; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_tmp18_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp20_) { -#line 1551 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotBehaviorEntry* _tmp21_; - DataImportsFSpotDbFSpotTableBehavior* _tmp22_; -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp21_ = entry; -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp22_ = data_imports_fspot_db_fspot_behavior_entry_get_behavior (_tmp21_); -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (behavior); -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - behavior = _tmp22_; -#line 1562 "FSpotDatabaseBehavior.c" - } -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _data_imports_fspot_db_fspot_behavior_entry_unref0 (entry); -#line 1566 "FSpotDatabaseBehavior.c" - } -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (_entry_list); -#line 1570 "FSpotDatabaseBehavior.c" - } - } else { - const gchar* _tmp23_; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp23_ = table_name; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_warning ("FSpotDatabaseBehavior.vala:155: Could not find behavior list for table" \ -" %s", _tmp23_); -#line 1578 "FSpotDatabaseBehavior.c" - } -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = behavior; -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (behavior_list); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 1586 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_construct (GType object_type, UtilsVersionNumber* version, GError** error) { - DataImportsFSpotDbFSpotDatabaseBehavior * self = NULL; - UtilsVersionNumber* _tmp0_; - UtilsVersionNumber* _tmp1_; - gint _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* photos_generic_behavior = NULL; - UtilsVersionNumber* _tmp8_; - DataImportsFSpotDbFSpotTableBehavior* _tmp9_; - DataImportsFSpotDbFSpotTableBehavior* _tmp10_; - DataImportsFSpotDbFSpotTableBehavior* tags_generic_behavior = NULL; - UtilsVersionNumber* _tmp13_; - DataImportsFSpotDbFSpotTableBehavior* _tmp14_; - DataImportsFSpotDbFSpotTableBehavior* _tmp15_; - DataImportsFSpotDbFSpotTableBehavior* photo_tags_generic_behavior = NULL; - UtilsVersionNumber* _tmp18_; - DataImportsFSpotDbFSpotTableBehavior* _tmp19_; - DataImportsFSpotDbFSpotTableBehavior* _tmp20_; - DataImportsFSpotDbFSpotTableBehavior* photo_versions_generic_behavior = NULL; - UtilsVersionNumber* _tmp23_; - DataImportsFSpotDbFSpotTableBehavior* _tmp24_; - DataImportsFSpotDbFSpotTableBehavior* _tmp25_; - DataImportsFSpotDbFSpotTableBehavior* rolls_generic_behavior = NULL; - UtilsVersionNumber* _tmp28_; - DataImportsFSpotDbFSpotTableBehavior* _tmp29_; - DataImportsFSpotDbFSpotTableBehavior* _tmp30_; - gboolean _tmp33_ = FALSE; - gboolean _tmp34_ = FALSE; - gboolean _tmp35_ = FALSE; - gboolean _tmp36_ = FALSE; - DataImportsFSpotDbFSpotTableBehavior* _tmp37_; - GError * _inner_error_ = NULL; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (UTILS_IS_VERSION_NUMBER (version), NULL); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self = (DataImportsFSpotDbFSpotDatabaseBehavior*) g_object_new (object_type, NULL); -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = version; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = data_imports_fspot_db_fspot_database_behavior_MIN_UNSUPPORTED_VERSION; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_ = gee_comparable_compare_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COMPARABLE, GeeComparable), _tmp1_); -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp2_ >= 0) { -#line 1633 "FSpotDatabaseBehavior.c" - UtilsVersionNumber* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - GError* _tmp6_; - GError* _tmp7_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp3_ = version; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp4_ = utils_version_number_to_string (_tmp3_); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp5_ = _tmp4_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp6_ = g_error_new (SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR, SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR_UNSUPPORTED_VERSION, "Version %s is not yet supported", _tmp5_); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp7_ = _tmp6_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_free0 (_tmp5_); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _inner_error_ = _tmp7_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR) { -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_propagate_error (error, _inner_error_); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 1661 "FSpotDatabaseBehavior.c" - } else { -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_clear_error (&_inner_error_); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 1669 "FSpotDatabaseBehavior.c" - } - } -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp8_ = version; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp9_ = data_imports_fspot_db_fspot_database_behavior_find_behavior (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME, _tmp8_); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photos_generic_behavior = _tmp9_; -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp10_ = photos_generic_behavior; -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp10_ != NULL) { -#line 1682 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp11_; - DataImportsFSpotDbFSpotTableBehavior* _tmp12_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp11_ = photos_generic_behavior; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR) ? ((DataImportsFSpotDbFSpotTableBehavior*) _tmp11_) : NULL); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photos_behavior); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->photos_behavior = _tmp12_; -#line 1693 "FSpotDatabaseBehavior.c" - } -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp13_ = version; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp14_ = data_imports_fspot_db_fspot_database_behavior_find_behavior (DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME, _tmp13_); -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - tags_generic_behavior = _tmp14_; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp15_ = tags_generic_behavior; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp15_ != NULL) { -#line 1705 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp16_; - DataImportsFSpotDbFSpotTableBehavior* _tmp17_; -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp16_ = tags_generic_behavior; -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR) ? ((DataImportsFSpotDbFSpotTableBehavior*) _tmp16_) : NULL); -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->tags_behavior); -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->tags_behavior = _tmp17_; -#line 1716 "FSpotDatabaseBehavior.c" - } -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp18_ = version; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp19_ = data_imports_fspot_db_fspot_database_behavior_find_behavior (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_TABLE_NAME, _tmp18_); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photo_tags_generic_behavior = _tmp19_; -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp20_ = photo_tags_generic_behavior; -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp20_ != NULL) { -#line 1728 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp21_; - DataImportsFSpotDbFSpotTableBehavior* _tmp22_; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp21_ = photo_tags_generic_behavior; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR) ? ((DataImportsFSpotDbFSpotTableBehavior*) _tmp21_) : NULL); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photo_tags_behavior); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->photo_tags_behavior = _tmp22_; -#line 1739 "FSpotDatabaseBehavior.c" - } -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp23_ = version; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp24_ = data_imports_fspot_db_fspot_database_behavior_find_behavior (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME, _tmp23_); -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - photo_versions_generic_behavior = _tmp24_; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp25_ = photo_versions_generic_behavior; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp25_ != NULL) { -#line 1751 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp26_; - DataImportsFSpotDbFSpotTableBehavior* _tmp27_; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp26_ = photo_versions_generic_behavior; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR) ? ((DataImportsFSpotDbFSpotTableBehavior*) _tmp26_) : NULL); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photo_versions_behavior); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->photo_versions_behavior = _tmp27_; -#line 1762 "FSpotDatabaseBehavior.c" - } -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp28_ = version; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp29_ = data_imports_fspot_db_fspot_database_behavior_find_behavior (DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME, _tmp28_); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - rolls_generic_behavior = _tmp29_; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp30_ = rolls_generic_behavior; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp30_ != NULL) { -#line 1774 "FSpotDatabaseBehavior.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp31_; - DataImportsFSpotDbFSpotTableBehavior* _tmp32_; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp31_ = rolls_generic_behavior; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp32_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR) ? ((DataImportsFSpotDbFSpotTableBehavior*) _tmp31_) : NULL); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->rolls_behavior); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv->rolls_behavior = _tmp32_; -#line 1785 "FSpotDatabaseBehavior.c" - } -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp37_ = self->priv->photos_behavior; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp37_ == NULL) { -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp36_ = TRUE; -#line 1793 "FSpotDatabaseBehavior.c" - } else { - DataImportsFSpotDbFSpotTableBehavior* _tmp38_; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp38_ = self->priv->tags_behavior; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp36_ = _tmp38_ == NULL; -#line 1800 "FSpotDatabaseBehavior.c" - } -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp36_) { -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp35_ = TRUE; -#line 1806 "FSpotDatabaseBehavior.c" - } else { - DataImportsFSpotDbFSpotTableBehavior* _tmp39_; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp39_ = self->priv->photo_tags_behavior; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp35_ = _tmp39_ == NULL; -#line 1813 "FSpotDatabaseBehavior.c" - } -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp35_) { -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp34_ = TRUE; -#line 1819 "FSpotDatabaseBehavior.c" - } else { - DataImportsFSpotDbFSpotTableBehavior* _tmp40_; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp40_ = self->priv->photo_versions_behavior; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp34_ = _tmp40_ == NULL; -#line 1826 "FSpotDatabaseBehavior.c" - } -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp34_) { -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp33_ = TRUE; -#line 1832 "FSpotDatabaseBehavior.c" - } else { - DataImportsFSpotDbFSpotTableBehavior* _tmp41_; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp41_ = self->priv->rolls_behavior; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp33_ = _tmp41_ == NULL; -#line 1839 "FSpotDatabaseBehavior.c" - } -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_tmp33_) { -#line 1843 "FSpotDatabaseBehavior.c" - UtilsVersionNumber* _tmp42_; - gchar* _tmp43_; - gchar* _tmp44_; - GError* _tmp45_; - GError* _tmp46_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp42_ = version; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp43_ = utils_version_number_to_string (_tmp42_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp44_ = _tmp43_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp45_ = g_error_new (SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR, SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR_UNSUPPORTED_VERSION, "Version %s is not supported", _tmp44_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp46_ = _tmp45_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_free0 (_tmp44_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _inner_error_ = _tmp46_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - if (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR) { -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_propagate_error (error, _inner_error_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (rolls_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_versions_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_tags_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (tags_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photos_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 1881 "FSpotDatabaseBehavior.c" - } else { -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (rolls_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_versions_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_tags_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (tags_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photos_generic_behavior); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_clear_error (&_inner_error_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return NULL; -#line 1899 "FSpotDatabaseBehavior.c" - } - } -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (rolls_generic_behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_versions_generic_behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photo_tags_generic_behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (tags_generic_behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (photos_generic_behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return self; -#line 1914 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_new (UtilsVersionNumber* version, GError** error) { -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return data_imports_fspot_db_fspot_database_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, version, error); -#line 1921 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photos_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (self), NULL); -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->photos_behavior; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 1939 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (self), NULL); -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->tags_behavior; -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 1957 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (self), NULL); -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->photo_tags_behavior; -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 1975 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_versions_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (self), NULL); -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->photo_versions_behavior; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 1993 "FSpotDatabaseBehavior.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_rolls_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (self), NULL); -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = self->priv->rolls_behavior; -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - result = _tmp1_; -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - return result; -#line 2011 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_fspot_database_behavior_class_init (DataImportsFSpotDbFSpotDatabaseBehaviorClass * klass) { - gint* _tmp0_; - gint* _tmp1_; - gint _tmp1__length1; - UtilsVersionNumber* _tmp2_; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_database_behavior_parent_class = g_type_class_peek_parent (klass); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotDatabaseBehaviorPrivate)); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_database_behavior_finalize; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_ = g_new0 (gint, 1); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp0_[0] = 19; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1_ = _tmp0_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp1__length1 = 1; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _tmp2_ = utils_version_number_new (_tmp1_, 1); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - data_imports_fspot_db_fspot_database_behavior_MIN_UNSUPPORTED_VERSION = _tmp2_; -#line 2038 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_fspot_database_behavior_instance_init (DataImportsFSpotDbFSpotDatabaseBehavior * self) { -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_PRIVATE (self); -#line 2045 "FSpotDatabaseBehavior.c" -} - - -static void data_imports_fspot_db_fspot_database_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotDatabaseBehavior * self; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photos_behavior); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->tags_behavior); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photo_tags_behavior); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->photo_versions_behavior); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - _g_object_unref0 (self->priv->rolls_behavior); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_database_behavior_parent_class)->finalize (obj); -#line 2065 "FSpotDatabaseBehavior.c" -} - - -/** - * A class that consolidates the behavior of all F-Spot tables (apart from meta) - * and is the one place to check whether the database version is supported. - */ -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_database_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_database_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotDatabaseBehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_database_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotDatabaseBehavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_database_behavior_instance_init, NULL }; - GType data_imports_fspot_db_fspot_database_behavior_type_id; - data_imports_fspot_db_fspot_database_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotDatabaseBehavior", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_database_behavior_type_id__volatile, data_imports_fspot_db_fspot_database_behavior_type_id); - } - return data_imports_fspot_db_fspot_database_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala b/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala deleted file mode 100644 index 6d669b3..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabaseBehavior.vala +++ /dev/null @@ -1,208 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -private class FSpotBehaviorEntry { - private Utils.VersionNumber version; - private FSpotTableBehavior behavior; - - public FSpotBehaviorEntry(Utils.VersionNumber version, FSpotTableBehavior behavior) { - this.version = version; - this.behavior = behavior; - } - - public Utils.VersionNumber get_version() { - return version; - } - - public FSpotTableBehavior get_behavior() { - return behavior; - } -} - -/** - * A class that consolidates the behavior of all F-Spot tables (apart from meta) - * and is the one place to check whether the database version is supported. - */ -public class FSpotDatabaseBehavior : Object { - // Minimum unsupported version: any database from that version and above - // is not supported as it's too new and support has not been provided - // In practice, the code may work with future versions but this cannot be - // guaranteed as it hasn't been tested so it's probably better to just - // bomb out at that point rather than risk importing incorrect data - public static Utils.VersionNumber MIN_UNSUPPORTED_VERSION = - new Utils.VersionNumber({ 19 }); - private static Gee.Map<string, Gee.List<FSpotBehaviorEntry>> behavior_map; - - private FSpotTableBehavior<FSpotPhotoRow> photos_behavior; - private FSpotTableBehavior<FSpotTagRow> tags_behavior; - private FSpotTableBehavior<FSpotPhotoTagRow> photo_tags_behavior; - private FSpotTableBehavior<FSpotPhotoVersionRow> photo_versions_behavior; - private FSpotTableBehavior<FSpotRollRow> rolls_behavior; - - public static void create_behavior_map() { - behavior_map = new Gee.HashMap<string, Gee.List<FSpotBehaviorEntry>>(); - // photos table - Gee.List<FSpotBehaviorEntry> photos_list = new Gee.ArrayList<FSpotBehaviorEntry>(); - // v0-4 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 0 }), - FSpotPhotosV0Behavior.get_instance() - )); - // v5-6 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 5 }), - FSpotPhotosV5Behavior.get_instance() - )); - // v7-10 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 7 }), - FSpotPhotosV7Behavior.get_instance() - )); - // v11-15 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 11 }), - FSpotPhotosV11Behavior.get_instance() - )); - // v16 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 16 }), - FSpotPhotosV16Behavior.get_instance() - )); - // v17 - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 17 }), - FSpotPhotosV17Behavior.get_instance() - )); - // v18+ - photos_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 18 }), - FSpotPhotosV18Behavior.get_instance() - )); - behavior_map.set(FSpotPhotosTable.TABLE_NAME, photos_list); - // tags table - Gee.List<FSpotBehaviorEntry> tags_list = new Gee.ArrayList<FSpotBehaviorEntry>(); - // v0+ - tags_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 0 }), - FSpotTagsV0Behavior.get_instance() - )); - behavior_map.set(FSpotTagsTable.TABLE_NAME, tags_list); - // photo_tags table - Gee.List<FSpotBehaviorEntry> photo_tags_list = new Gee.ArrayList<FSpotBehaviorEntry>(); - // v0+ - photo_tags_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 0 }), - FSpotPhotoTagsV0Behavior.get_instance() - )); - behavior_map.set(FSpotPhotoTagsTable.TABLE_NAME, photo_tags_list); - // photo_versions table - Gee.List<FSpotBehaviorEntry> photo_versions_list = new Gee.ArrayList<FSpotBehaviorEntry>(); - // v0-8 - photo_versions_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 0 }), - FSpotPhotoVersionsV0Behavior.get_instance() - )); - // v9-15 - photo_versions_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 9 }), - FSpotPhotoVersionsV9Behavior.get_instance() - )); - // v16 - photo_versions_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 16 }), - FSpotPhotoVersionsV16Behavior.get_instance() - )); - // v17 - photo_versions_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 17 }), - FSpotPhotoVersionsV17Behavior.get_instance() - )); - // v18+ - photo_versions_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 18 }), - FSpotPhotoVersionsV18Behavior.get_instance() - )); - behavior_map.set(FSpotPhotoVersionsTable.TABLE_NAME, photo_versions_list); - // rolls table - Gee.List<FSpotBehaviorEntry> rolls_list = new Gee.ArrayList<FSpotBehaviorEntry>(); - // v0-4 - rolls_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 0 }), - FSpotRollsV0Behavior.get_instance() - )); - // v5+ - rolls_list.add(new FSpotBehaviorEntry( - new Utils.VersionNumber({ 5 }), - FSpotRollsV5Behavior.get_instance() - )); - behavior_map.set(FSpotRollsTable.TABLE_NAME, rolls_list); - } - - public static FSpotTableBehavior? find_behavior(string table_name, Utils.VersionNumber version) { - FSpotTableBehavior behavior = null; - Gee.List<FSpotBehaviorEntry> behavior_list = behavior_map.get(table_name); - if (behavior_list != null) - foreach (FSpotBehaviorEntry entry in behavior_list) { - if (version.compare_to(entry.get_version()) >= 0) - behavior = entry.get_behavior(); - } - else - warning("Could not find behavior list for table %s", table_name); - return behavior; - - } - public FSpotDatabaseBehavior(Utils.VersionNumber version) throws Spit.DataImports.DataImportError { - if (version.compare_to(MIN_UNSUPPORTED_VERSION) >= 0) - throw new Spit.DataImports.DataImportError.UNSUPPORTED_VERSION("Version %s is not yet supported", version.to_string()); - - FSpotTableBehavior? photos_generic_behavior = find_behavior(FSpotPhotosTable.TABLE_NAME, version); - if (photos_generic_behavior != null) - photos_behavior = photos_generic_behavior as FSpotTableBehavior<FSpotPhotoRow>; - FSpotTableBehavior? tags_generic_behavior = find_behavior(FSpotTagsTable.TABLE_NAME, version); - if (tags_generic_behavior != null) - tags_behavior = tags_generic_behavior as FSpotTableBehavior<FSpotTagRow>; - FSpotTableBehavior? photo_tags_generic_behavior = find_behavior(FSpotPhotoTagsTable.TABLE_NAME, version); - if (photo_tags_generic_behavior != null) - photo_tags_behavior = photo_tags_generic_behavior as FSpotTableBehavior<FSpotPhotoTagRow>; - FSpotTableBehavior? photo_versions_generic_behavior = find_behavior(FSpotPhotoVersionsTable.TABLE_NAME, version); - if (photo_versions_generic_behavior != null) - photo_versions_behavior = photo_versions_generic_behavior as FSpotTableBehavior<FSpotPhotoVersionRow>; - FSpotTableBehavior? rolls_generic_behavior = find_behavior(FSpotRollsTable.TABLE_NAME, version); - if (rolls_generic_behavior != null) - rolls_behavior = rolls_generic_behavior as FSpotTableBehavior<FSpotRollRow>; - - if (photos_behavior == null || tags_behavior == null || - photo_tags_behavior == null || photo_versions_behavior == null || - rolls_behavior == null - ) - throw new Spit.DataImports.DataImportError.UNSUPPORTED_VERSION("Version %s is not supported", version.to_string()); - } - - public FSpotTableBehavior<FSpotPhotoRow> get_photos_behavior() { - return photos_behavior; - } - - public FSpotTableBehavior<FSpotTagRow> get_tags_behavior() { - return tags_behavior; - } - - public FSpotTableBehavior<FSpotPhotoTagRow> get_photo_tags_behavior() { - return photo_tags_behavior; - } - - public FSpotTableBehavior<FSpotPhotoVersionRow> get_photo_versions_behavior() { - return photo_versions_behavior; - } - - public FSpotTableBehavior<FSpotRollRow> get_rolls_behavior() { - return rolls_behavior; - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotDatabaseTable.c b/plugins/shotwell-data-imports/FSpotDatabaseTable.c deleted file mode 100644 index 129b3c7..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabaseTable.c +++ /dev/null @@ -1,998 +0,0 @@ -/* FSpotDatabaseTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotDatabaseTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> - - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTablePrivate { - GType t_type; - GBoxedCopyFunc t_dup_func; - GDestroyNotify t_destroy_func; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () - -static gpointer data_imports_fspot_db_fspot_database_table_parent_class = NULL; - -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTablePrivate)) -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -ImportableDatabaseTable* importable_database_table_construct (GType object_type); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -void importable_database_table_set_table_name (ImportableDatabaseTable* self, const gchar* table_name); -gchar* data_imports_fspot_db_fspot_table_behavior_get_table_name (DataImportsFSpotDbFSpotTableBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_table_get_behavior (DataImportsFSpotDbFSpotDatabaseTable* self); -gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table); -gchar** data_imports_fspot_db_fspot_table_behavior_list_columns (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); -GQuark database_error_quark (void); -gint data_imports_fspot_db_fspot_database_table_select_all (DataImportsFSpotDbFSpotDatabaseTable* self, sqlite3_stmt* * stmt, GError** error); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -static void data_imports_fspot_db_fspot_database_table_finalize (ImportableDatabaseTable * 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); - - -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db) { - DataImportsFSpotDbFSpotDatabaseTable* self = NULL; - sqlite3* _tmp0_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self = (DataImportsFSpotDbFSpotDatabaseTable*) importable_database_table_construct (object_type); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->priv->t_type = t_type; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->priv->t_dup_func = t_dup_func; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->priv->t_destroy_func = t_destroy_func; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp0_ = db; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->fspot_db = _tmp0_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return self; -#line 147 "FSpotDatabaseTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return self ? g_object_ref (self) : NULL; -#line 154 "FSpotDatabaseTable.c" -} - - -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior) { - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE (self)); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR (behavior)); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp0_ = behavior; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_object_unref0 (self->behavior); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->behavior = _tmp1_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp2_ = behavior; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp3_ = data_imports_fspot_db_fspot_table_behavior_get_table_name (_tmp2_); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp4_ = _tmp3_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - importable_database_table_set_table_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable), _tmp4_); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (_tmp4_); -#line 186 "FSpotDatabaseTable.c" -} - - -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_table_get_behavior (DataImportsFSpotDbFSpotDatabaseTable* self) { - DataImportsFSpotDbFSpotTableBehavior* result = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - DataImportsFSpotDbFSpotTableBehavior* _tmp1_; -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE (self), NULL); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp0_ = self->behavior; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - result = _tmp1_; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return result; -#line 204 "FSpotDatabaseTable.c" -} - - -static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { - gchar* result = NULL; - const gchar* _tmp0_; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - gchar** _tmp3_; - gint _tmp3__length1; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = separator; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_ == NULL) { -#line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - separator = ""; -#line 221 "FSpotDatabaseTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = TRUE; -#line 231 "FSpotDatabaseTable.c" - } else { - gchar** _tmp4_; - gint _tmp4__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = _tmp4__length1 > 0; -#line 241 "FSpotDatabaseTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 247 "FSpotDatabaseTable.c" - } else { - gboolean _tmp5_ = FALSE; - gchar** _tmp6_; - gint _tmp6__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp6__length1 == -1) { -#line 258 "FSpotDatabaseTable.c" - gchar** _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_[0]; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = _tmp8_ != NULL; -#line 270 "FSpotDatabaseTable.c" - } else { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = FALSE; -#line 274 "FSpotDatabaseTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp5_; -#line 278 "FSpotDatabaseTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 282 "FSpotDatabaseTable.c" - gint i = 0; - gsize len = 0UL; - gint _tmp31_; - gint _tmp33_; - gint _tmp34_; - gsize _tmp35_; - const gchar* _tmp36_; - gint _tmp37_; - gint _tmp38_; - gint _tmp39_; - const gchar* res = NULL; - gsize _tmp40_; - void* _tmp41_; - void* ptr = NULL; - const gchar* _tmp42_; - gchar** _tmp43_; - gint _tmp43__length1; - const gchar* _tmp44_; - void* _tmp45_; - const gchar* _tmp62_; -#line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 305 "FSpotDatabaseTable.c" - { - gboolean _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 0; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = TRUE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 314 "FSpotDatabaseTable.c" - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gchar** _tmp13_; - gint _tmp13__length1; - gint _tmp21_ = 0; - gchar** _tmp22_; - gint _tmp22__length1; - gint _tmp23_; - const gchar* _tmp24_; - gsize _tmp30_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp9_) { -#line 327 "FSpotDatabaseTable.c" - gint _tmp10_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp10_ + 1; -#line 333 "FSpotDatabaseTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13__length1 != -1) { -#line 343 "FSpotDatabaseTable.c" - gint _tmp14_; - gchar** _tmp15_; - gint _tmp15__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ < _tmp15__length1; -#line 355 "FSpotDatabaseTable.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 359 "FSpotDatabaseTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp12_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = TRUE; -#line 365 "FSpotDatabaseTable.c" - } else { - gboolean _tmp16_ = FALSE; - gchar** _tmp17_; - gint _tmp17__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp17__length1 == -1) { -#line 376 "FSpotDatabaseTable.c" - gchar** _tmp18_; - gint _tmp18__length1; - gint _tmp19_; - const gchar* _tmp20_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = _tmp18_[_tmp19_]; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = _tmp20_ != NULL; -#line 391 "FSpotDatabaseTable.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = FALSE; -#line 395 "FSpotDatabaseTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp16_; -#line 399 "FSpotDatabaseTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp11_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 405 "FSpotDatabaseTable.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp23_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp24_ = _tmp22_[_tmp23_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp24_ != NULL) { -#line 417 "FSpotDatabaseTable.c" - gchar** _tmp25_; - gint _tmp25__length1; - gint _tmp26_; - const gchar* _tmp27_; - gint _tmp28_; - gint _tmp29_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp26_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp27_ = _tmp25_[_tmp26_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp28_ = strlen ((const gchar*) _tmp27_); -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp29_ = _tmp28_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = _tmp29_; -#line 438 "FSpotDatabaseTable.c" - } else { -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = 0; -#line 442 "FSpotDatabaseTable.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp30_ = len; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp30_ + _tmp21_; -#line 448 "FSpotDatabaseTable.c" - } - } -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp31_ = i; -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp31_ == 0) { -#line 455 "FSpotDatabaseTable.c" - gchar* _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp32_ = g_strdup (""); -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 463 "FSpotDatabaseTable.c" - } -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp33_ = i; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - str_array_length1 = _tmp33_; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp34_ = str_array_length1; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp35_ = len; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp36_ = separator; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp37_ = strlen ((const gchar*) _tmp36_); -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp38_ = _tmp37_; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp40_ = len; -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp41_ = g_malloc (_tmp40_); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = _tmp41_; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp42_ = res; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43_ = str_array; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43__length1 = str_array_length1; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp44_ = _tmp43_[0]; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp45_; -#line 501 "FSpotDatabaseTable.c" - { - gboolean _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = TRUE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 510 "FSpotDatabaseTable.c" - gint _tmp48_; - gchar** _tmp49_; - gint _tmp49__length1; - void* _tmp50_; - const gchar* _tmp51_; - void* _tmp52_; - const gchar* _tmp53_ = NULL; - gchar** _tmp54_; - gint _tmp54__length1; - gint _tmp55_; - const gchar* _tmp56_; - void* _tmp60_; - void* _tmp61_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp46_) { -#line 526 "FSpotDatabaseTable.c" - gint _tmp47_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp47_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp47_ + 1; -#line 532 "FSpotDatabaseTable.c" - } -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp48_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49_ = str_array; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49__length1 = str_array_length1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!(_tmp48_ < _tmp49__length1)) { -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 546 "FSpotDatabaseTable.c" - } -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp50_ = ptr; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp51_ = separator; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp52_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp55_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp56_ = _tmp54_[_tmp55_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp56_ != NULL) { -#line 566 "FSpotDatabaseTable.c" - gchar** _tmp57_; - gint _tmp57__length1; - gint _tmp58_; - const gchar* _tmp59_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp58_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp59_ = _tmp57_[_tmp58_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = (const gchar*) _tmp59_; -#line 581 "FSpotDatabaseTable.c" - } else { -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = ""; -#line 585 "FSpotDatabaseTable.c" - } -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp60_ = ptr; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp61_; -#line 593 "FSpotDatabaseTable.c" - } - } -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp62_ = res; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = NULL; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gchar*) _tmp62_; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 604 "FSpotDatabaseTable.c" - } else { - gchar* _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp63_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 613 "FSpotDatabaseTable.c" - } -} - - -gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table) { - gchar* result = NULL; - gchar** columns = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - gint _tmp1_; - gchar** _tmp2_; - gint columns_length1; - gint _columns_size_; - gboolean _tmp3_; - gchar** _tmp16_; - gint _tmp16__length1; - gchar* _tmp17_; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE (self), NULL); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp0_ = self->behavior; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_table_behavior_list_columns (_tmp0_, &_tmp1_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - columns = _tmp2_; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - columns_length1 = _tmp1_; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _columns_size_ = columns_length1; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp3_ = with_table; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_tmp3_) { -#line 646 "FSpotDatabaseTable.c" - { - gint i = 0; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - i = 0; -#line 651 "FSpotDatabaseTable.c" - { - gboolean _tmp4_ = FALSE; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp4_ = TRUE; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - while (TRUE) { -#line 658 "FSpotDatabaseTable.c" - gint _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; - gchar** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - const gchar* _tmp10_; - gchar** _tmp11_; - gint _tmp11__length1; - gint _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (!_tmp4_) { -#line 674 "FSpotDatabaseTable.c" - gint _tmp5_; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp5_ = i; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - i = _tmp5_ + 1; -#line 680 "FSpotDatabaseTable.c" - } -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp4_ = FALSE; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp6_ = i; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp7_ = columns; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp7__length1 = columns_length1; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (!(_tmp6_ < _tmp7__length1)) { -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - break; -#line 694 "FSpotDatabaseTable.c" - } -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp8_ = columns; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp8__length1 = columns_length1; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp9_ = i; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp11_ = columns; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp11__length1 = columns_length1; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp12_ = i; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp13_ = _tmp11_[_tmp12_]; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp14_ = g_strdup_printf ("%s.%s", _tmp10_, _tmp13_); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (_tmp8_[_tmp9_]); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp8_[_tmp9_] = _tmp14_; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp15_ = _tmp8_[_tmp9_]; -#line 720 "FSpotDatabaseTable.c" - } - } - } - } -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp16_ = columns; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp16__length1 = columns_length1; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp17_ = _vala_g_strjoinv (", ", _tmp16_, _tmp16__length1); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - result = _tmp17_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return result; -#line 737 "FSpotDatabaseTable.c" -} - - -gint data_imports_fspot_db_fspot_database_table_select_all (DataImportsFSpotDbFSpotDatabaseTable* self, sqlite3_stmt* * stmt, GError** error) { - sqlite3_stmt* _vala_stmt = NULL; - gint result = 0; - gchar* column_list = NULL; - gchar* _tmp0_; - gchar* sql = NULL; - const gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - gint res = 0; - sqlite3* _tmp4_; - const gchar* _tmp5_; - sqlite3_stmt* _tmp6_ = NULL; - gint _tmp7_; - gint _tmp8_; - sqlite3_stmt* _tmp15_; - gint _tmp16_; - gboolean _tmp17_ = FALSE; - gint _tmp18_; - GError * _inner_error_ = NULL; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE (self), 0); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (self, FALSE); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - column_list = _tmp0_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp1_ = column_list; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp3_ = g_strdup_printf ("SELECT %s FROM %s", _tmp1_, _tmp2_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - sql = _tmp3_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp4_ = self->fspot_db; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp5_ = sql; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp7_ = sqlite3_prepare_v2 (_tmp4_, _tmp5_, -1, &_tmp6_, NULL); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _sqlite3_finalize0 (_vala_stmt); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _vala_stmt = _tmp6_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - res = _tmp7_; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp8_ = res; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_tmp8_ != SQLITE_OK) { -#line 791 "FSpotDatabaseTable.c" - const gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gint _tmp12_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp9_ = sql; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp10_ = g_strdup_printf ("Statement failed: %s", _tmp9_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp11_ = _tmp10_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp12_ = res; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - importable_database_table_throw_error (_tmp11_, _tmp12_, &_inner_error_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (_tmp11_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 812 "FSpotDatabaseTable.c" - gint _tmp13_ = 0; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_propagate_error (error, _inner_error_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (sql); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (column_list); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return _tmp13_; -#line 822 "FSpotDatabaseTable.c" - } else { - gint _tmp14_ = 0; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (sql); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (column_list); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_clear_error (&_inner_error_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return _tmp14_; -#line 835 "FSpotDatabaseTable.c" - } - } - } -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp15_ = _vala_stmt; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp16_ = sqlite3_step (_tmp15_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - res = _tmp16_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp18_ = res; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_tmp18_ != SQLITE_ROW) { -#line 849 "FSpotDatabaseTable.c" - gint _tmp19_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp19_ = res; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp17_ = _tmp19_ != SQLITE_DONE; -#line 855 "FSpotDatabaseTable.c" - } else { -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp17_ = FALSE; -#line 859 "FSpotDatabaseTable.c" - } -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_tmp17_) { -#line 863 "FSpotDatabaseTable.c" - const gchar* _tmp20_; - const gchar* _tmp21_; - gchar* _tmp22_; - gchar* _tmp23_; - gint _tmp24_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp21_ = column_list; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp22_ = g_strdup_printf ("select_all %s %s", _tmp20_, _tmp21_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp23_ = _tmp22_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _tmp24_ = res; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - importable_database_table_throw_error (_tmp23_, _tmp24_, &_inner_error_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (_tmp23_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 887 "FSpotDatabaseTable.c" - gint _tmp25_ = 0; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_propagate_error (error, _inner_error_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (sql); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (column_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return _tmp25_; -#line 897 "FSpotDatabaseTable.c" - } else { - gint _tmp26_ = 0; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (sql); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (column_list); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_clear_error (&_inner_error_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return _tmp26_; -#line 910 "FSpotDatabaseTable.c" - } - } - } -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - result = res; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - if (stmt) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - *stmt = _vala_stmt; -#line 924 "FSpotDatabaseTable.c" - } else { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _sqlite3_finalize0 (_vala_stmt); -#line 928 "FSpotDatabaseTable.c" - } -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - return result; -#line 932 "FSpotDatabaseTable.c" -} - - -static void data_imports_fspot_db_fspot_database_table_class_init (DataImportsFSpotDbFSpotDatabaseTableClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - data_imports_fspot_db_fspot_database_table_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - ((ImportableDatabaseTableClass *) klass)->finalize = data_imports_fspot_db_fspot_database_table_finalize; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotDatabaseTablePrivate)); -#line 943 "FSpotDatabaseTable.c" -} - - -static void data_imports_fspot_db_fspot_database_table_instance_init (DataImportsFSpotDbFSpotDatabaseTable * self) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_PRIVATE (self); -#line 950 "FSpotDatabaseTable.c" -} - - -static void data_imports_fspot_db_fspot_database_table_finalize (ImportableDatabaseTable * obj) { - DataImportsFSpotDbFSpotDatabaseTable * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - _g_object_unref0 (self->behavior); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabaseTable.vala" - IMPORTABLE_DATABASE_TABLE_CLASS (data_imports_fspot_db_fspot_database_table_parent_class)->finalize (obj); -#line 962 "FSpotDatabaseTable.c" -} - - -/** - * This class represents a generic F-Spot table. - */ -GType data_imports_fspot_db_fspot_database_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_database_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_database_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotDatabaseTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_database_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotDatabaseTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_database_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_database_table_type_id; - data_imports_fspot_db_fspot_database_table_type_id = g_type_register_static (TYPE_IMPORTABLE_DATABASE_TABLE, "DataImportsFSpotDbFSpotDatabaseTable", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&data_imports_fspot_db_fspot_database_table_type_id__volatile, data_imports_fspot_db_fspot_database_table_type_id); - } - return data_imports_fspot_db_fspot_database_table_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff --git a/plugins/shotwell-data-imports/FSpotDatabaseTable.vala b/plugins/shotwell-data-imports/FSpotDatabaseTable.vala deleted file mode 100644 index f2bcdc9..0000000 --- a/plugins/shotwell-data-imports/FSpotDatabaseTable.vala +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * This class represents a generic F-Spot table. - */ -public abstract class FSpotDatabaseTable<T> : ImportableDatabaseTable { - protected unowned Sqlite.Database fspot_db; - protected FSpotTableBehavior<T> behavior; - - public FSpotDatabaseTable(Sqlite.Database db) { - this.fspot_db = db; - } - - public void set_behavior(FSpotTableBehavior<T> behavior) { - this.behavior = behavior; - set_table_name(behavior.get_table_name()); - } - - public FSpotTableBehavior<T> get_behavior() { - return behavior; - } - - protected string get_joined_column_list(bool with_table = false) { - string[] columns = behavior.list_columns(); - if (with_table) - for (int i = 0; i < columns.length; i++) - columns[i] = "%s.%s".printf(table_name, columns[i]); - return string.joinv(", ", columns); - } - - protected int select_all(out Sqlite.Statement stmt) throws DatabaseError { - string column_list = get_joined_column_list(); - string sql = "SELECT %s FROM %s".printf(column_list, table_name); - - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.step(); - if (res != Sqlite.ROW && res != Sqlite.DONE) - throw_error("select_all %s %s".printf(table_name, column_list), res); - - return res; - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotImporter.c b/plugins/shotwell-data-imports/FSpotImporter.c deleted file mode 100644 index cc05c99..0000000 --- a/plugins/shotwell-data-imports/FSpotImporter.c +++ /dev/null @@ -1,5334 +0,0 @@ -/* FSpotImporter.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotImporter.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <shotwell-plugin-dev-1.0.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <stdlib.h> -#include <string.h> -#include <gio/gio.h> -#include "shotwell-plugin-common.h" -#include <glib/gi18n-lib.h> -#include <time.h> -#include <gee.h> -#include <float.h> -#include <math.h> - - -#define TYPE_FSPOT_SERVICE (fspot_service_get_type ()) -#define FSPOT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FSPOT_SERVICE, FSpotService)) -#define FSPOT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FSPOT_SERVICE, FSpotServiceClass)) -#define IS_FSPOT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FSPOT_SERVICE)) -#define IS_FSPOT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FSPOT_SERVICE)) -#define FSPOT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FSPOT_SERVICE, FSpotServiceClass)) - -typedef struct _FSpotService FSpotService; -typedef struct _FSpotServiceClass FSpotServiceClass; -typedef struct _FSpotServicePrivate FSpotServicePrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER (data_imports_fspot_fspot_data_importer_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter)) -#define DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporterClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER)) -#define DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporterClass)) - -typedef struct _DataImportsFSpotFSpotDataImporter DataImportsFSpotFSpotDataImporter; -typedef struct _DataImportsFSpotFSpotDataImporterClass DataImportsFSpotFSpotDataImporterClass; - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY (data_imports_fspot_fspot_importable_library_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibrary)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibraryClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibraryClass)) - -typedef struct _DataImportsFSpotFSpotImportableLibrary DataImportsFSpotFSpotImportableLibrary; -typedef struct _DataImportsFSpotFSpotImportableLibraryClass DataImportsFSpotFSpotImportableLibraryClass; -typedef struct _DataImportsFSpotFSpotImportableLibraryPrivate DataImportsFSpotFSpotImportableLibraryPrivate; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM (data_imports_fspot_fspot_importable_item_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItemClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItemClass)) - -typedef struct _DataImportsFSpotFSpotImportableItem DataImportsFSpotFSpotImportableItem; -typedef struct _DataImportsFSpotFSpotImportableItemClass DataImportsFSpotFSpotImportableItemClass; -typedef struct _DataImportsFSpotFSpotImportableItemPrivate DataImportsFSpotFSpotImportableItemPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW (data_imports_fspot_db_fspot_photo_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoRow DataImportsFSpotDbFSpotPhotoRow; -typedef struct _DataImportsFSpotDbFSpotPhotoRowClass DataImportsFSpotDbFSpotPhotoRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW (data_imports_fspot_db_fspot_photo_version_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRow DataImportsFSpotDbFSpotPhotoVersionRow; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRowClass DataImportsFSpotDbFSpotPhotoVersionRowClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW (data_imports_fspot_db_fspot_roll_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) - -typedef struct _DataImportsFSpotDbFSpotRollRow DataImportsFSpotDbFSpotRollRow; -typedef struct _DataImportsFSpotDbFSpotRollRowClass DataImportsFSpotDbFSpotRollRowClass; - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG (data_imports_fspot_fspot_importable_tag_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTag)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTagClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTagClass)) - -typedef struct _DataImportsFSpotFSpotImportableTag DataImportsFSpotFSpotImportableTag; -typedef struct _DataImportsFSpotFSpotImportableTagClass DataImportsFSpotFSpotImportableTagClass; - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT (data_imports_fspot_fspot_importable_event_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEvent)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEventClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEventClass)) - -typedef struct _DataImportsFSpotFSpotImportableEvent DataImportsFSpotFSpotImportableEvent; -typedef struct _DataImportsFSpotFSpotImportableEventClass DataImportsFSpotFSpotImportableEventClass; - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING (data_imports_fspot_fspot_importable_rating_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRating)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRatingClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_RATING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_RATING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING)) -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRatingClass)) - -typedef struct _DataImportsFSpotFSpotImportableRating DataImportsFSpotFSpotImportableRating; -typedef struct _DataImportsFSpotFSpotImportableRatingClass DataImportsFSpotFSpotImportableRatingClass; -typedef struct _DataImportsFSpotDbFSpotPhotoRowPrivate DataImportsFSpotDbFSpotPhotoRowPrivate; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRowPrivate DataImportsFSpotDbFSpotPhotoVersionRowPrivate; -#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) -typedef struct _DataImportsFSpotFSpotImportableTagPrivate DataImportsFSpotFSpotImportableTagPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW (data_imports_fspot_db_fspot_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotTagRow DataImportsFSpotDbFSpotTagRow; -typedef struct _DataImportsFSpotDbFSpotTagRowClass DataImportsFSpotDbFSpotTagRowClass; -typedef struct _DataImportsFSpotDbFSpotTagRowPrivate DataImportsFSpotDbFSpotTagRowPrivate; -typedef struct _DataImportsFSpotFSpotImportableEventPrivate DataImportsFSpotFSpotImportableEventPrivate; -typedef struct _DataImportsFSpotFSpotImportableRatingPrivate DataImportsFSpotFSpotImportableRatingPrivate; - -#define DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE (data_imports_fspot_fspot_tags_cache_get_type ()) -#define DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, DataImportsFSpotFSpotTagsCache)) -#define DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, DataImportsFSpotFSpotTagsCacheClass)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_TAGS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE)) -#define DATA_IMPORTS_FSPOT_IS_FSPOT_TAGS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE)) -#define DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, DataImportsFSpotFSpotTagsCacheClass)) - -typedef struct _DataImportsFSpotFSpotTagsCache DataImportsFSpotFSpotTagsCache; -typedef struct _DataImportsFSpotFSpotTagsCacheClass DataImportsFSpotFSpotTagsCacheClass; -typedef struct _DataImportsFSpotFSpotTagsCachePrivate DataImportsFSpotFSpotTagsCachePrivate; - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE (data_imports_fspot_db_fspot_tags_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotTagsTable DataImportsFSpotDbFSpotTagsTable; -typedef struct _DataImportsFSpotDbFSpotTagsTableClass DataImportsFSpotDbFSpotTagsTableClass; -#define _importable_database_table_unref0(var) ((var == NULL) ? NULL : (var = (importable_database_table_unref (var), NULL))) -typedef struct _DataImportsFSpotFSpotDataImporterPrivate DataImportsFSpotFSpotDataImporterPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE (data_imports_fspot_db_fspot_database_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabase)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabase DataImportsFSpotDbFSpotDatabase; -typedef struct _DataImportsFSpotDbFSpotDatabaseClass DataImportsFSpotDbFSpotDatabaseClass; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -typedef struct _DataImportsFSpotDbFSpotDatabasePrivate DataImportsFSpotDbFSpotDatabasePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE (data_imports_fspot_db_fspot_photos_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosTable DataImportsFSpotDbFSpotPhotosTable; -typedef struct _DataImportsFSpotDbFSpotPhotosTableClass DataImportsFSpotDbFSpotPhotosTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE (data_imports_fspot_db_fspot_photo_versions_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTable DataImportsFSpotDbFSpotPhotoVersionsTable; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTableClass DataImportsFSpotDbFSpotPhotoVersionsTableClass; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE (data_imports_fspot_db_fspot_rolls_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsTable DataImportsFSpotDbFSpotRollsTable; -typedef struct _DataImportsFSpotDbFSpotRollsTableClass DataImportsFSpotDbFSpotRollsTableClass; - -struct _FSpotService { - GObject parent_instance; - FSpotServicePrivate * priv; -}; - -struct _FSpotServiceClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableLibrary { - GObject parent_instance; - DataImportsFSpotFSpotImportableLibraryPrivate * priv; -}; - -struct _DataImportsFSpotFSpotImportableLibraryClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableLibraryPrivate { - GFile* db_file; -}; - -struct _DataImportsFSpotFSpotImportableItem { - GObject parent_instance; - DataImportsFSpotFSpotImportableItemPrivate * priv; -}; - -struct _DataImportsFSpotFSpotImportableItemClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableItemPrivate { - DataImportsFSpotDbFSpotPhotoRow* photo_row; - DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row; - DataImportsFSpotDbFSpotRollRow* roll_row; - DataImportsFSpotFSpotImportableTag** tags; - gint tags_length1; - gint _tags_size_; - DataImportsFSpotFSpotImportableEvent* event; - DataImportsFSpotFSpotImportableRating* rating; - gchar* folder_path; - gchar* filename; - time_t* date_time; -}; - -struct _DataImportsFSpotDbFSpotPhotoRow { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoRowPrivate * priv; - gint64 photo_id; - time_t time; - GFile* base_path; - gchar* filename; - gchar* description; - gint64 roll_id; - gint64 default_version_id; - gint rating; - gchar* md5_sum; -}; - -struct _DataImportsFSpotDbFSpotPhotoRowClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionRow { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionRowPrivate * priv; - gint64 photo_id; - gint64 version_id; - gchar* name; - GFile* base_path; - gchar* filename; - gchar* md5_sum; - gboolean is_protected; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionRowClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableTag { - GObject parent_instance; - DataImportsFSpotFSpotImportableTagPrivate * priv; -}; - -struct _DataImportsFSpotFSpotImportableTagClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableTagPrivate { - DataImportsFSpotDbFSpotTagRow* row; - DataImportsFSpotFSpotImportableTag* parent; -}; - -struct _DataImportsFSpotDbFSpotTagRow { - GObject parent_instance; - DataImportsFSpotDbFSpotTagRowPrivate * priv; - gint64 tag_id; - gchar* name; - gint64 category_id; - gboolean is_category; - gint sort_priority; - gchar* stock_icon; -}; - -struct _DataImportsFSpotDbFSpotTagRowClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableEvent { - GObject parent_instance; - DataImportsFSpotFSpotImportableEventPrivate * priv; -}; - -struct _DataImportsFSpotFSpotImportableEventClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableEventPrivate { - DataImportsFSpotDbFSpotTagRow* row; -}; - -struct _DataImportsFSpotFSpotImportableRating { - GObject parent_instance; - DataImportsFSpotFSpotImportableRatingPrivate * priv; -}; - -struct _DataImportsFSpotFSpotImportableRatingClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotImportableRatingPrivate { - gint rating_value; -}; - -struct _DataImportsFSpotFSpotTagsCache { - GObject parent_instance; - DataImportsFSpotFSpotTagsCachePrivate * priv; -}; - -struct _DataImportsFSpotFSpotTagsCacheClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotTagsCachePrivate { - DataImportsFSpotDbFSpotTagsTable* tags_table; - GeeHashMap* tags_map; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotFSpotDataImporter { - GObject parent_instance; - DataImportsFSpotFSpotDataImporterPrivate * priv; -}; - -struct _DataImportsFSpotFSpotDataImporterClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotFSpotDataImporterPrivate { - SpitDataImportsPluginHost* host; - SpitDataImportsService* service; - gboolean running; -}; - -struct _DataImportsFSpotDbFSpotDatabase { - GObject parent_instance; - DataImportsFSpotDbFSpotDatabasePrivate * priv; - DataImportsFSpotDbFSpotPhotosTable* photos_table; - DataImportsFSpotDbFSpotPhotoVersionsTable* photo_versions_table; - DataImportsFSpotDbFSpotTagsTable* tags_table; - DataImportsFSpotDbFSpotRollsTable* rolls_table; - gint64 hidden_tag_id; -}; - -struct _DataImportsFSpotDbFSpotDatabaseClass { - GObjectClass parent_class; -}; - - -static gpointer fspot_service_parent_class = NULL; -static GdkPixbuf** fspot_service_icon_pixbuf_set; -static gint fspot_service_icon_pixbuf_set_length1; -static GdkPixbuf** fspot_service_icon_pixbuf_set = NULL; -static gint fspot_service_icon_pixbuf_set_length1 = 0; -static gint _fspot_service_icon_pixbuf_set_size_ = 0; -static SpitPluggableIface * fspot_service_spit_pluggable_parent_iface = NULL; -static SpitDataImportsServiceIface * fspot_service_spit_data_imports_service_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_importable_library_parent_class = NULL; -static SpitDataImportsImportableLibraryIface * data_imports_fspot_fspot_importable_library_spit_data_imports_importable_library_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_importable_item_parent_class = NULL; -static SpitDataImportsImportableMediaItemIface * data_imports_fspot_fspot_importable_item_spit_data_imports_importable_media_item_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_importable_tag_parent_class = NULL; -static SpitDataImportsImportableTagIface * data_imports_fspot_fspot_importable_tag_spit_data_imports_importable_tag_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_importable_event_parent_class = NULL; -static SpitDataImportsImportableEventIface * data_imports_fspot_fspot_importable_event_spit_data_imports_importable_event_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_importable_rating_parent_class = NULL; -static SpitDataImportsImportableRatingIface * data_imports_fspot_fspot_importable_rating_spit_data_imports_importable_rating_parent_iface = NULL; -static gpointer data_imports_fspot_fspot_tags_cache_parent_class = NULL; -static gpointer data_imports_fspot_fspot_data_importer_parent_class = NULL; -static SpitDataImportsDataImporterIface * data_imports_fspot_fspot_data_importer_spit_data_imports_data_importer_parent_iface = NULL; - -GType fspot_service_get_type (void) G_GNUC_CONST; -enum { - FSPOT_SERVICE_DUMMY_PROPERTY -}; -#define FSPOT_SERVICE_ICON_FILENAME "f-spot-24.png" -FSpotService* fspot_service_new (GFile* resource_directory); -FSpotService* fspot_service_construct (GType object_type, GFile* resource_directory); -void data_imports_fspot_db_init (void); -static gint fspot_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); -static const gchar* fspot_service_real_get_id (SpitPluggable* base); -static const gchar* fspot_service_real_get_pluggable_name (SpitPluggable* base); -static void fspot_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); -static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length); -static void fspot_service_real_activation (SpitPluggable* base, gboolean enabled); -static SpitDataImportsDataImporter* fspot_service_real_create_data_importer (SpitDataImportsService* base, SpitDataImportsPluginHost* host); -DataImportsFSpotFSpotDataImporter* data_imports_fspot_fspot_data_importer_new (SpitDataImportsService* service, SpitDataImportsPluginHost* host); -DataImportsFSpotFSpotDataImporter* data_imports_fspot_fspot_data_importer_construct (GType object_type, SpitDataImportsService* service, SpitDataImportsPluginHost* host); -GType data_imports_fspot_fspot_data_importer_get_type (void) G_GNUC_CONST; -static void fspot_service_finalize (GObject * obj); -#define DATA_IMPORTS_FSPOT_SERVICE_NAME "F-Spot" -#define DATA_IMPORTS_FSPOT_SERVICE_WELCOME_MESSAGE _ ("Welcome to the F-Spot library import service.\n" \ -"\n" \ -"Please select a library to import, either by selecting one of the exis" \ -"ting libraries found by Shotwell or by selecting an alternative F-Spot" \ -" database file.") -#define DATA_IMPORTS_FSPOT_SERVICE_WELCOME_MESSAGE_FILE_ONLY _ ("Welcome to the F-Spot library import service.\n" \ -"\n" \ -"Please select an F-Spot database file.") -#define DATA_IMPORTS_FSPOT_FILE_IMPORT_LABEL _ ("Manually select an F-Spot database file to import:") -#define DATA_IMPORTS_FSPOT_ERROR_CANT_OPEN_DB_FILE _ ("Cannot open the selected F-Spot database file: the file does not exist" \ -" or is not an F-Spot database") -#define DATA_IMPORTS_FSPOT_ERROR_UNSUPPORTED_DB_VERSION _ ("Cannot open the selected F-Spot database file: this version of the F-S" \ -"pot database is not supported by Shotwell") -#define DATA_IMPORTS_FSPOT_ERROR_CANT_READ_TAGS_TABLE _ ("Cannot read the selected F-Spot database file: error while reading tag" \ -"s table") -#define DATA_IMPORTS_FSPOT_ERROR_CANT_READ_PHOTOS_TABLE _ ("Cannot read the selected F-Spot database file: error while reading pho" \ -"tos table") -#define DATA_IMPORTS_FSPOT_MESSAGE_FINAL_SCREEN _ ("Shotwell has found %d photos in the F-Spot library and is currently im" \ -"porting them. Duplicates will be automatically detected and removed.\n" \ -"\n" \ -"You can close this dialog and start using Shotwell while the import is" \ -" taking place in the background.") -GType data_imports_fspot_fspot_importable_library_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibraryPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY_DUMMY_PROPERTY -}; -DataImportsFSpotFSpotImportableLibrary* data_imports_fspot_fspot_importable_library_new (GFile* db_file); -DataImportsFSpotFSpotImportableLibrary* data_imports_fspot_fspot_importable_library_construct (GType object_type, GFile* db_file); -GFile* data_imports_fspot_fspot_importable_library_get_db_file (DataImportsFSpotFSpotImportableLibrary* self); -static gchar* data_imports_fspot_fspot_importable_library_real_get_display_name (SpitDataImportsImportableLibrary* base); -static void data_imports_fspot_fspot_importable_library_finalize (GObject * obj); -GType data_imports_fspot_fspot_importable_item_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_version_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_roll_row_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_fspot_importable_tag_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_fspot_importable_event_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_fspot_importable_rating_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItemPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM_DUMMY_PROPERTY -}; -DataImportsFSpotFSpotImportableItem* data_imports_fspot_fspot_importable_item_new (DataImportsFSpotDbFSpotPhotoRow* photo_row, DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row, DataImportsFSpotDbFSpotRollRow* roll_row, DataImportsFSpotFSpotImportableTag** tags, int tags_length1, DataImportsFSpotFSpotImportableEvent* event, gboolean is_hidden, gboolean is_favorite); -DataImportsFSpotFSpotImportableItem* data_imports_fspot_fspot_importable_item_construct (GType object_type, DataImportsFSpotDbFSpotPhotoRow* photo_row, DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row, DataImportsFSpotDbFSpotRollRow* roll_row, DataImportsFSpotFSpotImportableTag** tags, int tags_length1, DataImportsFSpotFSpotImportableEvent* event, gboolean is_hidden, gboolean is_favorite); -static DataImportsFSpotFSpotImportableTag** _vala_array_dup2 (DataImportsFSpotFSpotImportableTag** self, int length); -static time_t* _time_t_dup (time_t* self); -DataImportsFSpotFSpotImportableRating* data_imports_fspot_fspot_importable_rating_new (gint rating_value); -DataImportsFSpotFSpotImportableRating* data_imports_fspot_fspot_importable_rating_construct (GType object_type, gint rating_value); -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_REJECTED -1 -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_UNRATED 0 -static gchar* data_imports_fspot_fspot_importable_item_decode_url (DataImportsFSpotFSpotImportableItem* self, const gchar* url); -static SpitDataImportsImportableTag** data_imports_fspot_fspot_importable_item_real_get_tags (SpitDataImportsImportableMediaItem* base, int* result_length1); -static void _vala_array_add1 (SpitDataImportsImportableTag** * array, int* length, int* size, SpitDataImportsImportableTag* value); -static SpitDataImportsImportableEvent* data_imports_fspot_fspot_importable_item_real_get_event (SpitDataImportsImportableMediaItem* base); -static gchar* data_imports_fspot_fspot_importable_item_real_get_folder_path (SpitDataImportsImportableMediaItem* base); -static gchar* data_imports_fspot_fspot_importable_item_real_get_filename (SpitDataImportsImportableMediaItem* base); -static gchar* data_imports_fspot_fspot_importable_item_real_get_title (SpitDataImportsImportableMediaItem* base); -static SpitDataImportsImportableRating* data_imports_fspot_fspot_importable_item_real_get_rating (SpitDataImportsImportableMediaItem* base); -static time_t* data_imports_fspot_fspot_importable_item_real_get_exposure_time (SpitDataImportsImportableMediaItem* base); -static void data_imports_fspot_fspot_importable_item_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_tag_row_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTagPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG_DUMMY_PROPERTY -}; -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_new (DataImportsFSpotDbFSpotTagRow* row, DataImportsFSpotFSpotImportableTag* parent); -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_construct (GType object_type, DataImportsFSpotDbFSpotTagRow* row, DataImportsFSpotFSpotImportableTag* parent); -gint64 data_imports_fspot_fspot_importable_tag_get_id (DataImportsFSpotFSpotImportableTag* self); -static gchar* data_imports_fspot_fspot_importable_tag_real_get_name (SpitDataImportsImportableTag* base); -static SpitDataImportsImportableTag* data_imports_fspot_fspot_importable_tag_real_get_parent (SpitDataImportsImportableTag* base); -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_get_fspot_parent (DataImportsFSpotFSpotImportableTag* self); -gchar* data_imports_fspot_fspot_importable_tag_get_stock_icon (DataImportsFSpotFSpotImportableTag* self); -gboolean data_imports_fspot_fspot_importable_tag_is_stock (DataImportsFSpotFSpotImportableTag* self); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON "stock_icon:" -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_tag_to_event (DataImportsFSpotFSpotImportableTag* self); -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_event_new (DataImportsFSpotDbFSpotTagRow* row); -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_event_construct (GType object_type, DataImportsFSpotDbFSpotTagRow* row); -static void data_imports_fspot_fspot_importable_tag_finalize (GObject * obj); -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEventPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT_DUMMY_PROPERTY -}; -static gchar* data_imports_fspot_fspot_importable_event_real_get_name (SpitDataImportsImportableEvent* base); -static void data_imports_fspot_fspot_importable_event_finalize (GObject * obj); -#define DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRatingPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_DUMMY_PROPERTY -}; -static gboolean data_imports_fspot_fspot_importable_rating_real_is_rejected (SpitDataImportsImportableRating* base); -static gboolean data_imports_fspot_fspot_importable_rating_real_is_unrated (SpitDataImportsImportableRating* base); -static gint data_imports_fspot_fspot_importable_rating_real_get_value (SpitDataImportsImportableRating* base); -static void data_imports_fspot_fspot_importable_rating_finalize (GObject * obj); -GType data_imports_fspot_fspot_tags_cache_get_type (void) G_GNUC_CONST; -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_tags_table_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, DataImportsFSpotFSpotTagsCachePrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE_DUMMY_PROPERTY -}; -GQuark database_error_quark (void); -DataImportsFSpotFSpotTagsCache* data_imports_fspot_fspot_tags_cache_new (DataImportsFSpotDbFSpotTagsTable* tags_table, GError** error); -DataImportsFSpotFSpotTagsCache* data_imports_fspot_fspot_tags_cache_construct (GType object_type, DataImportsFSpotDbFSpotTagsTable* tags_table, GError** error); -static gint64* _int64_dup (gint64* self); -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_tags_cache_get_tag (DataImportsFSpotFSpotTagsCache* self, DataImportsFSpotDbFSpotTagRow* tag_row, GError** error); -static DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_tags_cache_get_tag_from_id (DataImportsFSpotFSpotTagsCache* self, gint64 tag_id, GError** error); -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tags_table_get_by_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 tag_id, GError** error); -static void data_imports_fspot_fspot_tags_cache_finalize (GObject * obj); -#define DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporterPrivate)) -enum { - DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER_DUMMY_PROPERTY -}; -static gboolean data_imports_fspot_fspot_data_importer_real_is_running (SpitDataImportsDataImporter* base); -static SpitDataImportsService* data_imports_fspot_fspot_data_importer_real_get_service (SpitDataImportsDataImporter* base); -static void data_imports_fspot_fspot_data_importer_real_start (SpitDataImportsDataImporter* base); -static void data_imports_fspot_fspot_data_importer_do_discover_importable_libraries (DataImportsFSpotFSpotDataImporter* self); -static void data_imports_fspot_fspot_data_importer_real_stop (SpitDataImportsDataImporter* base); -static void _vala_array_add2 (SpitDataImportsImportableLibrary** * array, int* length, int* size, SpitDataImportsImportableLibrary* value); -static void data_imports_fspot_fspot_data_importer_real_on_library_selected (SpitDataImportsDataImporter* base, SpitDataImportsImportableLibrary* library); -static void data_imports_fspot_fspot_data_importer_real_on_file_selected (SpitDataImportsDataImporter* base, GFile* file); -GType data_imports_fspot_db_fspot_database_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_new (GFile* db_file, GError** error); -DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_construct (GType object_type, GFile* db_file, GError** error); -GType data_imports_fspot_db_fspot_photos_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_versions_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_rolls_table_get_type (void) G_GNUC_CONST; -GeeArrayList* data_imports_fspot_db_fspot_photos_table_get_all (DataImportsFSpotDbFSpotPhotosTable* self, GError** error); -GeeArrayList* data_imports_fspot_db_fspot_tags_table_get_by_photo_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 photo_id, GError** error); -static gboolean data_imports_fspot_fspot_data_importer_is_tag_hidden (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag, gint64 hidden_tag_id); -static gboolean data_imports_fspot_fspot_data_importer_is_tag_favorite (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag); -static void _vala_array_add3 (DataImportsFSpotFSpotImportableTag** * array, int* length, int* size, DataImportsFSpotFSpotImportableTag* value); -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_rolls_table_get_by_id (DataImportsFSpotDbFSpotRollsTable* self, gint64 roll_id, GError** error); -GeeArrayList* data_imports_fspot_db_fspot_photo_versions_table_get_by_photo_id (DataImportsFSpotDbFSpotPhotoVersionsTable* self, gint64 photo_id, GError** error); -static void _vala_array_add4 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value); -static void _vala_array_add5 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value); -static void _vala_array_add6 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value); -void data_imports_fspot_fspot_data_importer_on_imported_items_count (DataImportsFSpotFSpotDataImporter* self, gint imported_items_count); -static void _data_imports_fspot_fspot_data_importer_on_imported_items_count_spit_data_imports_imported_items_count_callback (gint imported_items_count, gpointer self); -static gboolean data_imports_fspot_fspot_data_importer_is_tag_event (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag); -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_EVENTS "stock_icon:emblem-event" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_FAV "stock_icon:emblem-favorite" -static void data_imports_fspot_fspot_data_importer_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - - -FSpotService* fspot_service_construct (GType object_type, GFile* resource_directory) { - FSpotService * self = NULL; - GdkPixbuf** _tmp0_; - gint _tmp0__length1; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (FSpotService*) g_object_new (object_type, NULL); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_db_init (); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = fspot_service_icon_pixbuf_set; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0__length1 = fspot_service_icon_pixbuf_set_length1; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp0_ == NULL) { -#line 617 "FSpotImporter.c" - gint _tmp1_; - GdkPixbuf** _tmp2_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = resources_load_from_resource ("/org/gnome/Shotwell/Imports/" FSPOT_SERVICE_ICON_FILENAME, &_tmp1_); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_icon_pixbuf_set = (_vala_array_free (fspot_service_icon_pixbuf_set, fspot_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_icon_pixbuf_set = _tmp2_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_icon_pixbuf_set_length1 = _tmp1_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _fspot_service_icon_pixbuf_set_size_ = fspot_service_icon_pixbuf_set_length1; -#line 630 "FSpotImporter.c" - } -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 634 "FSpotImporter.c" -} - - -FSpotService* fspot_service_new (GFile* resource_directory) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return fspot_service_construct (TYPE_FSPOT_SERVICE, resource_directory); -#line 641 "FSpotImporter.c" -} - - -static gint fspot_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { - FSpotService * self; - gint result = 0; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = min_host_interface; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = max_host_interface; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_DATA_IMPORTS_CURRENT_INTERFACE); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp2_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 663 "FSpotImporter.c" -} - - -static const gchar* fspot_service_real_get_id (SpitPluggable* base) { - FSpotService * self; - const gchar* result = NULL; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = "org.yorba.shotwell.dataimports.fspot"; -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 676 "FSpotImporter.c" -} - - -static const gchar* fspot_service_real_get_pluggable_name (SpitPluggable* base) { - FSpotService * self; - const gchar* result = NULL; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = "F-Spot"; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 689 "FSpotImporter.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self ? g_object_ref (self) : NULL; -#line 696 "FSpotImporter.c" -} - - -static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length) { - GdkPixbuf** result; - int i; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = g_new0 (GdkPixbuf*, length + 1); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - for (i = 0; i < length; i++) { -#line 707 "FSpotImporter.c" - GdkPixbuf* _tmp0_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = _g_object_ref0 (self[i]); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result[i] = _tmp0_; -#line 713 "FSpotImporter.c" - } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 717 "FSpotImporter.c" -} - - -static void fspot_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { - FSpotService * self; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - GdkPixbuf** _tmp7_; - gint _tmp7__length1; - GdkPixbuf** _tmp8_; - gint _tmp8__length1; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_if_fail (info != NULL); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = g_strdup ("Bruno Girin"); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).authors); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).authors = _tmp0_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_strdup (_ ("Copyright 2016 Software Freedom Conservancy Inc.")); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).copyright); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).copyright = _tmp1_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_strdup (RESOURCES_TRANSLATORS); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).translators); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).translators = _tmp2_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = g_strdup (_VERSION); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).version); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).version = _tmp3_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = g_strdup (RESOURCES_WEBSITE_NAME); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).website_name); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).website_name = _tmp4_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = g_strdup (RESOURCES_WEBSITE_URL); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).website_url); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).website_url = _tmp5_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).is_license_wordwrapped = FALSE; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = g_strdup (RESOURCES_LICENSE); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 ((*info).license); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).license = _tmp6_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = fspot_service_icon_pixbuf_set; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7__length1 = fspot_service_icon_pixbuf_set_length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup1 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8__length1 = _tmp7__length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).icons = _tmp8_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*info).icons_length1 = _tmp8__length1; -#line 796 "FSpotImporter.c" -} - - -static void fspot_service_real_activation (SpitPluggable* base, gboolean enabled) { - FSpotService * self; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 804 "FSpotImporter.c" -} - - -static SpitDataImportsDataImporter* fspot_service_real_create_data_importer (SpitDataImportsService* base, SpitDataImportsPluginHost* host) { - FSpotService * self; - SpitDataImportsDataImporter* result = NULL; - SpitDataImportsPluginHost* _tmp0_; - DataImportsFSpotFSpotDataImporter* _tmp1_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FSPOT_SERVICE, FSpotService); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_PLUGIN_HOST (host), NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = host; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = data_imports_fspot_fspot_data_importer_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_SERVICE, SpitDataImportsService), _tmp0_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORTER, SpitDataImportsDataImporter); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 825 "FSpotImporter.c" -} - - -static void fspot_service_class_init (FSpotServiceClass * klass) { -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = fspot_service_finalize; -#line 834 "FSpotImporter.c" -} - - -static void fspot_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_pluggable_interface = (gint (*) (SpitPluggable *, gint, gint)) fspot_service_real_get_pluggable_interface; -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_id = (const gchar* (*) (SpitPluggable *)) fspot_service_real_get_id; -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_pluggable_name = (const gchar* (*) (SpitPluggable *)) fspot_service_real_get_pluggable_name; -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_info = (void (*) (SpitPluggable *, SpitPluggableInfo*)) fspot_service_real_get_info; -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->activation = (void (*) (SpitPluggable *, gboolean)) fspot_service_real_activation; -#line 851 "FSpotImporter.c" -} - - -static void fspot_service_spit_data_imports_service_interface_init (SpitDataImportsServiceIface * iface) { -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - fspot_service_spit_data_imports_service_parent_iface = g_type_interface_peek_parent (iface); -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->create_data_importer = (SpitDataImportsDataImporter* (*) (SpitDataImportsService *, SpitDataImportsPluginHost*)) fspot_service_real_create_data_importer; -#line 860 "FSpotImporter.c" -} - - -static void fspot_service_instance_init (FSpotService * self) { -} - - -static void fspot_service_finalize (GObject * obj) { - FSpotService * self; -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FSPOT_SERVICE, FSpotService); -#line 7 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (fspot_service_parent_class)->finalize (obj); -#line 874 "FSpotImporter.c" -} - - -GType fspot_service_get_type (void) { - static volatile gsize fspot_service_type_id__volatile = 0; - if (g_once_init_enter (&fspot_service_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FSpotServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fspot_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FSpotService), 0, (GInstanceInitFunc) fspot_service_instance_init, NULL }; - static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) fspot_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo spit_data_imports_service_info = { (GInterfaceInitFunc) fspot_service_spit_data_imports_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType fspot_service_type_id; - fspot_service_type_id = g_type_register_static (G_TYPE_OBJECT, "FSpotService", &g_define_type_info, 0); - g_type_add_interface_static (fspot_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); - g_type_add_interface_static (fspot_service_type_id, SPIT_DATA_IMPORTS_TYPE_SERVICE, &spit_data_imports_service_info); - g_once_init_leave (&fspot_service_type_id__volatile, fspot_service_type_id); - } - return fspot_service_type_id__volatile; -} - - -DataImportsFSpotFSpotImportableLibrary* data_imports_fspot_fspot_importable_library_construct (GType object_type, GFile* db_file) { - DataImportsFSpotFSpotImportableLibrary * self = NULL; - GFile* _tmp0_; - GFile* _tmp1_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (G_IS_FILE (db_file), NULL); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotImportableLibrary*) g_object_new (object_type, NULL); -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = db_file; -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->db_file); -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->db_file = _tmp1_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 912 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableLibrary* data_imports_fspot_fspot_importable_library_new (GFile* db_file) { -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_importable_library_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, db_file); -#line 919 "FSpotImporter.c" -} - - -GFile* data_imports_fspot_fspot_importable_library_get_db_file (DataImportsFSpotFSpotImportableLibrary* self) { - GFile* result = NULL; - GFile* _tmp0_; - GFile* _tmp1_; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_LIBRARY (self), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->db_file; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 937 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_library_real_get_display_name (SpitDataImportsImportableLibrary* base) { - DataImportsFSpotFSpotImportableLibrary * self; - gchar* result = NULL; - GFile* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibrary); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->db_file; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_file_get_path (_tmp0_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _tmp1_; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = g_strdup_printf (_ ("F-Spot library: %s"), _tmp2_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = _tmp3_; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp2_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp4_; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 967 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_library_class_init (DataImportsFSpotFSpotImportableLibraryClass * klass) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_library_parent_class = g_type_class_peek_parent (klass); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotImportableLibraryPrivate)); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_importable_library_finalize; -#line 978 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_library_spit_data_imports_importable_library_interface_init (SpitDataImportsImportableLibraryIface * iface) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_library_spit_data_imports_importable_library_parent_iface = g_type_interface_peek_parent (iface); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_display_name = (gchar* (*) (SpitDataImportsImportableLibrary *)) data_imports_fspot_fspot_importable_library_real_get_display_name; -#line 987 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_library_instance_init (DataImportsFSpotFSpotImportableLibrary * self) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_LIBRARY_GET_PRIVATE (self); -#line 994 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_library_finalize (GObject * obj) { - DataImportsFSpotFSpotImportableLibrary * self; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibrary); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->db_file); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_importable_library_parent_class)->finalize (obj); -#line 1006 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_importable_library_get_type (void) { - static volatile gsize data_imports_fspot_fspot_importable_library_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_importable_library_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotImportableLibraryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_importable_library_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotImportableLibrary), 0, (GInstanceInitFunc) data_imports_fspot_fspot_importable_library_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_importable_library_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_importable_library_spit_data_imports_importable_library_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_importable_library_type_id; - data_imports_fspot_fspot_importable_library_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotImportableLibrary", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_importable_library_type_id, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_LIBRARY, &spit_data_imports_importable_library_info); - g_once_init_leave (&data_imports_fspot_fspot_importable_library_type_id__volatile, data_imports_fspot_fspot_importable_library_type_id); - } - return data_imports_fspot_fspot_importable_library_type_id__volatile; -} - - -static DataImportsFSpotFSpotImportableTag** _vala_array_dup2 (DataImportsFSpotFSpotImportableTag** self, int length) { - DataImportsFSpotFSpotImportableTag** result; - int i; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = g_new0 (DataImportsFSpotFSpotImportableTag*, length + 1); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - for (i = 0; i < length; i++) { -#line 1031 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* _tmp0_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = _g_object_ref0 (self[i]); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result[i] = _tmp0_; -#line 1037 "FSpotImporter.c" - } -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1041 "FSpotImporter.c" -} - - -static time_t* _time_t_dup (time_t* self) { - time_t* dup; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - dup = g_new0 (time_t, 1); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - memcpy (dup, self, sizeof (time_t)); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return dup; -#line 1053 "FSpotImporter.c" -} - - -static gpointer __time_t_dup0 (gpointer self) { -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self ? _time_t_dup (self) : NULL; -#line 1060 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableItem* data_imports_fspot_fspot_importable_item_construct (GType object_type, DataImportsFSpotDbFSpotPhotoRow* photo_row, DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row, DataImportsFSpotDbFSpotRollRow* roll_row, DataImportsFSpotFSpotImportableTag** tags, int tags_length1, DataImportsFSpotFSpotImportableEvent* event, gboolean is_hidden, gboolean is_favorite) { - DataImportsFSpotFSpotImportableItem * self = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp3_; - DataImportsFSpotDbFSpotRollRow* _tmp4_; - DataImportsFSpotDbFSpotRollRow* _tmp5_; - DataImportsFSpotFSpotImportableTag** _tmp6_; - gint _tmp6__length1; - DataImportsFSpotFSpotImportableTag** _tmp7_; - gint _tmp7__length1; - DataImportsFSpotFSpotImportableEvent* _tmp8_; - DataImportsFSpotFSpotImportableEvent* _tmp9_; - DataImportsFSpotDbFSpotPhotoRow* _tmp10_; - time_t _tmp11_; - time_t* _tmp12_; - DataImportsFSpotDbFSpotPhotoRow* _tmp13_; - gint _tmp14_; - gchar* _tmp23_ = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp24_; - gchar* _tmp31_; - const gchar* _tmp32_ = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp33_; - gchar* _tmp38_; - gboolean _tmp39_ = FALSE; - const gchar* _tmp40_; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW (photo_row), NULL); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail ((photo_version_row == NULL) || DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW (photo_version_row), NULL); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail ((roll_row == NULL) || DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW (roll_row), NULL); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail ((event == NULL) || DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_EVENT (event), NULL); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotImportableItem*) g_object_new (object_type, NULL); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = photo_row; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->photo_row); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->photo_row = _tmp1_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = photo_version_row; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->photo_version_row); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->photo_version_row = _tmp3_; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = roll_row; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _g_object_ref0 (_tmp4_); -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->roll_row); -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->roll_row = _tmp5_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = tags; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6__length1 = tags_length1; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = (_tmp6_ != NULL) ? _vala_array_dup2 (_tmp6_, _tmp6__length1) : ((gpointer) _tmp6_); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7__length1 = _tmp6__length1; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags = (_vala_array_free (self->priv->tags, self->priv->tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags = _tmp7_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags_length1 = _tmp7__length1; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->_tags_size_ = self->priv->tags_length1; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = event; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = _g_object_ref0 (_tmp8_); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->event); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->event = _tmp9_; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = photo_row; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = _tmp10_->time; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = __time_t_dup0 (&_tmp11_); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->date_time); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->date_time = _tmp12_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = photo_row; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = _tmp13_->rating; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp14_ > 0) { -#line 1165 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp15_; - gint _tmp16_; - DataImportsFSpotFSpotImportableRating* _tmp17_; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp15_ = photo_row; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp16_ = _tmp15_->rating; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp17_ = data_imports_fspot_fspot_importable_rating_new (_tmp16_); -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->rating); -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->rating = _tmp17_; -#line 1179 "FSpotImporter.c" - } else { - gboolean _tmp18_; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp18_ = is_hidden; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp18_) { -#line 1186 "FSpotImporter.c" - DataImportsFSpotFSpotImportableRating* _tmp19_; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp19_ = data_imports_fspot_fspot_importable_rating_new (DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_REJECTED); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->rating); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->rating = _tmp19_; -#line 1194 "FSpotImporter.c" - } else { - gboolean _tmp20_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp20_ = is_favorite; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp20_) { -#line 1201 "FSpotImporter.c" - DataImportsFSpotFSpotImportableRating* _tmp21_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_ = data_imports_fspot_fspot_importable_rating_new (5); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->rating); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->rating = _tmp21_; -#line 1209 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableRating* _tmp22_; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp22_ = data_imports_fspot_fspot_importable_rating_new (DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_UNRATED); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->rating); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->rating = _tmp22_; -#line 1218 "FSpotImporter.c" - } - } - } -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp24_ = photo_version_row; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp24_ != NULL) { -#line 1226 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp25_; - GFile* _tmp26_; - gchar* _tmp27_; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp25_ = photo_version_row; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp26_ = _tmp25_->base_path; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp27_ = g_file_get_path (_tmp26_); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp23_); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23_ = _tmp27_; -#line 1240 "FSpotImporter.c" - } else { - DataImportsFSpotDbFSpotPhotoRow* _tmp28_; - GFile* _tmp29_; - gchar* _tmp30_; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp28_ = photo_row; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp29_ = _tmp28_->base_path; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp30_ = g_file_get_path (_tmp29_); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp23_); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23_ = _tmp30_; -#line 1255 "FSpotImporter.c" - } -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp31_ = g_strdup (_tmp23_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->folder_path); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->folder_path = _tmp31_; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp33_ = photo_version_row; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp33_ != NULL) { -#line 1267 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp34_; - const gchar* _tmp35_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp34_ = photo_version_row; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp35_ = _tmp34_->filename; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp32_ = _tmp35_; -#line 1276 "FSpotImporter.c" - } else { - DataImportsFSpotDbFSpotPhotoRow* _tmp36_; - const gchar* _tmp37_; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp36_ = photo_row; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp37_ = _tmp36_->filename; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp32_ = _tmp37_; -#line 1286 "FSpotImporter.c" - } -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp38_ = g_strdup (_tmp32_); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->filename); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->filename = _tmp38_; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp40_ = self->priv->folder_path; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp40_ != NULL) { -#line 1298 "FSpotImporter.c" - const gchar* _tmp41_; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp41_ = self->priv->filename; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp39_ = _tmp41_ != NULL; -#line 1304 "FSpotImporter.c" - } else { -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp39_ = FALSE; -#line 1308 "FSpotImporter.c" - } -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp39_) { -#line 1312 "FSpotImporter.c" - GFile* photo = NULL; - const gchar* _tmp42_; - GFile* _tmp43_; - GFile* _tmp44_; - const gchar* _tmp45_; - GFile* _tmp46_; - GFile* _tmp47_; - GFile* _tmp48_; - gboolean _tmp49_; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp42_ = self->priv->folder_path; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp43_ = g_file_new_for_path (_tmp42_); -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp44_ = _tmp43_; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp45_ = self->priv->filename; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp46_ = g_file_get_child (_tmp44_, _tmp45_); -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp47_ = _tmp46_; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp44_); -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo = _tmp47_; -#line 140 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp48_ = photo; -#line 140 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp49_ = g_file_query_exists (_tmp48_, NULL); -#line 140 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!_tmp49_) { -#line 1344 "FSpotImporter.c" - const gchar* _tmp50_; - gchar* _tmp51_; - const gchar* _tmp52_; - gchar* _tmp53_; -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp50_ = self->priv->folder_path; -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp51_ = data_imports_fspot_fspot_importable_item_decode_url (self, _tmp50_); -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->folder_path); -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->folder_path = _tmp51_; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp52_ = self->priv->filename; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp53_ = data_imports_fspot_fspot_importable_item_decode_url (self, _tmp52_); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->filename); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->filename = _tmp53_; -#line 1365 "FSpotImporter.c" - } -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo); -#line 1369 "FSpotImporter.c" - } -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp23_); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 1375 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableItem* data_imports_fspot_fspot_importable_item_new (DataImportsFSpotDbFSpotPhotoRow* photo_row, DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row, DataImportsFSpotDbFSpotRollRow* roll_row, DataImportsFSpotFSpotImportableTag** tags, int tags_length1, DataImportsFSpotFSpotImportableEvent* event, gboolean is_hidden, gboolean is_favorite) { -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_importable_item_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, photo_row, photo_version_row, roll_row, tags, tags_length1, event, is_hidden, is_favorite); -#line 1382 "FSpotImporter.c" -} - - -static void _vala_array_add1 (SpitDataImportsImportableTag** * array, int* length, int* size, SpitDataImportsImportableTag* value) { -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (SpitDataImportsImportableTag*, *array, (*size) + 1); -#line 1393 "FSpotImporter.c" - } -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 1399 "FSpotImporter.c" -} - - -static SpitDataImportsImportableTag** data_imports_fspot_fspot_importable_item_real_get_tags (SpitDataImportsImportableMediaItem* base, int* result_length1) { - DataImportsFSpotFSpotImportableItem * self; - SpitDataImportsImportableTag** result = NULL; - SpitDataImportsImportableTag** importable_tags = NULL; - SpitDataImportsImportableTag** _tmp0_; - gint importable_tags_length1; - gint _importable_tags_size_; - DataImportsFSpotFSpotImportableTag** _tmp1_; - gint _tmp1__length1; - SpitDataImportsImportableTag** _tmp6_; - gint _tmp6__length1; -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = g_new0 (SpitDataImportsImportableTag*, 0 + 1); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_tags = _tmp0_; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_tags_length1 = 0; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _importable_tags_size_ = importable_tags_length1; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = self->priv->tags; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1__length1 = self->priv->tags_length1; -#line 1428 "FSpotImporter.c" - { - DataImportsFSpotFSpotImportableTag** tag_collection = NULL; - gint tag_collection_length1 = 0; - gint _tag_collection_size_ = 0; - gint tag_it = 0; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag_collection = _tmp1_; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag_collection_length1 = _tmp1__length1; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - for (tag_it = 0; tag_it < _tmp1__length1; tag_it = tag_it + 1) { -#line 1440 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* _tmp2_; - DataImportsFSpotFSpotImportableTag* tag = NULL; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _g_object_ref0 (tag_collection[tag_it]); -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag = _tmp2_; -#line 1447 "FSpotImporter.c" - { - SpitDataImportsImportableTag** _tmp3_; - gint _tmp3__length1; - DataImportsFSpotFSpotImportableTag* _tmp4_; - SpitDataImportsImportableTag* _tmp5_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = importable_tags; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3__length1 = importable_tags_length1; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = tag; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_TAG, SpitDataImportsImportableTag)); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add1 (&importable_tags, &importable_tags_length1, &_importable_tags_size_, _tmp5_); -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 1465 "FSpotImporter.c" - } - } - } -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = importable_tags; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6__length1 = importable_tags_length1; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (result_length1) { -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *result_length1 = _tmp6__length1; -#line 1477 "FSpotImporter.c" - } -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp6_; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1483 "FSpotImporter.c" -} - - -static SpitDataImportsImportableEvent* data_imports_fspot_fspot_importable_item_real_get_event (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - SpitDataImportsImportableEvent* result = NULL; - DataImportsFSpotFSpotImportableEvent* _tmp0_; - SpitDataImportsImportableEvent* _tmp1_; -#line 154 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->event; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_EVENT, SpitDataImportsImportableEvent)); -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1502 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_item_real_get_folder_path (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 158 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->folder_path; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1521 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_item_real_get_filename (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->filename; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1540 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_item_real_get_title (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - gchar* result = NULL; - const gchar* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - DataImportsFSpotDbFSpotPhotoRow* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp8_; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = self->priv->photo_row; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _tmp2_->description; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp3_ == NULL) { -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = TRUE; -#line 1562 "FSpotImporter.c" - } else { - DataImportsFSpotDbFSpotPhotoRow* _tmp4_; - const gchar* _tmp5_; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = self->priv->photo_row; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _tmp4_->description; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_strcmp0 (_tmp5_, "") == 0; -#line 1572 "FSpotImporter.c" - } -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp1_) { -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = NULL; -#line 1578 "FSpotImporter.c" - } else { - DataImportsFSpotDbFSpotPhotoRow* _tmp6_; - const gchar* _tmp7_; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = self->priv->photo_row; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = _tmp6_->description; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = _tmp7_; -#line 1588 "FSpotImporter.c" - } -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = g_strdup (_tmp0_); -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp8_; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1596 "FSpotImporter.c" -} - - -static SpitDataImportsImportableRating* data_imports_fspot_fspot_importable_item_real_get_rating (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - SpitDataImportsImportableRating* result = NULL; - DataImportsFSpotFSpotImportableRating* _tmp0_; - SpitDataImportsImportableRating* _tmp1_; -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->rating; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_RATING, SpitDataImportsImportableRating)); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1615 "FSpotImporter.c" -} - - -static time_t* data_imports_fspot_fspot_importable_item_real_get_exposure_time (SpitDataImportsImportableMediaItem* base) { - DataImportsFSpotFSpotImportableItem * self; - time_t* result = NULL; - time_t* _tmp0_; - time_t* _tmp1_; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->date_time; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = __time_t_dup0 (_tmp0_); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 1634 "FSpotImporter.c" -} - - -static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) { - gint result = 0; - gchar* _result_ = NULL; - gint _tmp0_; - gunichar _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1031 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, 0); -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = c; -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); -#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1659 "FSpotImporter.c" - gchar* _tmp4_; -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1667 "FSpotImporter.c" - } else { -#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = -1; -#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1673 "FSpotImporter.c" - } -} - - -static gchar* string_slice (const gchar* self, glong start, glong end) { - gchar* result = NULL; - glong string_length = 0L; - gint _tmp0_; - gint _tmp1_; - glong _tmp2_; - glong _tmp5_; - gboolean _tmp8_ = FALSE; - glong _tmp9_; - gboolean _tmp12_ = FALSE; - glong _tmp13_; - glong _tmp16_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - gchar* _tmp21_; -#line 1355 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = strlen (self); -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - string_length = (glong) _tmp1_; -#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = start; -#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_ < ((glong) 0)) { -#line 1707 "FSpotImporter.c" - glong _tmp3_; - glong _tmp4_; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = string_length; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = start; -#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - start = _tmp3_ + _tmp4_; -#line 1716 "FSpotImporter.c" - } -#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp5_ < ((glong) 0)) { -#line 1722 "FSpotImporter.c" - glong _tmp6_; - glong _tmp7_; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = string_length; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = end; -#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp6_ + _tmp7_; -#line 1731 "FSpotImporter.c" - } -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = start; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp9_ >= ((glong) 0)) { -#line 1737 "FSpotImporter.c" - glong _tmp10_; - glong _tmp11_; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = start; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = string_length; -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp10_ <= _tmp11_; -#line 1746 "FSpotImporter.c" - } else { -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = FALSE; -#line 1750 "FSpotImporter.c" - } -#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp8_, NULL); -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = end; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13_ >= ((glong) 0)) { -#line 1758 "FSpotImporter.c" - glong _tmp14_; - glong _tmp15_; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = end; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ <= _tmp15_; -#line 1767 "FSpotImporter.c" - } else { -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 1771 "FSpotImporter.c" - } -#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_, NULL); -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = start; -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = end; -#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = start; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = end; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = start; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp21_; -#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1793 "FSpotImporter.c" -} - - -static gchar string_get (const gchar* self, glong index) { - gchar result = '\0'; - glong _tmp0_; - gchar _tmp1_; -#line 1110 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, '\0'); -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = ((gchar*) self)[_tmp0_]; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1811 "FSpotImporter.c" -} - - -static glong string_strnlen (gchar* str, glong maxlen) { - glong result = 0L; - gchar* end = NULL; - gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 1834 "FSpotImporter.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1842 "FSpotImporter.c" - } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1854 "FSpotImporter.c" - } -} - - -static gchar* string_substring (const gchar* self, glong offset, glong len) { - gchar* result = NULL; - glong string_length = 0L; - gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 1878 "FSpotImporter.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 1884 "FSpotImporter.c" - } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 1888 "FSpotImporter.c" - } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 1892 "FSpotImporter.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 1904 "FSpotImporter.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 1914 "FSpotImporter.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 1920 "FSpotImporter.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 1934 "FSpotImporter.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 1944 "FSpotImporter.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 1950 "FSpotImporter.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 1959 "FSpotImporter.c" - } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1979 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_item_decode_url (DataImportsFSpotFSpotImportableItem* self, const gchar* url) { - gchar* result = NULL; - GString* builder = NULL; - GString* _tmp0_; - GString* _tmp49_; - const gchar* _tmp50_; - gchar* _tmp51_; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_ITEM (self), NULL); -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (url != NULL, NULL); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = g_string_new (""); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - builder = _tmp0_; -#line 1998 "FSpotImporter.c" - { - gint idx = 0; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - idx = 0; -#line 2003 "FSpotImporter.c" - { - gboolean _tmp1_ = FALSE; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = TRUE; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - while (TRUE) { -#line 2010 "FSpotImporter.c" - gint _tmp2_; - const gchar* _tmp3_; - gint _tmp4_; - gint _tmp5_; - gint cidx = 0; - const gchar* _tmp6_; - gint _tmp7_; - gint _tmp8_; - gint _tmp9_; - gint _tmp10_; - gint _tmp17_; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!_tmp1_) { -#line 2024 "FSpotImporter.c" - } -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = FALSE; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = idx; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = url; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = strlen (_tmp3_); -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _tmp4_; -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!(_tmp2_ < _tmp5_)) { -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - break; -#line 2040 "FSpotImporter.c" - } -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = url; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = idx; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = string_index_of_char (_tmp6_, (gunichar) '%', _tmp7_); -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - cidx = _tmp8_; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = cidx; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = idx; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp9_ > _tmp10_) { -#line 2056 "FSpotImporter.c" - GString* _tmp11_; - const gchar* _tmp12_; - gint _tmp13_; - gint _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = builder; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = url; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = idx; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = cidx; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp15_ = string_slice (_tmp12_, (glong) _tmp13_, (glong) _tmp14_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp16_ = _tmp15_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_string_append (_tmp11_, _tmp16_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp16_); -#line 2079 "FSpotImporter.c" - } -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp17_ = cidx; -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp17_ >= 0) { -#line 2085 "FSpotImporter.c" - gint _tmp18_; - const gchar* _tmp19_; - gint _tmp20_; - gint _tmp21_; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp18_ = cidx; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp19_ = url; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp20_ = strlen (_tmp19_); -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_ = _tmp20_; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp18_ < (_tmp21_ - 2)) { -#line 2100 "FSpotImporter.c" - gchar c1 = '\0'; - const gchar* _tmp22_; - gint _tmp23_; - gchar _tmp24_; - gchar c2 = '\0'; - const gchar* _tmp25_; - gint _tmp26_; - gchar _tmp27_; - gboolean _tmp28_ = FALSE; - gchar _tmp29_; - gboolean _tmp30_; - gint _tmp39_; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp22_ = url; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23_ = cidx; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp24_ = string_get (_tmp22_, (glong) (_tmp23_ + 1)); -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - c1 = _tmp24_; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp25_ = url; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp26_ = cidx; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp27_ = string_get (_tmp25_, (glong) (_tmp26_ + 2)); -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - c2 = _tmp27_; -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp29_ = c1; -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp30_ = g_ascii_isxdigit (_tmp29_); -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp30_) { -#line 2135 "FSpotImporter.c" - gchar _tmp31_; - gboolean _tmp32_; -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp31_ = c1; -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp32_ = g_ascii_isxdigit (_tmp31_); -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp28_ = _tmp32_; -#line 2144 "FSpotImporter.c" - } else { -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp28_ = FALSE; -#line 2148 "FSpotImporter.c" - } -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp28_) { -#line 2152 "FSpotImporter.c" - gint ccode = 0; - gchar _tmp33_; - gint _tmp34_; - gchar _tmp35_; - gint _tmp36_; - GString* _tmp37_; - gint _tmp38_; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp33_ = c1; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp34_ = g_ascii_xdigit_value (_tmp33_); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp35_ = c2; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp36_ = g_ascii_xdigit_value (_tmp35_); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - ccode = (0x10 * _tmp34_) + _tmp36_; -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp37_ = builder; -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp38_ = ccode; -#line 191 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_string_append_c (_tmp37_, (gchar) _tmp38_); -#line 2176 "FSpotImporter.c" - } -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp39_ = cidx; -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - idx = _tmp39_ + 3; -#line 2182 "FSpotImporter.c" - } else { - gint _tmp40_; -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp40_ = cidx; -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - idx = _tmp40_ + 1; -#line 2189 "FSpotImporter.c" - } - } else { - GString* _tmp41_; - const gchar* _tmp42_; - gint _tmp43_; - gchar* _tmp44_; - gchar* _tmp45_; - const gchar* _tmp46_; - gint _tmp47_; - gint _tmp48_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp41_ = builder; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp42_ = url; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp43_ = idx; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp44_ = string_substring (_tmp42_, (glong) _tmp43_, (glong) -1); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp45_ = _tmp44_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_string_append (_tmp41_, _tmp45_); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp45_); -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp46_ = url; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp47_ = strlen (_tmp46_); -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp48_ = _tmp47_; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - idx = _tmp48_; -#line 2222 "FSpotImporter.c" - } - } - } - } -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp49_ = builder; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp50_ = _tmp49_->str; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp51_ = g_strdup (_tmp50_); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp51_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_string_free0 (builder); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2239 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_item_class_init (DataImportsFSpotFSpotImportableItemClass * klass) { -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_item_parent_class = g_type_class_peek_parent (klass); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotImportableItemPrivate)); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_importable_item_finalize; -#line 2250 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_item_spit_data_imports_importable_media_item_interface_init (SpitDataImportsImportableMediaItemIface * iface) { -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_item_spit_data_imports_importable_media_item_parent_iface = g_type_interface_peek_parent (iface); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_tags = (SpitDataImportsImportableTag** (*) (SpitDataImportsImportableMediaItem *, int*)) data_imports_fspot_fspot_importable_item_real_get_tags; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_event = (SpitDataImportsImportableEvent* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_event; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_folder_path = (gchar* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_folder_path; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_filename = (gchar* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_filename; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_title = (gchar* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_title; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_rating = (SpitDataImportsImportableRating* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_rating; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_exposure_time = (time_t* (*) (SpitDataImportsImportableMediaItem *)) data_imports_fspot_fspot_importable_item_real_get_exposure_time; -#line 2271 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_item_instance_init (DataImportsFSpotFSpotImportableItem * self) { -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_ITEM_GET_PRIVATE (self); -#line 2278 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_item_finalize (GObject * obj) { - DataImportsFSpotFSpotImportableItem * self; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_ITEM, DataImportsFSpotFSpotImportableItem); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->photo_row); -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->photo_version_row); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->roll_row); -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags = (_vala_array_free (self->priv->tags, self->priv->tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->event); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->rating); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->folder_path); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->filename); -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (self->priv->date_time); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_importable_item_parent_class)->finalize (obj); -#line 2306 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_importable_item_get_type (void) { - static volatile gsize data_imports_fspot_fspot_importable_item_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_importable_item_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotImportableItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_importable_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotImportableItem), 0, (GInstanceInitFunc) data_imports_fspot_fspot_importable_item_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_importable_media_item_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_importable_item_spit_data_imports_importable_media_item_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_importable_item_type_id; - data_imports_fspot_fspot_importable_item_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotImportableItem", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_importable_item_type_id, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_MEDIA_ITEM, &spit_data_imports_importable_media_item_info); - g_once_init_leave (&data_imports_fspot_fspot_importable_item_type_id__volatile, data_imports_fspot_fspot_importable_item_type_id); - } - return data_imports_fspot_fspot_importable_item_type_id__volatile; -} - - -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_construct (GType object_type, DataImportsFSpotDbFSpotTagRow* row, DataImportsFSpotFSpotImportableTag* parent) { - DataImportsFSpotFSpotImportableTag * self = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - DataImportsFSpotDbFSpotTagRow* _tmp1_; - DataImportsFSpotFSpotImportableTag* _tmp2_; - DataImportsFSpotFSpotImportableTag* _tmp3_; -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW (row), NULL); -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail ((parent == NULL) || DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (parent), NULL); -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotImportableTag*) g_object_new (object_type, NULL); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = row; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->row); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->row = _tmp1_; -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = parent; -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->parent); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->parent = _tmp3_; -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 2354 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_new (DataImportsFSpotDbFSpotTagRow* row, DataImportsFSpotFSpotImportableTag* parent) { -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_importable_tag_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, row, parent); -#line 2361 "FSpotImporter.c" -} - - -gint64 data_imports_fspot_fspot_importable_tag_get_id (DataImportsFSpotFSpotImportableTag* self) { - gint64 result = 0LL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - gint64 _tmp1_; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (self), 0LL); -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _tmp0_->tag_id; -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2379 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_tag_real_get_name (SpitDataImportsImportableTag* base) { - DataImportsFSpotFSpotImportableTag * self; - gchar* result = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTag); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _tmp0_->name; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp2_; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2401 "FSpotImporter.c" -} - - -static SpitDataImportsImportableTag* data_imports_fspot_fspot_importable_tag_real_get_parent (SpitDataImportsImportableTag* base) { - DataImportsFSpotFSpotImportableTag * self; - SpitDataImportsImportableTag* result = NULL; - DataImportsFSpotFSpotImportableTag* _tmp0_; - SpitDataImportsImportableTag* _tmp1_; -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTag); -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->parent; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_TAG, SpitDataImportsImportableTag)); -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2420 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_importable_tag_get_fspot_parent (DataImportsFSpotFSpotImportableTag* self) { - DataImportsFSpotFSpotImportableTag* result = NULL; - DataImportsFSpotFSpotImportableTag* _tmp0_; - DataImportsFSpotFSpotImportableTag* _tmp1_; -#line 227 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (self), NULL); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->parent; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2438 "FSpotImporter.c" -} - - -gchar* data_imports_fspot_fspot_importable_tag_get_stock_icon (DataImportsFSpotFSpotImportableTag* self) { - gchar* result = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (self), NULL); -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _tmp0_->stock_icon; -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp2_; -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2459 "FSpotImporter.c" -} - - -gboolean data_imports_fspot_fspot_importable_tag_is_stock (DataImportsFSpotFSpotImportableTag* self) { - gboolean result = FALSE; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - const gchar* _tmp1_; - gboolean _tmp2_; -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (self), FALSE); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _tmp0_->stock_icon; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_str_has_prefix (_tmp1_, DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp2_; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2480 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_tag_to_event (DataImportsFSpotFSpotImportableTag* self) { - DataImportsFSpotFSpotImportableEvent* result = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - DataImportsFSpotFSpotImportableEvent* _tmp1_; -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (self), NULL); -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = data_imports_fspot_fspot_importable_event_new (_tmp0_); -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2498 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_tag_class_init (DataImportsFSpotFSpotImportableTagClass * klass) { -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_tag_parent_class = g_type_class_peek_parent (klass); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotImportableTagPrivate)); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_importable_tag_finalize; -#line 2509 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_tag_spit_data_imports_importable_tag_interface_init (SpitDataImportsImportableTagIface * iface) { -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_tag_spit_data_imports_importable_tag_parent_iface = g_type_interface_peek_parent (iface); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_name = (gchar* (*) (SpitDataImportsImportableTag *)) data_imports_fspot_fspot_importable_tag_real_get_name; -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_parent = (SpitDataImportsImportableTag* (*) (SpitDataImportsImportableTag *)) data_imports_fspot_fspot_importable_tag_real_get_parent; -#line 2520 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_tag_instance_init (DataImportsFSpotFSpotImportableTag * self) { -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_TAG_GET_PRIVATE (self); -#line 2527 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_tag_finalize (GObject * obj) { - DataImportsFSpotFSpotImportableTag * self; -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, DataImportsFSpotFSpotImportableTag); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->row); -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->parent); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_importable_tag_parent_class)->finalize (obj); -#line 2541 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_importable_tag_get_type (void) { - static volatile gsize data_imports_fspot_fspot_importable_tag_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_importable_tag_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotImportableTagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_importable_tag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotImportableTag), 0, (GInstanceInitFunc) data_imports_fspot_fspot_importable_tag_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_importable_tag_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_importable_tag_spit_data_imports_importable_tag_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_importable_tag_type_id; - data_imports_fspot_fspot_importable_tag_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotImportableTag", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_importable_tag_type_id, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_TAG, &spit_data_imports_importable_tag_info); - g_once_init_leave (&data_imports_fspot_fspot_importable_tag_type_id__volatile, data_imports_fspot_fspot_importable_tag_type_id); - } - return data_imports_fspot_fspot_importable_tag_type_id__volatile; -} - - -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_event_construct (GType object_type, DataImportsFSpotDbFSpotTagRow* row) { - DataImportsFSpotFSpotImportableEvent * self = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - DataImportsFSpotDbFSpotTagRow* _tmp1_; -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW (row), NULL); -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotImportableEvent*) g_object_new (object_type, NULL); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = row; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->row); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->row = _tmp1_; -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 2577 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableEvent* data_imports_fspot_fspot_importable_event_new (DataImportsFSpotDbFSpotTagRow* row) { -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_importable_event_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, row); -#line 2584 "FSpotImporter.c" -} - - -static gchar* data_imports_fspot_fspot_importable_event_real_get_name (SpitDataImportsImportableEvent* base) { - DataImportsFSpotFSpotImportableEvent * self; - gchar* result = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEvent); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->row; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _tmp0_->name; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp2_; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2606 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_event_class_init (DataImportsFSpotFSpotImportableEventClass * klass) { -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_event_parent_class = g_type_class_peek_parent (klass); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotImportableEventPrivate)); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_importable_event_finalize; -#line 2617 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_event_spit_data_imports_importable_event_interface_init (SpitDataImportsImportableEventIface * iface) { -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_event_spit_data_imports_importable_event_parent_iface = g_type_interface_peek_parent (iface); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_name = (gchar* (*) (SpitDataImportsImportableEvent *)) data_imports_fspot_fspot_importable_event_real_get_name; -#line 2626 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_event_instance_init (DataImportsFSpotFSpotImportableEvent * self) { -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_EVENT_GET_PRIVATE (self); -#line 2633 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_event_finalize (GObject * obj) { - DataImportsFSpotFSpotImportableEvent * self; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_EVENT, DataImportsFSpotFSpotImportableEvent); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->row); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_importable_event_parent_class)->finalize (obj); -#line 2645 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_importable_event_get_type (void) { - static volatile gsize data_imports_fspot_fspot_importable_event_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_importable_event_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotImportableEventClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_importable_event_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotImportableEvent), 0, (GInstanceInitFunc) data_imports_fspot_fspot_importable_event_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_importable_event_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_importable_event_spit_data_imports_importable_event_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_importable_event_type_id; - data_imports_fspot_fspot_importable_event_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotImportableEvent", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_importable_event_type_id, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_EVENT, &spit_data_imports_importable_event_info); - g_once_init_leave (&data_imports_fspot_fspot_importable_event_type_id__volatile, data_imports_fspot_fspot_importable_event_type_id); - } - return data_imports_fspot_fspot_importable_event_type_id__volatile; -} - - -DataImportsFSpotFSpotImportableRating* data_imports_fspot_fspot_importable_rating_construct (GType object_type, gint rating_value) { - DataImportsFSpotFSpotImportableRating * self = NULL; - gint _tmp0_; - gint _tmp2_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotImportableRating*) g_object_new (object_type, NULL); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = rating_value; -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp0_ < -1) { -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - rating_value = -1; -#line 2675 "FSpotImporter.c" - } else { - gint _tmp1_; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = rating_value; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp1_ > 5) { -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - rating_value = 5; -#line 2684 "FSpotImporter.c" - } - } -#line 267 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = rating_value; -#line 267 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->rating_value = _tmp2_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 2693 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableRating* data_imports_fspot_fspot_importable_rating_new (gint rating_value) { -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_importable_rating_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, rating_value); -#line 2700 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_importable_rating_real_is_rejected (SpitDataImportsImportableRating* base) { - DataImportsFSpotFSpotImportableRating * self; - gboolean result = FALSE; - gint _tmp0_; -#line 270 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRating); -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->rating_value; -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp0_ == DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_REJECTED; -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2716 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_importable_rating_real_is_unrated (SpitDataImportsImportableRating* base) { - DataImportsFSpotFSpotImportableRating * self; - gboolean result = FALSE; - gint _tmp0_; -#line 274 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRating); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->rating_value; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp0_ == DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_UNRATED; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2732 "FSpotImporter.c" -} - - -static gint data_imports_fspot_fspot_importable_rating_real_get_value (SpitDataImportsImportableRating* base) { - DataImportsFSpotFSpotImportableRating * self; - gint result = 0; - gint _tmp0_; -#line 278 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRating); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->rating_value; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp0_; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2748 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_rating_class_init (DataImportsFSpotFSpotImportableRatingClass * klass) { -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_rating_parent_class = g_type_class_peek_parent (klass); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotImportableRatingPrivate)); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_importable_rating_finalize; -#line 2759 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_rating_spit_data_imports_importable_rating_interface_init (SpitDataImportsImportableRatingIface * iface) { -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_importable_rating_spit_data_imports_importable_rating_parent_iface = g_type_interface_peek_parent (iface); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->is_rejected = (gboolean (*) (SpitDataImportsImportableRating *)) data_imports_fspot_fspot_importable_rating_real_is_rejected; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->is_unrated = (gboolean (*) (SpitDataImportsImportableRating *)) data_imports_fspot_fspot_importable_rating_real_is_unrated; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_value = (gint (*) (SpitDataImportsImportableRating *)) data_imports_fspot_fspot_importable_rating_real_get_value; -#line 2772 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_rating_instance_init (DataImportsFSpotFSpotImportableRating * self) { -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_IMPORTABLE_RATING_GET_PRIVATE (self); -#line 2779 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_importable_rating_finalize (GObject * obj) { - DataImportsFSpotFSpotImportableRating * self; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_RATING, DataImportsFSpotFSpotImportableRating); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_importable_rating_parent_class)->finalize (obj); -#line 2789 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_importable_rating_get_type (void) { - static volatile gsize data_imports_fspot_fspot_importable_rating_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_importable_rating_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotImportableRatingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_importable_rating_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotImportableRating), 0, (GInstanceInitFunc) data_imports_fspot_fspot_importable_rating_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_importable_rating_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_importable_rating_spit_data_imports_importable_rating_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_importable_rating_type_id; - data_imports_fspot_fspot_importable_rating_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotImportableRating", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_importable_rating_type_id, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_RATING, &spit_data_imports_importable_rating_info); - g_once_init_leave (&data_imports_fspot_fspot_importable_rating_type_id__volatile, data_imports_fspot_fspot_importable_rating_type_id); - } - return data_imports_fspot_fspot_importable_rating_type_id__volatile; -} - - -static gpointer _importable_database_table_ref0 (gpointer self) { -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self ? importable_database_table_ref (self) : NULL; -#line 2810 "FSpotImporter.c" -} - - -static gint64* _int64_dup (gint64* self) { - gint64* dup; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - dup = g_new0 (gint64, 1); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - memcpy (dup, self, sizeof (gint64)); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return dup; -#line 2822 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotTagsCache* data_imports_fspot_fspot_tags_cache_construct (GType object_type, DataImportsFSpotDbFSpotTagsTable* tags_table, GError** error) { - DataImportsFSpotFSpotTagsCache * self = NULL; - DataImportsFSpotDbFSpotTagsTable* _tmp0_; - DataImportsFSpotDbFSpotTagsTable* _tmp1_; - GeeHashMap* _tmp2_; -#line 287 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE (tags_table), NULL); -#line 287 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotTagsCache*) g_object_new (object_type, NULL); -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = tags_table; -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _importable_database_table_ref0 (_tmp0_); -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _importable_database_table_unref0 (self->priv->tags_table); -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags_table = _tmp1_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = gee_hash_map_new (G_TYPE_INT64, (GBoxedCopyFunc) _int64_dup, (GDestroyNotify) g_free, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_TAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->tags_map); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->tags_map = _tmp2_; -#line 287 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 2851 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotTagsCache* data_imports_fspot_fspot_tags_cache_new (DataImportsFSpotDbFSpotTagsTable* tags_table, GError** error) { -#line 287 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_tags_cache_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, tags_table, error); -#line 2858 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_tags_cache_get_tag (DataImportsFSpotFSpotTagsCache* self, DataImportsFSpotDbFSpotTagRow* tag_row, GError** error) { - DataImportsFSpotFSpotImportableTag* result = NULL; - DataImportsFSpotFSpotImportableTag* tag = NULL; - GeeHashMap* _tmp0_; - DataImportsFSpotDbFSpotTagRow* _tmp1_; - gint64 _tmp2_; - gpointer _tmp3_; - DataImportsFSpotFSpotImportableTag* _tmp4_; - GError * _inner_error_ = NULL; -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_TAGS_CACHE (self), NULL); -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW (tag_row), NULL); -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->tags_map; -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = tag_row; -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _tmp1_->tag_id; -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp2_); -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag = (DataImportsFSpotFSpotImportableTag*) _tmp3_; -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = tag; -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp4_ != NULL) { -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = tag; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2893 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag* parent_tag = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp5_; - gint64 _tmp6_; - DataImportsFSpotFSpotImportableTag* _tmp7_; - DataImportsFSpotFSpotImportableTag* new_tag = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp8_; - DataImportsFSpotFSpotImportableTag* _tmp9_; - DataImportsFSpotFSpotImportableTag* _tmp10_; - GeeHashMap* _tmp11_; - DataImportsFSpotDbFSpotTagRow* _tmp12_; - gint64 _tmp13_; - DataImportsFSpotFSpotImportableTag* _tmp14_; -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = tag_row; -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = _tmp5_->category_id; -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = data_imports_fspot_fspot_tags_cache_get_tag_from_id (self, _tmp6_, &_inner_error_); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - parent_tag = _tmp7_; -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_propagate_error (error, _inner_error_); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 2925 "FSpotImporter.c" - } else { -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 297 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 2935 "FSpotImporter.c" - } - } -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = tag_row; -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = parent_tag; -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = data_imports_fspot_fspot_importable_tag_new (_tmp8_, _tmp9_); -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - new_tag = _tmp10_; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = self->priv->tags_map; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = tag_row; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = _tmp12_->tag_id; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = new_tag; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp13_, _tmp14_); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = new_tag; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (parent_tag); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2964 "FSpotImporter.c" - } -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 2968 "FSpotImporter.c" -} - - -static DataImportsFSpotFSpotImportableTag* data_imports_fspot_fspot_tags_cache_get_tag_from_id (DataImportsFSpotFSpotTagsCache* self, gint64 tag_id, GError** error) { - DataImportsFSpotFSpotImportableTag* result = NULL; - gint64 _tmp0_; - DataImportsFSpotFSpotImportableTag* tag = NULL; - GeeHashMap* _tmp1_; - gint64 _tmp2_; - gpointer _tmp3_; - DataImportsFSpotFSpotImportableTag* _tmp4_; - DataImportsFSpotDbFSpotTagRow* tag_row = NULL; - DataImportsFSpotDbFSpotTagsTable* _tmp5_; - gint64 _tmp6_; - DataImportsFSpotDbFSpotTagRow* _tmp7_; - DataImportsFSpotDbFSpotTagRow* _tmp8_; - GError * _inner_error_ = NULL; -#line 304 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_TAGS_CACHE (self), NULL); -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = tag_id; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp0_ < ((gint64) 1)) { -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = NULL; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 2996 "FSpotImporter.c" - } -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = self->priv->tags_map; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = tag_id; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp2_); -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag = (DataImportsFSpotFSpotImportableTag*) _tmp3_; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = tag; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp4_ != NULL) { -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = tag; -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 3014 "FSpotImporter.c" - } -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = self->priv->tags_table; -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = tag_id; -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = data_imports_fspot_db_fspot_tags_table_get_by_id (_tmp5_, _tmp6_, &_inner_error_); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag_row = _tmp7_; -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_propagate_error (error, _inner_error_); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 3034 "FSpotImporter.c" - } else { -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 311 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 3044 "FSpotImporter.c" - } - } -#line 312 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = tag_row; -#line 312 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp8_ != NULL) { -#line 3051 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* parent_tag = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp9_; - gint64 _tmp10_; - DataImportsFSpotFSpotImportableTag* _tmp11_; - DataImportsFSpotFSpotImportableTag* new_tag = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp12_; - DataImportsFSpotFSpotImportableTag* _tmp13_; - DataImportsFSpotFSpotImportableTag* _tmp14_; - GeeHashMap* _tmp15_; - gint64 _tmp16_; - DataImportsFSpotFSpotImportableTag* _tmp17_; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = tag_row; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = _tmp9_->category_id; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = data_imports_fspot_fspot_tags_cache_get_tag_from_id (self, _tmp10_, &_inner_error_); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - parent_tag = _tmp11_; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_propagate_error (error, _inner_error_); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 3083 "FSpotImporter.c" - } else { -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return NULL; -#line 3095 "FSpotImporter.c" - } - } -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = tag_row; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = parent_tag; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = data_imports_fspot_fspot_importable_tag_new (_tmp12_, _tmp13_); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - new_tag = _tmp14_; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp15_ = self->priv->tags_map; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp16_ = tag_id; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp17_ = new_tag; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp16_, _tmp17_); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = new_tag; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (parent_tag); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 3124 "FSpotImporter.c" - } -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = NULL; -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 3134 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_tags_cache_class_init (DataImportsFSpotFSpotTagsCacheClass * klass) { -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_tags_cache_parent_class = g_type_class_peek_parent (klass); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotTagsCachePrivate)); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_tags_cache_finalize; -#line 3145 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_tags_cache_instance_init (DataImportsFSpotFSpotTagsCache * self) { -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_TAGS_CACHE_GET_PRIVATE (self); -#line 3152 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_tags_cache_finalize (GObject * obj) { - DataImportsFSpotFSpotTagsCache * self; -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_TAGS_CACHE, DataImportsFSpotFSpotTagsCache); -#line 284 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _importable_database_table_unref0 (self->priv->tags_table); -#line 285 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (self->priv->tags_map); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_tags_cache_parent_class)->finalize (obj); -#line 3166 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_tags_cache_get_type (void) { - static volatile gsize data_imports_fspot_fspot_tags_cache_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_tags_cache_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotTagsCacheClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_tags_cache_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotTagsCache), 0, (GInstanceInitFunc) data_imports_fspot_fspot_tags_cache_instance_init, NULL }; - GType data_imports_fspot_fspot_tags_cache_type_id; - data_imports_fspot_fspot_tags_cache_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotTagsCache", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_fspot_tags_cache_type_id__volatile, data_imports_fspot_fspot_tags_cache_type_id); - } - return data_imports_fspot_fspot_tags_cache_type_id__volatile; -} - - -DataImportsFSpotFSpotDataImporter* data_imports_fspot_fspot_data_importer_construct (GType object_type, SpitDataImportsService* service, SpitDataImportsPluginHost* host) { - DataImportsFSpotFSpotDataImporter * self = NULL; - SpitDataImportsService* _tmp0_; - SpitDataImportsPluginHost* _tmp1_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_SERVICE (service), NULL); -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_PLUGIN_HOST (host), NULL); -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = (DataImportsFSpotFSpotDataImporter*) g_object_new (object_type, NULL); -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:330: FSpotDataImporter instantiated."); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = service; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->service = _tmp0_; -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = host; -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->host = _tmp1_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return self; -#line 3204 "FSpotImporter.c" -} - - -DataImportsFSpotFSpotDataImporter* data_imports_fspot_fspot_data_importer_new (SpitDataImportsService* service, SpitDataImportsPluginHost* host) { -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return data_imports_fspot_fspot_data_importer_construct (DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, service, host); -#line 3211 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_data_importer_real_is_running (SpitDataImportsDataImporter* base) { - DataImportsFSpotFSpotDataImporter * self; - gboolean result = FALSE; - gboolean _tmp0_; -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->running; -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp0_; -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 3227 "FSpotImporter.c" -} - - -static SpitDataImportsService* data_imports_fspot_fspot_data_importer_real_get_service (SpitDataImportsDataImporter* base) { - DataImportsFSpotFSpotDataImporter * self; - SpitDataImportsService* result = NULL; - SpitDataImportsService* _tmp0_; - SpitDataImportsService* _tmp1_; -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->service; -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _tmp1_; -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 3246 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_real_start (SpitDataImportsDataImporter* base) { - DataImportsFSpotFSpotDataImporter * self; - gboolean _tmp0_; -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = spit_data_imports_data_importer_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORTER, SpitDataImportsDataImporter)); -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp0_) { -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3261 "FSpotImporter.c" - } -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:347: FSpotDataImporter: starting interaction."); -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->running = TRUE; -#line 351 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_data_importer_do_discover_importable_libraries (self); -#line 3269 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_real_stop (SpitDataImportsDataImporter* base) { - DataImportsFSpotFSpotDataImporter * self; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 355 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:355: FSpotDataImporter: stopping interaction."); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->running = FALSE; -#line 3281 "FSpotImporter.c" -} - - -/** - * Action that discovers importable libraries based on standard locations. - */ -static void _vala_array_add2 (SpitDataImportsImportableLibrary** * array, int* length, int* size, SpitDataImportsImportableLibrary* value) { -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (SpitDataImportsImportableLibrary*, *array, (*size) + 1); -#line 3295 "FSpotImporter.c" - } -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 3301 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_do_discover_importable_libraries (DataImportsFSpotFSpotDataImporter* self) { - SpitDataImportsImportableLibrary** discovered_libraries = NULL; - SpitDataImportsImportableLibrary** _tmp0_; - gint discovered_libraries_length1; - gint _discovered_libraries_size_; - GFile** db_files = NULL; - const gchar* _tmp1_; - GFile* _tmp2_; - GFile* _tmp3_; - GFile* _tmp4_; - GFile* _tmp5_; - GFile* _tmp6_; - const gchar* _tmp7_; - GFile* _tmp8_; - GFile* _tmp9_; - GFile* _tmp10_; - GFile* _tmp11_; - GFile* _tmp12_; - GFile* _tmp13_; - GFile* _tmp14_; - const gchar* _tmp15_; - GFile* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - GFile* _tmp19_; - GFile* _tmp20_; - GFile** _tmp21_; - GFile** _tmp22_; - gint _tmp22__length1; - gint db_files_length1; - gint _db_files_size_; - GFile** _tmp23_; - gint _tmp23__length1; - const gchar* _tmp33_ = NULL; - SpitDataImportsImportableLibrary** _tmp34_; - gint _tmp34__length1; - SpitDataImportsPluginHost* _tmp35_; - SpitDataImportsImportableLibrary** _tmp36_; - gint _tmp36__length1; -#line 365 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER (self)); -#line 366 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = g_new0 (SpitDataImportsImportableLibrary*, 0 + 1); -#line 366 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - discovered_libraries = _tmp0_; -#line 366 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - discovered_libraries_length1 = 0; -#line 366 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _discovered_libraries_size_ = discovered_libraries_length1; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = g_get_user_config_dir (); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_file_new_for_path (_tmp1_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _tmp2_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = g_file_get_child (_tmp3_, "f-spot"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _tmp4_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = g_file_get_child (_tmp5_, "photos.db"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = g_get_home_dir (); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = g_file_new_for_path (_tmp7_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = _tmp8_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = g_file_get_child (_tmp9_, ".gnome2"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = _tmp10_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = g_file_get_child (_tmp11_, "f-spot"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = _tmp12_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = g_file_get_child (_tmp13_, "photos.db"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp15_ = g_get_user_data_dir (); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp16_ = g_file_new_for_path (_tmp15_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp17_ = _tmp16_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp18_ = g_file_get_child (_tmp17_, "f-spot"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp19_ = _tmp18_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp20_ = g_file_get_child (_tmp19_, "photos.db"); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_ = g_new0 (GFile*, 3 + 1); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_[0] = _tmp6_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_[1] = _tmp14_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_[2] = _tmp20_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp22_ = _tmp21_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp22__length1 = 3; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp19_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp17_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp13_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp11_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp9_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp5_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp3_); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_files = _tmp22_; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_files_length1 = _tmp22__length1; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _db_files_size_ = db_files_length1; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23_ = db_files; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23__length1 = db_files_length1; -#line 3430 "FSpotImporter.c" - { - GFile** db_file_collection = NULL; - gint db_file_collection_length1 = 0; - gint _db_file_collection_size_ = 0; - gint db_file_it = 0; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_file_collection = _tmp23_; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_file_collection_length1 = _tmp23__length1; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - for (db_file_it = 0; db_file_it < _tmp23__length1; db_file_it = db_file_it + 1) { -#line 3442 "FSpotImporter.c" - GFile* _tmp24_; - GFile* db_file = NULL; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp24_ = _g_object_ref0 (db_file_collection[db_file_it]); -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_file = _tmp24_; -#line 3449 "FSpotImporter.c" - { - GFile* _tmp25_; - gboolean _tmp26_; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp25_ = db_file; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp26_ = g_file_query_exists (_tmp25_, NULL); -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp26_) { -#line 3459 "FSpotImporter.c" - SpitDataImportsImportableLibrary** _tmp27_; - gint _tmp27__length1; - GFile* _tmp28_; - DataImportsFSpotFSpotImportableLibrary* _tmp29_; - GFile* _tmp30_; - gchar* _tmp31_; - gchar* _tmp32_; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp27_ = discovered_libraries; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp27__length1 = discovered_libraries_length1; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp28_ = db_file; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp29_ = data_imports_fspot_fspot_importable_library_new (_tmp28_); -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add2 (&discovered_libraries, &discovered_libraries_length1, &_discovered_libraries_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_LIBRARY, SpitDataImportsImportableLibrary)); -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp30_ = db_file; -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp31_ = g_file_get_path (_tmp30_); -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp32_ = _tmp31_; -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_message ("FSpotImporter.vala:384: Discovered importable library: %s", _tmp32_); -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp32_); -#line 3487 "FSpotImporter.c" - } -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (db_file); -#line 3491 "FSpotImporter.c" - } - } - } -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp34_ = discovered_libraries; -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp34__length1 = discovered_libraries_length1; -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp34__length1 > 0) { -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp33_ = DATA_IMPORTS_FSPOT_SERVICE_WELCOME_MESSAGE; -#line 3503 "FSpotImporter.c" - } else { -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp33_ = DATA_IMPORTS_FSPOT_SERVICE_WELCOME_MESSAGE_FILE_ONLY; -#line 3507 "FSpotImporter.c" - } -#line 388 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp35_ = self->priv->host; -#line 388 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp36_ = discovered_libraries; -#line 388 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp36__length1 = discovered_libraries_length1; -#line 388 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_install_library_selection_pane (_tmp35_, _tmp33_, _tmp36_, _tmp36__length1, DATA_IMPORTS_FSPOT_FILE_IMPORT_LABEL); -#line 365 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - db_files = (_vala_array_free (db_files, db_files_length1, (GDestroyNotify) g_object_unref), NULL); -#line 365 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - discovered_libraries = (_vala_array_free (discovered_libraries, discovered_libraries_length1, (GDestroyNotify) g_object_unref), NULL); -#line 3521 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_real_on_library_selected (SpitDataImportsDataImporter* base, SpitDataImportsImportableLibrary* library) { - DataImportsFSpotFSpotDataImporter * self; - SpitDataImportsImportableLibrary* _tmp0_; - GFile* _tmp1_; - GFile* _tmp2_; -#line 395 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 395 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_if_fail (SPIT_DATA_IMPORTS_IS_IMPORTABLE_LIBRARY (library)); -#line 396 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = library; -#line 396 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = data_imports_fspot_fspot_importable_library_get_db_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, DATA_IMPORTS_FSPOT_TYPE_FSPOT_IMPORTABLE_LIBRARY, DataImportsFSpotFSpotImportableLibrary)); -#line 396 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _tmp1_; -#line 396 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_data_importer_on_file_selected (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORTER, SpitDataImportsDataImporter), _tmp2_); -#line 396 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp2_); -#line 3544 "FSpotImporter.c" -} - - -static void _vala_array_add3 (DataImportsFSpotFSpotImportableTag** * array, int* length, int* size, DataImportsFSpotFSpotImportableTag* value) { -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (DataImportsFSpotFSpotImportableTag*, *array, (*size) + 1); -#line 3555 "FSpotImporter.c" - } -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 3561 "FSpotImporter.c" -} - - -static void _vala_array_add4 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value) { -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (SpitDataImportsImportableMediaItem*, *array, (*size) + 1); -#line 3572 "FSpotImporter.c" - } -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 3578 "FSpotImporter.c" -} - - -static void _vala_array_add5 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value) { -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (SpitDataImportsImportableMediaItem*, *array, (*size) + 1); -#line 3589 "FSpotImporter.c" - } -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 3595 "FSpotImporter.c" -} - - -static void _vala_array_add6 (SpitDataImportsImportableMediaItem** * array, int* length, int* size, SpitDataImportsImportableMediaItem* value) { -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if ((*length) == (*size)) { -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - *array = g_renew (SpitDataImportsImportableMediaItem*, *array, (*size) + 1); -#line 3606 "FSpotImporter.c" - } -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[(*length)++] = value; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - (*array)[*length] = NULL; -#line 3612 "FSpotImporter.c" -} - - -static void _data_imports_fspot_fspot_data_importer_on_imported_items_count_spit_data_imports_imported_items_count_callback (gint imported_items_count, gpointer self) { -#line 527 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_data_importer_on_imported_items_count ((DataImportsFSpotFSpotDataImporter*) self, imported_items_count); -#line 3619 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_real_on_file_selected (SpitDataImportsDataImporter* base, GFile* file) { - DataImportsFSpotFSpotDataImporter * self; - DataImportsFSpotDbFSpotDatabase* database = NULL; - DataImportsFSpotFSpotTagsCache* tags_cache = NULL; - GeeArrayList* all_photos = NULL; - gdouble progress_delta_per_photo = 0.0; - gdouble progress_plugin_to_host_ratio = 0.0; - gdouble current_progress = 0.0; - SpitDataImportsPluginHost* _tmp24_; - GeeArrayList* _tmp35_; - gint _tmp36_; - gint _tmp37_; - SpitDataImportsPluginHost* _tmp172_; - GError * _inner_error_ = NULL; -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_if_fail (G_IS_FILE (file)); -#line 403 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - progress_delta_per_photo = 1.0; -#line 404 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - progress_plugin_to_host_ratio = 0.5; -#line 405 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - current_progress = 0.0; -#line 3647 "FSpotImporter.c" - { - DataImportsFSpotDbFSpotDatabase* _tmp0_ = NULL; - GFile* _tmp1_; - DataImportsFSpotDbFSpotDatabase* _tmp2_; - DataImportsFSpotDbFSpotDatabase* _tmp3_; -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = file; -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_new (_tmp1_, &_inner_error_); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = _tmp2_; -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 3663 "FSpotImporter.c" - goto __catch0_database_error; - } -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR) { -#line 3668 "FSpotImporter.c" - goto __catch0_spit_data_imports_data_import_error; - } -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3683 "FSpotImporter.c" - } -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _tmp0_; -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = NULL; -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 407 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - database = _tmp3_; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp0_); -#line 3695 "FSpotImporter.c" - } - goto __finally0; - __catch0_database_error: - { - GError* e = NULL; - GError* _tmp4_; - const gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - SpitDataImportsPluginHost* _tmp8_; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = e; -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = _tmp4_->message; -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = g_strdup_printf ("FSpotDataImporter: Can't open database file: %s", _tmp5_); -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = _tmp6_; -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:409: %s", _tmp7_); -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp7_); -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = self->priv->host; -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_post_error_message (_tmp8_, DATA_IMPORTS_FSPOT_ERROR_CANT_OPEN_DB_FILE); -#line 411 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 411 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 411 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 411 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 411 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3736 "FSpotImporter.c" - } - goto __finally0; - __catch0_spit_data_imports_data_import_error: - { - GError* e = NULL; - GError* _tmp9_; - const gchar* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - SpitDataImportsPluginHost* _tmp13_; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = e; -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp10_ = _tmp9_->message; -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp11_ = g_strdup_printf ("FSpotDataImporter: Unsupported F-Spot database version: %s", _tmp10_); -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp12_ = _tmp11_; -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:413: %s", _tmp12_); -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp12_); -#line 414 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp13_ = self->priv->host; -#line 414 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_post_error_message (_tmp13_, DATA_IMPORTS_FSPOT_ERROR_UNSUPPORTED_DB_VERSION); -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3777 "FSpotImporter.c" - } - __finally0: -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3794 "FSpotImporter.c" - } - { - DataImportsFSpotFSpotTagsCache* _tmp14_ = NULL; - DataImportsFSpotDbFSpotDatabase* _tmp15_; - DataImportsFSpotDbFSpotTagsTable* _tmp16_; - DataImportsFSpotFSpotTagsCache* _tmp17_; - DataImportsFSpotFSpotTagsCache* _tmp18_; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp15_ = database; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp16_ = _tmp15_->tags_table; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp17_ = data_imports_fspot_fspot_tags_cache_new (_tmp16_, &_inner_error_); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = _tmp17_; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 3814 "FSpotImporter.c" - goto __catch1_database_error; - } -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3829 "FSpotImporter.c" - } -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp18_ = _tmp14_; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp14_ = NULL; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags_cache = _tmp18_; -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp14_); -#line 3841 "FSpotImporter.c" - } - goto __finally1; - __catch1_database_error: - { - GError* e = NULL; - GError* _tmp19_; - const gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - SpitDataImportsPluginHost* _tmp23_; -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp19_ = e; -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp20_ = _tmp19_->message; -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp21_ = g_strdup_printf ("FSpotDataImporter: Can't read tags table: %s", _tmp20_); -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp22_ = _tmp21_; -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:420: %s", _tmp22_); -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp22_); -#line 421 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp23_ = self->priv->host; -#line 421 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_post_error_message (_tmp23_, DATA_IMPORTS_FSPOT_ERROR_CANT_READ_TAGS_TABLE); -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3882 "FSpotImporter.c" - } - __finally1: -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3899 "FSpotImporter.c" - } -#line 424 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp24_ = self->priv->host; -#line 424 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_install_import_progress_pane (_tmp24_, _ ("Preparing to import")); -#line 3905 "FSpotImporter.c" - { - GeeArrayList* _tmp25_ = NULL; - DataImportsFSpotDbFSpotDatabase* _tmp26_; - DataImportsFSpotDbFSpotPhotosTable* _tmp27_; - GeeArrayList* _tmp28_; - GeeArrayList* _tmp29_; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp26_ = database; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp27_ = _tmp26_->photos_table; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp28_ = data_imports_fspot_db_fspot_photos_table_get_all (_tmp27_, &_inner_error_); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp25_ = _tmp28_; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 3924 "FSpotImporter.c" - goto __catch2_database_error; - } -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3939 "FSpotImporter.c" - } -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp29_ = _tmp25_; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp25_ = NULL; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - all_photos = _tmp29_; -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp25_); -#line 3951 "FSpotImporter.c" - } - goto __finally2; - __catch2_database_error: - { - GError* e = NULL; - GError* _tmp30_; - const gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - SpitDataImportsPluginHost* _tmp34_; -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp30_ = e; -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp31_ = _tmp30_->message; -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp32_ = g_strdup_printf ("FSpotDataImporter: Can't read photos table: %s", _tmp31_); -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp33_ = _tmp32_; -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_debug ("FSpotImporter.vala:428: %s", _tmp33_); -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp33_); -#line 429 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp34_ = self->priv->host; -#line 429 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_post_error_message (_tmp34_, DATA_IMPORTS_FSPOT_ERROR_CANT_READ_PHOTOS_TABLE); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 3992 "FSpotImporter.c" - } - __finally2: -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4009 "FSpotImporter.c" - } -#line 432 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp35_ = all_photos; -#line 432 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp36_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 432 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp37_ = _tmp36_; -#line 432 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp37_ > 0) { -#line 4019 "FSpotImporter.c" - GeeArrayList* _tmp38_; - gint _tmp39_; - gint _tmp40_; -#line 433 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp38_ = all_photos; -#line 433 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp39_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 433 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp40_ = _tmp39_; -#line 433 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - progress_delta_per_photo = 1.0 / _tmp40_; -#line 4031 "FSpotImporter.c" - } - { - GeeArrayList* _photo_row_list = NULL; - GeeArrayList* _tmp41_; - GeeArrayList* _tmp42_; - gint _photo_row_size = 0; - GeeArrayList* _tmp43_; - gint _tmp44_; - gint _tmp45_; - gint _photo_row_index = 0; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp41_ = all_photos; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp42_ = _g_object_ref0 (_tmp41_); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_row_list = _tmp42_; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp43_ = _photo_row_list; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp44_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp45_ = _tmp44_; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_row_size = _tmp45_; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_row_index = -1; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - while (TRUE) { -#line 4060 "FSpotImporter.c" - gint _tmp46_; - gint _tmp47_; - gint _tmp48_; - DataImportsFSpotDbFSpotPhotoRow* photo_row = NULL; - GeeArrayList* _tmp49_; - gint _tmp50_; - gpointer _tmp51_; - gboolean hidden = FALSE; - gboolean favorite = FALSE; - DataImportsFSpotFSpotImportableTag** tags = NULL; - DataImportsFSpotFSpotImportableTag** _tmp52_; - gint tags_length1; - gint _tags_size_; - DataImportsFSpotFSpotImportableEvent* event = NULL; - DataImportsFSpotDbFSpotRollRow* roll_row = NULL; - SpitDataImportsImportableMediaItem** importable_items = NULL; - SpitDataImportsImportableMediaItem** _tmp96_; - gint importable_items_length1; - gint _importable_items_size_; - gboolean _tmp160_; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp46_ = _photo_row_index; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_row_index = _tmp46_ + 1; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp47_ = _photo_row_index; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp48_ = _photo_row_size; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!(_tmp47_ < _tmp48_)) { -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - break; -#line 4093 "FSpotImporter.c" - } -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp49_ = _photo_row_list; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp50_ = _photo_row_index; -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp51_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp50_); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_row = (DataImportsFSpotDbFSpotPhotoRow*) _tmp51_; -#line 435 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - hidden = FALSE; -#line 436 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - favorite = FALSE; -#line 437 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp52_ = g_new0 (DataImportsFSpotFSpotImportableTag*, 0 + 1); -#line 437 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = _tmp52_; -#line 437 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags_length1 = 0; -#line 437 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tags_size_ = tags_length1; -#line 438 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - event = NULL; -#line 439 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - roll_row = NULL; -#line 4119 "FSpotImporter.c" - { - GeeArrayList* _tmp53_ = NULL; - DataImportsFSpotDbFSpotDatabase* _tmp54_; - DataImportsFSpotDbFSpotTagsTable* _tmp55_; - DataImportsFSpotDbFSpotPhotoRow* _tmp56_; - gint64 _tmp57_; - GeeArrayList* _tmp58_; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp54_ = database; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp55_ = _tmp54_->tags_table; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp56_ = photo_row; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp57_ = _tmp56_->photo_id; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp58_ = data_imports_fspot_db_fspot_tags_table_get_by_photo_id (_tmp55_, _tmp57_, &_inner_error_); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp53_ = _tmp58_; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 4143 "FSpotImporter.c" - goto __catch3_database_error; - } -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4168 "FSpotImporter.c" - } - { - GeeArrayList* _tag_row_list = NULL; - GeeArrayList* _tmp59_; - gint _tag_row_size = 0; - GeeArrayList* _tmp60_; - gint _tmp61_; - gint _tmp62_; - gint _tag_row_index = 0; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp59_ = _g_object_ref0 (_tmp53_); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tag_row_list = _tmp59_; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp60_ = _tag_row_list; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp61_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp62_ = _tmp61_; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tag_row_size = _tmp62_; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tag_row_index = -1; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - while (TRUE) { -#line 4194 "FSpotImporter.c" - gint _tmp63_; - gint _tmp64_; - gint _tmp65_; - DataImportsFSpotDbFSpotTagRow* tag_row = NULL; - GeeArrayList* _tmp66_; - gint _tmp67_; - gpointer _tmp68_; - DataImportsFSpotFSpotImportableTag* tag = NULL; - DataImportsFSpotFSpotTagsCache* _tmp69_; - DataImportsFSpotDbFSpotTagRow* _tmp70_; - DataImportsFSpotFSpotImportableTag* _tmp71_; - DataImportsFSpotFSpotImportableTag* _tmp72_; - DataImportsFSpotDbFSpotDatabase* _tmp73_; - gint64 _tmp74_; - gboolean _tmp75_; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp63_ = _tag_row_index; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tag_row_index = _tmp63_ + 1; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp64_ = _tag_row_index; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp65_ = _tag_row_size; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!(_tmp64_ < _tmp65_)) { -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - break; -#line 4222 "FSpotImporter.c" - } -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp66_ = _tag_row_list; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp67_ = _tag_row_index; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp68_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp67_); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag_row = (DataImportsFSpotDbFSpotTagRow*) _tmp68_; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp69_ = tags_cache; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp70_ = tag_row; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp71_ = data_imports_fspot_fspot_tags_cache_get_tag (_tmp69_, _tmp70_, &_inner_error_); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tag = _tmp71_; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tag_row_list); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp53_); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 4250 "FSpotImporter.c" - goto __catch3_database_error; - } -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tag_row_list); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp53_); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4281 "FSpotImporter.c" - } -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp72_ = tag; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp73_ = database; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp74_ = _tmp73_->hidden_tag_id; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp75_ = data_imports_fspot_fspot_data_importer_is_tag_hidden (self, _tmp72_, _tmp74_); -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp75_) { -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - hidden = TRUE; -#line 4295 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag* _tmp76_; - gboolean _tmp77_; -#line 454 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp76_ = tag; -#line 454 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp77_ = data_imports_fspot_fspot_data_importer_is_tag_favorite (self, _tmp76_); -#line 454 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp77_) { -#line 455 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - favorite = TRUE; -#line 4307 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag** _tmp78_; - gint _tmp78__length1; - DataImportsFSpotFSpotImportableTag* _tmp79_; - DataImportsFSpotFSpotImportableTag* _tmp80_; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp78_ = tags; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp78__length1 = tags_length1; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp79_ = tag; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp80_ = _g_object_ref0 (_tmp79_); -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add3 (&tags, &tags_length1, &_tags_size_, _tmp80_); -#line 4323 "FSpotImporter.c" - } - } -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tag_row); -#line 4330 "FSpotImporter.c" - } -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tag_row_list); -#line 4334 "FSpotImporter.c" - } -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp53_); -#line 4338 "FSpotImporter.c" - } - goto __finally3; - __catch3_database_error: - { - GError* e = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp81_; - gint64 _tmp82_; - GError* _tmp83_; - const gchar* _tmp84_; -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp81_ = photo_row; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp82_ = _tmp81_->photo_id; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp83_ = e; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp84_ = _tmp83_->message; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_message ("FSpotImporter.vala:461: Failed to retrieve tags for photo ID %ld: %s", (glong) _tmp82_, _tmp84_); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 4364 "FSpotImporter.c" - } - __finally3: -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 446 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4391 "FSpotImporter.c" - } - { - DataImportsFSpotDbFSpotRollRow* _tmp85_ = NULL; - DataImportsFSpotDbFSpotDatabase* _tmp86_; - DataImportsFSpotDbFSpotRollsTable* _tmp87_; - DataImportsFSpotDbFSpotPhotoRow* _tmp88_; - gint64 _tmp89_; - DataImportsFSpotDbFSpotRollRow* _tmp90_; - DataImportsFSpotDbFSpotRollRow* _tmp91_; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp86_ = database; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp87_ = _tmp86_->rolls_table; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp88_ = photo_row; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp89_ = _tmp88_->roll_id; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp90_ = data_imports_fspot_db_fspot_rolls_table_get_by_id (_tmp87_, _tmp89_, &_inner_error_); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp85_ = _tmp90_; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 4417 "FSpotImporter.c" - goto __catch4_database_error; - } -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4442 "FSpotImporter.c" - } -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp91_ = _tmp85_; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp85_ = NULL; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - roll_row = _tmp91_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_tmp85_); -#line 4454 "FSpotImporter.c" - } - goto __finally4; - __catch4_database_error: - { - GError* e = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp92_; - gint64 _tmp93_; - GError* _tmp94_; - const gchar* _tmp95_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp92_ = photo_row; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp93_ = _tmp92_->photo_id; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp94_ = e; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp95_ = _tmp94_->message; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_message ("FSpotImporter.vala:469: Failed to retrieve roll for photo ID %ld: %s", (glong) _tmp93_, _tmp95_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 4480 "FSpotImporter.c" - } - __finally4: -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4507 "FSpotImporter.c" - } -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp96_ = g_new0 (SpitDataImportsImportableMediaItem*, 0 + 1); -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items = _tmp96_; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items_length1 = 0; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _importable_items_size_ = importable_items_length1; -#line 4517 "FSpotImporter.c" - { - GeeArrayList* photo_versions = NULL; - DataImportsFSpotDbFSpotDatabase* _tmp97_; - DataImportsFSpotDbFSpotPhotoVersionsTable* _tmp98_; - DataImportsFSpotDbFSpotPhotoRow* _tmp99_; - gint64 _tmp100_; - GeeArrayList* _tmp101_; - gboolean photo_versions_added = FALSE; - gboolean photo_versions_skipped = FALSE; - gboolean _tmp127_ = FALSE; - gboolean _tmp128_; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp97_ = database; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp98_ = _tmp97_->photo_versions_table; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp99_ = photo_row; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp100_ = _tmp99_->photo_id; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp101_ = data_imports_fspot_db_fspot_photo_versions_table_get_by_photo_id (_tmp98_, _tmp100_, &_inner_error_); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_versions = _tmp101_; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 4545 "FSpotImporter.c" - goto __catch5_database_error; - } -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items = (_vala_array_free (importable_items, importable_items_length1, (GDestroyNotify) g_object_unref), NULL); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4572 "FSpotImporter.c" - } -#line 477 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_versions_added = FALSE; -#line 478 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_versions_skipped = FALSE; -#line 4578 "FSpotImporter.c" - { - GeeArrayList* _photo_version_row_list = NULL; - GeeArrayList* _tmp102_; - GeeArrayList* _tmp103_; - gint _photo_version_row_size = 0; - GeeArrayList* _tmp104_; - gint _tmp105_; - gint _tmp106_; - gint _photo_version_row_index = 0; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp102_ = photo_versions; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp103_ = _g_object_ref0 (_tmp102_); -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_version_row_list = _tmp103_; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp104_ = _photo_version_row_list; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp105_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp106_ = _tmp105_; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_version_row_size = _tmp106_; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_version_row_index = -1; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - while (TRUE) { -#line 4606 "FSpotImporter.c" - gint _tmp107_; - gint _tmp108_; - gint _tmp109_; - DataImportsFSpotDbFSpotPhotoVersionRow* photo_version_row = NULL; - GeeArrayList* _tmp110_; - gint _tmp111_; - gpointer _tmp112_; - gboolean _tmp113_ = FALSE; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp114_; - GFile* _tmp115_; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp107_ = _photo_version_row_index; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _photo_version_row_index = _tmp107_ + 1; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp108_ = _photo_version_row_index; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp109_ = _photo_version_row_size; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!(_tmp108_ < _tmp109_)) { -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - break; -#line 4629 "FSpotImporter.c" - } -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp110_ = _photo_version_row_list; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp111_ = _photo_version_row_index; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp112_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp111_); -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_version_row = (DataImportsFSpotDbFSpotPhotoVersionRow*) _tmp112_; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp114_ = photo_version_row; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp115_ = _tmp114_->base_path; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp115_ != NULL) { -#line 4645 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp116_; - const gchar* _tmp117_; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp116_ = photo_version_row; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp117_ = _tmp116_->filename; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp113_ = _tmp117_ != NULL; -#line 4654 "FSpotImporter.c" - } else { -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp113_ = FALSE; -#line 4658 "FSpotImporter.c" - } -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp113_) { -#line 4662 "FSpotImporter.c" - SpitDataImportsImportableMediaItem** _tmp118_; - gint _tmp118__length1; - DataImportsFSpotDbFSpotPhotoRow* _tmp119_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp120_; - DataImportsFSpotDbFSpotRollRow* _tmp121_; - DataImportsFSpotFSpotImportableTag** _tmp122_; - gint _tmp122__length1; - DataImportsFSpotFSpotImportableEvent* _tmp123_; - gboolean _tmp124_; - gboolean _tmp125_; - DataImportsFSpotFSpotImportableItem* _tmp126_; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp118_ = importable_items; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp118__length1 = importable_items_length1; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp119_ = photo_row; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp120_ = photo_version_row; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp121_ = roll_row; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp122_ = tags; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp122__length1 = tags_length1; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp123_ = event; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp124_ = hidden; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp125_ = favorite; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp126_ = data_imports_fspot_fspot_importable_item_new (_tmp119_, _tmp120_, _tmp121_, _tmp122_, _tmp122__length1, _tmp123_, _tmp124_, _tmp125_); -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add4 (&importable_items, &importable_items_length1, &_importable_items_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp126_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_MEDIA_ITEM, SpitDataImportsImportableMediaItem)); -#line 484 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_versions_added = TRUE; -#line 4700 "FSpotImporter.c" - } else { -#line 486 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - photo_versions_skipped = TRUE; -#line 4704 "FSpotImporter.c" - } -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_version_row); -#line 4708 "FSpotImporter.c" - } -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_version_row_list); -#line 4712 "FSpotImporter.c" - } -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp128_ = photo_versions_skipped; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp128_) { -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp127_ = TRUE; -#line 4720 "FSpotImporter.c" - } else { - gboolean _tmp129_; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp129_ = photo_versions_added; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp127_ = !_tmp129_; -#line 4727 "FSpotImporter.c" - } -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp127_) { -#line 4731 "FSpotImporter.c" - gboolean _tmp130_ = FALSE; - DataImportsFSpotDbFSpotPhotoRow* _tmp131_; - GFile* _tmp132_; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp131_ = photo_row; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp132_ = _tmp131_->base_path; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp132_ != NULL) { -#line 4741 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp133_; - const gchar* _tmp134_; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp133_ = photo_row; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp134_ = _tmp133_->filename; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp130_ = _tmp134_ != NULL; -#line 4750 "FSpotImporter.c" - } else { -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp130_ = FALSE; -#line 4754 "FSpotImporter.c" - } -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp130_) { -#line 4758 "FSpotImporter.c" - SpitDataImportsImportableMediaItem** _tmp135_; - gint _tmp135__length1; - DataImportsFSpotDbFSpotPhotoRow* _tmp136_; - DataImportsFSpotDbFSpotRollRow* _tmp137_; - DataImportsFSpotFSpotImportableTag** _tmp138_; - gint _tmp138__length1; - DataImportsFSpotFSpotImportableEvent* _tmp139_; - gboolean _tmp140_; - gboolean _tmp141_; - DataImportsFSpotFSpotImportableItem* _tmp142_; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp135_ = importable_items; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp135__length1 = importable_items_length1; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp136_ = photo_row; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp137_ = roll_row; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp138_ = tags; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp138__length1 = tags_length1; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp139_ = event; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp140_ = hidden; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp141_ = favorite; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp142_ = data_imports_fspot_fspot_importable_item_new (_tmp136_, NULL, _tmp137_, _tmp138_, _tmp138__length1, _tmp139_, _tmp140_, _tmp141_); -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add5 (&importable_items, &importable_items_length1, &_importable_items_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp142_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_MEDIA_ITEM, SpitDataImportsImportableMediaItem)); -#line 4791 "FSpotImporter.c" - } - } -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_versions); -#line 4796 "FSpotImporter.c" - } - goto __finally5; - __catch5_database_error: - { - GError* e = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp143_; - gint64 _tmp144_; - GError* _tmp145_; - const gchar* _tmp146_; - gboolean _tmp147_ = FALSE; - DataImportsFSpotDbFSpotPhotoRow* _tmp148_; - GFile* _tmp149_; -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - e = _inner_error_; -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _inner_error_ = NULL; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp143_ = photo_row; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp144_ = _tmp143_->photo_id; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp145_ = e; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp146_ = _tmp145_->message; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_message ("FSpotImporter.vala:504: Failed to retrieve versions for photo ID %ld: " \ -"%s", (glong) _tmp144_, _tmp146_); -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp148_ = photo_row; -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp149_ = _tmp148_->base_path; -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp149_ != NULL) { -#line 4829 "FSpotImporter.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp150_; - const gchar* _tmp151_; -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp150_ = photo_row; -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp151_ = _tmp150_->filename; -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp147_ = _tmp151_ != NULL; -#line 4838 "FSpotImporter.c" - } else { -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp147_ = FALSE; -#line 4842 "FSpotImporter.c" - } -#line 506 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp147_) { -#line 4846 "FSpotImporter.c" - SpitDataImportsImportableMediaItem** _tmp152_; - gint _tmp152__length1; - DataImportsFSpotDbFSpotPhotoRow* _tmp153_; - DataImportsFSpotDbFSpotRollRow* _tmp154_; - DataImportsFSpotFSpotImportableTag** _tmp155_; - gint _tmp155__length1; - DataImportsFSpotFSpotImportableEvent* _tmp156_; - gboolean _tmp157_; - gboolean _tmp158_; - DataImportsFSpotFSpotImportableItem* _tmp159_; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp152_ = importable_items; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp152__length1 = importable_items_length1; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp153_ = photo_row; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp154_ = roll_row; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp155_ = tags; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp155__length1 = tags_length1; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp156_ = event; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp157_ = hidden; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp158_ = favorite; -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp159_ = data_imports_fspot_fspot_importable_item_new (_tmp153_, NULL, _tmp154_, _tmp155_, _tmp155__length1, _tmp156_, _tmp157_, _tmp158_); -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _vala_array_add6 (&importable_items, &importable_items_length1, &_importable_items_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp159_, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_MEDIA_ITEM, SpitDataImportsImportableMediaItem)); -#line 4879 "FSpotImporter.c" - } -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_error_free0 (e); -#line 4883 "FSpotImporter.c" - } - __finally5: -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items = (_vala_array_free (importable_items, importable_items_length1, (GDestroyNotify) g_object_unref), NULL); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_clear_error (&_inner_error_); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return; -#line 4912 "FSpotImporter.c" - } -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp160_ = self->priv->running; -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp160_) { -#line 4918 "FSpotImporter.c" - SpitDataImportsPluginHost* _tmp161_; - SpitDataImportsImportableMediaItem** _tmp162_; - gint _tmp162__length1; - gdouble _tmp163_; - gdouble _tmp164_; - gdouble _tmp165_; - gdouble _tmp166_; - gdouble _tmp167_; - gdouble _tmp168_; - gdouble _tmp169_; - SpitDataImportsPluginHost* _tmp170_; - gdouble _tmp171_; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp161_ = self->priv->host; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp162_ = importable_items; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp162__length1 = importable_items_length1; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp163_ = current_progress; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp164_ = progress_delta_per_photo; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp165_ = progress_plugin_to_host_ratio; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp166_ = progress_delta_per_photo; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp167_ = progress_plugin_to_host_ratio; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_prepare_media_items_for_import (_tmp161_, _tmp162_, _tmp162__length1, _tmp163_ + (_tmp164_ * _tmp165_), _tmp166_ * (1 - _tmp167_), NULL); -#line 521 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp168_ = current_progress; -#line 521 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp169_ = progress_delta_per_photo; -#line 521 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - current_progress = _tmp168_ + _tmp169_; -#line 522 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp170_ = self->priv->host; -#line 522 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp171_ = current_progress; -#line 522 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_update_import_progress_pane (_tmp170_, _tmp171_, NULL); -#line 4961 "FSpotImporter.c" - } else { -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items = (_vala_array_free (importable_items, importable_items_length1, (GDestroyNotify) g_object_unref), NULL); -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - break; -#line 4975 "FSpotImporter.c" - } -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - importable_items = (_vala_array_free (importable_items, importable_items_length1, (GDestroyNotify) g_object_unref), NULL); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (roll_row); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (event); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_object_unref), NULL); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (photo_row); -#line 4987 "FSpotImporter.c" - } -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (_photo_row_list); -#line 4991 "FSpotImporter.c" - } -#line 527 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp172_ = self->priv->host; -#line 527 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_finalize_import (_tmp172_, _data_imports_fspot_fspot_data_importer_on_imported_items_count_spit_data_imports_imported_items_count_callback, self, NULL); -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (all_photos); -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (tags_cache); -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (database); -#line 5003 "FSpotImporter.c" -} - - -void data_imports_fspot_fspot_data_importer_on_imported_items_count (DataImportsFSpotFSpotDataImporter* self, gint imported_items_count) { - SpitDataImportsPluginHost* _tmp0_; - gint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 530 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER (self)); -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = self->priv->host; -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = imported_items_count; -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = g_strdup_printf (DATA_IMPORTS_FSPOT_MESSAGE_FINAL_SCREEN, _tmp1_); -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _tmp2_; -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - spit_data_imports_plugin_host_install_static_message_pane (_tmp0_, _tmp3_, SPIT_DATA_IMPORTS_PLUGIN_HOST_BUTTON_MODE_CLOSE); -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp3_); -#line 5026 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_data_importer_is_tag_event (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag) { - gboolean result = FALSE; - gboolean _result_ = FALSE; - DataImportsFSpotFSpotImportableTag* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gboolean _tmp3_; - gboolean _tmp4_; -#line 537 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER (self), FALSE); -#line 537 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (tag), FALSE); -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = tag; -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = data_imports_fspot_fspot_importable_tag_get_stock_icon (_tmp0_); -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _tmp1_; -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = g_strcmp0 (DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_EVENTS, _tmp2_) == 0; -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp2_); -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp3_; -#line 539 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = _result_; -#line 539 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!_tmp4_) { -#line 5058 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* parent = NULL; - DataImportsFSpotFSpotImportableTag* _tmp5_; - DataImportsFSpotFSpotImportableTag* _tmp6_; - DataImportsFSpotFSpotImportableTag* _tmp7_; -#line 540 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = tag; -#line 540 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = data_imports_fspot_fspot_importable_tag_get_fspot_parent (_tmp5_); -#line 540 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - parent = _tmp6_; -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = parent; -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp7_ == NULL) { -#line 542 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = FALSE; -#line 5075 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag* _tmp8_; - gboolean _tmp9_; -#line 544 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = parent; -#line 544 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = data_imports_fspot_fspot_data_importer_is_tag_event (self, _tmp8_); -#line 544 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp9_; -#line 5085 "FSpotImporter.c" - } -#line 539 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (parent); -#line 5089 "FSpotImporter.c" - } -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _result_; -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 5095 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_data_importer_is_tag_hidden (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag, gint64 hidden_tag_id) { - gboolean result = FALSE; - gboolean _result_ = FALSE; - gint64 _tmp0_; - DataImportsFSpotFSpotImportableTag* _tmp1_; - gint64 _tmp2_; - gboolean _tmp3_; -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER (self), FALSE); -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (tag), FALSE); -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = hidden_tag_id; -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = tag; -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = data_imports_fspot_fspot_importable_tag_get_id (_tmp1_); -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp0_ == _tmp2_; -#line 551 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = _result_; -#line 551 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!_tmp3_) { -#line 5122 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* parent = NULL; - DataImportsFSpotFSpotImportableTag* _tmp4_; - DataImportsFSpotFSpotImportableTag* _tmp5_; - DataImportsFSpotFSpotImportableTag* _tmp6_; -#line 552 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = tag; -#line 552 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = data_imports_fspot_fspot_importable_tag_get_fspot_parent (_tmp4_); -#line 552 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - parent = _tmp5_; -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = parent; -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp6_ == NULL) { -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = FALSE; -#line 5139 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag* _tmp7_; - gint64 _tmp8_; - gboolean _tmp9_; -#line 556 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = parent; -#line 556 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = hidden_tag_id; -#line 556 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = data_imports_fspot_fspot_data_importer_is_tag_hidden (self, _tmp7_, _tmp8_); -#line 556 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp9_; -#line 5152 "FSpotImporter.c" - } -#line 551 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (parent); -#line 5156 "FSpotImporter.c" - } -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _result_; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 5162 "FSpotImporter.c" -} - - -static gboolean data_imports_fspot_fspot_data_importer_is_tag_favorite (DataImportsFSpotFSpotDataImporter* self, DataImportsFSpotFSpotImportableTag* tag) { - gboolean result = FALSE; - gboolean _result_ = FALSE; - DataImportsFSpotFSpotImportableTag* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gboolean _tmp3_; - gboolean _tmp4_; -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_DATA_IMPORTER (self), FALSE); -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_IS_FSPOT_IMPORTABLE_TAG (tag), FALSE); -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp0_ = tag; -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp1_ = data_imports_fspot_fspot_importable_tag_get_stock_icon (_tmp0_); -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp2_ = _tmp1_; -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp3_ = g_strcmp0 (DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_FAV, _tmp2_) == 0; -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_free0 (_tmp2_); -#line 562 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp3_; -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp4_ = _result_; -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (!_tmp4_) { -#line 5194 "FSpotImporter.c" - DataImportsFSpotFSpotImportableTag* parent = NULL; - DataImportsFSpotFSpotImportableTag* _tmp5_; - DataImportsFSpotFSpotImportableTag* _tmp6_; - DataImportsFSpotFSpotImportableTag* _tmp7_; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp5_ = tag; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp6_ = data_imports_fspot_fspot_importable_tag_get_fspot_parent (_tmp5_); -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - parent = _tmp6_; -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp7_ = parent; -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - if (_tmp7_ == NULL) { -#line 566 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = FALSE; -#line 5211 "FSpotImporter.c" - } else { - DataImportsFSpotFSpotImportableTag* _tmp8_; - gboolean _tmp9_; -#line 568 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp8_ = parent; -#line 568 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _tmp9_ = data_imports_fspot_fspot_data_importer_is_tag_favorite (self, _tmp8_); -#line 568 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _result_ = _tmp9_; -#line 5221 "FSpotImporter.c" - } -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - _g_object_unref0 (parent); -#line 5225 "FSpotImporter.c" - } -#line 570 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - result = _result_; -#line 570 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - return result; -#line 5231 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_class_init (DataImportsFSpotFSpotDataImporterClass * klass) { -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_data_importer_parent_class = g_type_class_peek_parent (klass); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotFSpotDataImporterPrivate)); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_fspot_data_importer_finalize; -#line 5242 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_spit_data_imports_data_importer_interface_init (SpitDataImportsDataImporterIface * iface) { -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - data_imports_fspot_fspot_data_importer_spit_data_imports_data_importer_parent_iface = g_type_interface_peek_parent (iface); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->is_running = (gboolean (*) (SpitDataImportsDataImporter *)) data_imports_fspot_fspot_data_importer_real_is_running; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->get_service = (SpitDataImportsService* (*) (SpitDataImportsDataImporter *)) data_imports_fspot_fspot_data_importer_real_get_service; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->start = (void (*) (SpitDataImportsDataImporter *)) data_imports_fspot_fspot_data_importer_real_start; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->stop = (void (*) (SpitDataImportsDataImporter *)) data_imports_fspot_fspot_data_importer_real_stop; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->on_library_selected = (void (*) (SpitDataImportsDataImporter *, SpitDataImportsImportableLibrary*)) data_imports_fspot_fspot_data_importer_real_on_library_selected; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - iface->on_file_selected = (void (*) (SpitDataImportsDataImporter *, GFile*)) data_imports_fspot_fspot_data_importer_real_on_file_selected; -#line 5261 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_instance_init (DataImportsFSpotFSpotDataImporter * self) { -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv = DATA_IMPORTS_FSPOT_FSPOT_DATA_IMPORTER_GET_PRIVATE (self); -#line 324 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->host = NULL; -#line 325 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->service = NULL; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self->priv->running = FALSE; -#line 5274 "FSpotImporter.c" -} - - -static void data_imports_fspot_fspot_data_importer_finalize (GObject * obj) { - DataImportsFSpotFSpotDataImporter * self; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_TYPE_FSPOT_DATA_IMPORTER, DataImportsFSpotFSpotDataImporter); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotImporter.vala" - G_OBJECT_CLASS (data_imports_fspot_fspot_data_importer_parent_class)->finalize (obj); -#line 5284 "FSpotImporter.c" -} - - -GType data_imports_fspot_fspot_data_importer_get_type (void) { - static volatile gsize data_imports_fspot_fspot_data_importer_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_fspot_data_importer_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotFSpotDataImporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_fspot_data_importer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotFSpotDataImporter), 0, (GInstanceInitFunc) data_imports_fspot_fspot_data_importer_instance_init, NULL }; - static const GInterfaceInfo spit_data_imports_data_importer_info = { (GInterfaceInitFunc) data_imports_fspot_fspot_data_importer_spit_data_imports_data_importer_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_fspot_data_importer_type_id; - data_imports_fspot_fspot_data_importer_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotFSpotDataImporter", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_fspot_data_importer_type_id, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORTER, &spit_data_imports_data_importer_info); - g_once_init_leave (&data_imports_fspot_fspot_data_importer_type_id__volatile, data_imports_fspot_fspot_data_importer_type_id); - } - return data_imports_fspot_fspot_data_importer_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff --git a/plugins/shotwell-data-imports/FSpotImporter.vala b/plugins/shotwell-data-imports/FSpotImporter.vala deleted file mode 100644 index be04cf9..0000000 --- a/plugins/shotwell-data-imports/FSpotImporter.vala +++ /dev/null @@ -1,575 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -public class FSpotService : Object, Spit.Pluggable, Spit.DataImports.Service { - private const string ICON_FILENAME = "f-spot-24.png"; - - private static Gdk.Pixbuf[] icon_pixbuf_set = null; - - public FSpotService(GLib.File resource_directory) { - // initialize the database layer - DataImports.FSpot.Db.init(); - if (icon_pixbuf_set == null) - icon_pixbuf_set = - Resources.load_from_resource("/org/gnome/Shotwell/Imports/" - + ICON_FILENAME); - } - - public int get_pluggable_interface(int min_host_interface, int max_host_interface) { - return Spit.negotiate_interfaces(min_host_interface, max_host_interface, - Spit.DataImports.CURRENT_INTERFACE); - } - - public unowned string get_id() { - return "org.yorba.shotwell.dataimports.fspot"; - } - - public unowned string get_pluggable_name() { - return "F-Spot"; - } - - public void get_info(ref Spit.PluggableInfo info) { - info.authors = "Bruno Girin"; - info.copyright = _("Copyright 2016 Software Freedom Conservancy Inc."); - info.translators = Resources.TRANSLATORS; - info.version = _VERSION; - info.website_name = Resources.WEBSITE_NAME; - info.website_url = Resources.WEBSITE_URL; - info.is_license_wordwrapped = false; - info.license = Resources.LICENSE; - info.icons = icon_pixbuf_set; - } - - public void activation(bool enabled) { - } - - public Spit.DataImports.DataImporter create_data_importer(Spit.DataImports.PluginHost host) { - return new DataImports.FSpot.FSpotDataImporter(this, host); - } -} - -namespace DataImports.FSpot { - -internal const string SERVICE_NAME = "F-Spot"; -internal const string SERVICE_WELCOME_MESSAGE = - _("Welcome to the F-Spot library import service.\n\nPlease select a library to import, either by selecting one of the existing libraries found by Shotwell or by selecting an alternative F-Spot database file."); -internal const string SERVICE_WELCOME_MESSAGE_FILE_ONLY = - _("Welcome to the F-Spot library import service.\n\nPlease select an F-Spot database file."); -internal const string FILE_IMPORT_LABEL = - _("Manually select an F-Spot database file to import:"); -internal const string ERROR_CANT_OPEN_DB_FILE = - _("Cannot open the selected F-Spot database file: the file does not exist or is not an F-Spot database"); -internal const string ERROR_UNSUPPORTED_DB_VERSION = - _("Cannot open the selected F-Spot database file: this version of the F-Spot database is not supported by Shotwell"); -internal const string ERROR_CANT_READ_TAGS_TABLE = - _("Cannot read the selected F-Spot database file: error while reading tags table"); -internal const string ERROR_CANT_READ_PHOTOS_TABLE = - _("Cannot read the selected F-Spot database file: error while reading photos table"); -internal const string MESSAGE_FINAL_SCREEN = - _("Shotwell has found %d photos in the F-Spot library and is currently importing them. Duplicates will be automatically detected and removed.\n\nYou can close this dialog and start using Shotwell while the import is taking place in the background."); - -public class FSpotImportableLibrary : Spit.DataImports.ImportableLibrary, GLib.Object { - private File db_file; - - public FSpotImportableLibrary(File db_file) { - this.db_file = db_file; - } - - public File get_db_file() { - return db_file; - } - - public string get_display_name() { - return _("F-Spot library: %s").printf(db_file.get_path()); - } -} - -public class FSpotImportableItem : Spit.DataImports.ImportableMediaItem, GLib.Object { - private DataImports.FSpot.Db.FSpotPhotoRow photo_row; - private DataImports.FSpot.Db.FSpotPhotoVersionRow? photo_version_row; - private DataImports.FSpot.Db.FSpotRollRow? roll_row; - private FSpotImportableTag[] tags; - private FSpotImportableEvent? event; - private FSpotImportableRating rating; - private string folder_path; - private string filename; - private time_t? date_time; - - public FSpotImportableItem( - DataImports.FSpot.Db.FSpotPhotoRow photo_row, - DataImports.FSpot.Db.FSpotPhotoVersionRow? photo_version_row, - DataImports.FSpot.Db.FSpotRollRow? roll_row, - FSpotImportableTag[] tags, - FSpotImportableEvent? event, - bool is_hidden, - bool is_favorite - ) { - this.photo_row = photo_row; - this.photo_version_row = photo_version_row; - this.roll_row = roll_row; - this.tags = tags; - this.event = event; - this.date_time = photo_row.time; - if (photo_row.rating > 0) - this.rating = new FSpotImportableRating(photo_row.rating); - else if (is_hidden) - this.rating = new FSpotImportableRating(FSpotImportableRating.REJECTED); - else if (is_favorite) - this.rating = new FSpotImportableRating(5); - else - this.rating = new FSpotImportableRating(FSpotImportableRating.UNRATED); - - // store path and filename - folder_path = (photo_version_row != null) ? - photo_version_row.base_path.get_path() : - photo_row.base_path.get_path(); - filename = (photo_version_row != null) ? - photo_version_row.filename : - photo_row.filename; - - // In theory, neither field should be null at that point but belts - // and braces don't hurt - if (folder_path != null && filename != null) { - // check if file exist and if not decode as URL - File photo = File.new_for_path(folder_path).get_child(filename); - - // If file not found, parse as URI and store back - if (!photo.query_exists()) { - folder_path = decode_url(folder_path); - filename = decode_url(filename); - } - } - } - - public Spit.DataImports.ImportableTag[] get_tags() { - Spit.DataImports.ImportableTag[] importable_tags = new Spit.DataImports.ImportableTag[0]; - foreach (FSpotImportableTag tag in tags) - importable_tags += tag; - return importable_tags; - } - - public Spit.DataImports.ImportableEvent? get_event() { - return event; - } - - public string get_folder_path() { - return folder_path; - } - - public string get_filename() { - return filename; - } - - public string? get_title() { - return (photo_row.description == null || photo_row.description == "") ? null : photo_row.description; - } - - public Spit.DataImports.ImportableRating get_rating() { - return rating; - } - - public time_t? get_exposure_time() { - return date_time; - } - - private string decode_url(string url) { - StringBuilder builder = new StringBuilder(); - for (int idx = 0; idx < url.length; ) { - int cidx = url.index_of_char('%', idx); - if (cidx > idx) { - builder.append(url.slice(idx, cidx)); - } - if (cidx >= 0) { - if (cidx < url.length - 2) { - char c1 = url.get(cidx + 1); - char c2 = url.get(cidx + 2); - if (c1.isxdigit() && c1.isxdigit()) { - int ccode = 0x10 * c1.xdigit_value() + c2.xdigit_value(); - builder.append_c((char)ccode); - } - idx = cidx + 3; - } else { - idx = cidx + 1; - } - } else { - builder.append(url.substring(idx)); - idx = url.length; - } - } - return builder.str; - } -} - -public class FSpotImportableTag : Spit.DataImports.ImportableTag, GLib.Object { - private DataImports.FSpot.Db.FSpotTagRow row; - private FSpotImportableTag? parent; - - public FSpotImportableTag(DataImports.FSpot.Db.FSpotTagRow row, FSpotImportableTag? parent) { - this.row = row; - this.parent = parent; - } - - public int64 get_id() { - return row.tag_id; - } - - public string get_name() { - return row.name; - } - - public Spit.DataImports.ImportableTag? get_parent() { - return parent; - } - - public FSpotImportableTag? get_fspot_parent() { - return parent; - } - - public string get_stock_icon() { - return row.stock_icon; - } - - public bool is_stock() { - return (row.stock_icon.has_prefix(DataImports.FSpot.Db.FSpotTagsTable.PREFIX_STOCK_ICON)); - } - - public FSpotImportableEvent to_event() { - return new FSpotImportableEvent(this.row); - } -} - -public class FSpotImportableEvent : Spit.DataImports.ImportableEvent, GLib.Object { - private DataImports.FSpot.Db.FSpotTagRow row; - - public FSpotImportableEvent(DataImports.FSpot.Db.FSpotTagRow row) { - this.row = row; - } - - public string get_name() { - return row.name; - } -} - -public class FSpotImportableRating : Spit.DataImports.ImportableRating, GLib.Object { - public const int REJECTED = -1; - public const int UNRATED = 0; - - private int rating_value; - - public FSpotImportableRating(int rating_value) { - if (rating_value < -1) - rating_value = -1; - else if (rating_value > 5) - rating_value = 5; - this.rating_value = rating_value; - } - - public bool is_rejected() { - return (rating_value == REJECTED); - } - - public bool is_unrated() { - return (rating_value == UNRATED); - } - - public int get_value() { - return rating_value; - } -} - -internal class FSpotTagsCache : Object { - private DataImports.FSpot.Db.FSpotTagsTable tags_table; - private Gee.HashMap<int64?, FSpotImportableTag> tags_map; - - public FSpotTagsCache(DataImports.FSpot.Db.FSpotTagsTable tags_table) throws DatabaseError { - this.tags_table = tags_table; - tags_map = new Gee.HashMap<int64?, FSpotImportableTag> (); - } - - public FSpotImportableTag get_tag(DataImports.FSpot.Db.FSpotTagRow tag_row) throws DatabaseError { - FSpotImportableTag? tag = tags_map.get(tag_row.tag_id); - if (tag != null) { - return tag; - } else { - FSpotImportableTag? parent_tag = get_tag_from_id(tag_row.category_id); - FSpotImportableTag new_tag = new FSpotImportableTag(tag_row, parent_tag); - tags_map[tag_row.tag_id] = new_tag; - return new_tag; - } - } - - private FSpotImportableTag? get_tag_from_id(int64 tag_id) throws DatabaseError { - // check whether the tag ID is valid first, otherwise return null - if (tag_id < 1) - return null; - FSpotImportableTag? tag = tags_map.get(tag_id); - if (tag != null) - return tag; - DataImports.FSpot.Db.FSpotTagRow? tag_row = tags_table.get_by_id(tag_id); - if (tag_row != null) { - FSpotImportableTag? parent_tag = get_tag_from_id(tag_row.category_id); - FSpotImportableTag new_tag = new FSpotImportableTag(tag_row, parent_tag); - tags_map[tag_id] = new_tag; - return new_tag; - } - return null; - } -} - -public class FSpotDataImporter : Spit.DataImports.DataImporter, GLib.Object { - - private weak Spit.DataImports.PluginHost host = null; - private weak Spit.DataImports.Service service = null; - private bool running = false; - - public FSpotDataImporter(Spit.DataImports.Service service, - Spit.DataImports.PluginHost host) { - debug("FSpotDataImporter instantiated."); - this.service = service; - this.host = host; - } - - private bool is_running() { - return running; - } - - public Spit.DataImports.Service get_service() { - return service; - } - - public void start() { - if (is_running()) - return; - - debug("FSpotDataImporter: starting interaction."); - - running = true; - - do_discover_importable_libraries(); - } - - public void stop() { - debug("FSpotDataImporter: stopping interaction."); - - running = false; - } - - // Actions and event implementation - - /** - * Action that discovers importable libraries based on standard locations. - */ - private void do_discover_importable_libraries() { - Spit.DataImports.ImportableLibrary[] discovered_libraries = - new Spit.DataImports.ImportableLibrary[0]; - - File[] db_files = { - // where the DB is in Ubuntu Lucid - File.new_for_path(Environment.get_user_config_dir()). - get_child("f-spot").get_child("photos.db"), - // where it seems to be in Ubuntu Jaunty - File.new_for_path(Environment.get_home_dir()).get_child(".gnome2"). - get_child("f-spot").get_child("photos.db"), - // where it should really be if it followed the XDG spec - File.new_for_path(Environment.get_user_data_dir()). - get_child("f-spot").get_child("photos.db") - }; - - foreach (File db_file in db_files) { - if (db_file.query_exists(null)) { - discovered_libraries += new FSpotImportableLibrary(db_file); - message("Discovered importable library: %s", db_file.get_path()); - } - } - - host.install_library_selection_pane( - (discovered_libraries.length > 0 ? SERVICE_WELCOME_MESSAGE : SERVICE_WELCOME_MESSAGE_FILE_ONLY), - discovered_libraries, - FILE_IMPORT_LABEL - ); - } - - public void on_library_selected(Spit.DataImports.ImportableLibrary library) { - on_file_selected(((FSpotImportableLibrary)library).get_db_file()); - } - - public void on_file_selected(File file) { - DataImports.FSpot.Db.FSpotDatabase database; - FSpotTagsCache tags_cache; - Gee.ArrayList<DataImports.FSpot.Db.FSpotPhotoRow> all_photos; - double progress_delta_per_photo = 1.0; - double progress_plugin_to_host_ratio = 0.5; - double current_progress = 0.0; - try { - database = new DataImports.FSpot.Db.FSpotDatabase(file); - } catch(DatabaseError e) { - debug("FSpotDataImporter: Can't open database file: %s".printf(e.message)); - host.post_error_message(ERROR_CANT_OPEN_DB_FILE); - return; - } catch(Spit.DataImports.DataImportError e) { - debug("FSpotDataImporter: Unsupported F-Spot database version: %s".printf(e.message)); - host.post_error_message(ERROR_UNSUPPORTED_DB_VERSION); - return; - } - try { - tags_cache = new FSpotTagsCache(database.tags_table); - } catch(DatabaseError e) { - debug("FSpotDataImporter: Can't read tags table: %s".printf(e.message)); - host.post_error_message(ERROR_CANT_READ_TAGS_TABLE); - return; - } - host.install_import_progress_pane(_("Preparing to import")); - try { - all_photos = database.photos_table.get_all(); - } catch(DatabaseError e) { - debug("FSpotDataImporter: Can't read photos table: %s".printf(e.message)); - host.post_error_message(ERROR_CANT_READ_PHOTOS_TABLE); - return; - } - if (all_photos.size > 0) - progress_delta_per_photo = 1.0 / all_photos.size; - foreach (DataImports.FSpot.Db.FSpotPhotoRow photo_row in all_photos) { - bool hidden = false; - bool favorite = false; - FSpotImportableTag[] tags = new FSpotImportableTag[0]; - FSpotImportableEvent? event = null; - DataImports.FSpot.Db.FSpotRollRow? roll_row = null; - - // TODO: We do not convert F-Spot events to Shotwell events because F-Spot's events - // are essentially tags. We would need to detect if the tag is an event (use - // is_tag_event) and then assign the event to the photo ... since a photo can be - // in multiple F-Spot events, we would need to pick one, and since their tags - // are hierarchical, we would need to pick a name (probably the leaf) - try { - foreach ( - DataImports.FSpot.Db.FSpotTagRow tag_row in - database.tags_table.get_by_photo_id(photo_row.photo_id) - ) { - FSpotImportableTag tag = tags_cache.get_tag(tag_row); - if (is_tag_hidden(tag, database.hidden_tag_id)) - hidden = true; - else if (is_tag_favorite(tag)) - favorite = true; - else - tags += tag; - } - } catch(DatabaseError e) { - // log the error and leave the tag list empty - message("Failed to retrieve tags for photo ID %ld: %s", (long) photo_row.photo_id, - e.message); - } - - try { - roll_row = database.rolls_table.get_by_id(photo_row.roll_id); - } catch (DatabaseError e) { - // log the error and leave the roll row null - message("Failed to retrieve roll for photo ID %ld: %s", (long) photo_row.photo_id, - e.message); - } - - Spit.DataImports.ImportableMediaItem[] importable_items = new Spit.DataImports.ImportableMediaItem[0]; - try { - Gee.ArrayList<DataImports.FSpot.Db.FSpotPhotoVersionRow> photo_versions = - database.photo_versions_table.get_by_photo_id(photo_row.photo_id); - bool photo_versions_added = false; // set to true if at least one version was added - bool photo_versions_skipped = false; // set to true if at least one version was skipped due to missing file details - foreach (DataImports.FSpot.Db.FSpotPhotoVersionRow photo_version_row in photo_versions) { - if (photo_version_row.base_path != null && photo_version_row.filename != null) { - importable_items += new FSpotImportableItem( - photo_row, photo_version_row, roll_row, tags, event, hidden, favorite - ); - photo_versions_added = true; - } else { - photo_versions_skipped = true; - } - } - - // Older versions of F-Spot (0.4.3.1 at least, perhaps later) did not maintain photo_versions, - // this handles that case - // It also handles the case when we had to skip any photo version due to missing - // file details - if (photo_versions_skipped || !photo_versions_added) { - if (photo_row.base_path != null && photo_row.filename != null) { - importable_items += new FSpotImportableItem( - photo_row, null, roll_row, tags, event, hidden, favorite - ); - } - } - } catch (DatabaseError e) { - // if we can't load the different versions, do the best we can - // and create one photo from the photo row that was found earlier - message("Failed to retrieve versions for photo ID %ld: %s", (long) photo_row.photo_id, - e.message); - if (photo_row.base_path != null && photo_row.filename != null) { - importable_items += new FSpotImportableItem( - photo_row, null, roll_row, tags, event, hidden, favorite - ); - } - } - // If the importer is still running, import the items and loop, - // otherwise break the loop - if (running) { - host.prepare_media_items_for_import( - importable_items, - current_progress + (progress_delta_per_photo * progress_plugin_to_host_ratio), - progress_delta_per_photo * (1 - progress_plugin_to_host_ratio), - null - ); - current_progress += progress_delta_per_photo; - host.update_import_progress_pane(current_progress); - } else { - break; - } - } - host.finalize_import(on_imported_items_count); - } - - public void on_imported_items_count(int imported_items_count) { - host.install_static_message_pane( - MESSAGE_FINAL_SCREEN.printf(imported_items_count), - Spit.DataImports.PluginHost.ButtonMode.CLOSE - ); - } - - private bool is_tag_event(FSpotImportableTag tag) { - bool result = (DataImports.FSpot.Db.FSpotTagsTable.STOCK_ICON_EVENTS == tag.get_stock_icon()); - if (!result) { - FSpotImportableTag? parent = tag.get_fspot_parent(); - if (parent == null) - result = false; - else - result = is_tag_event(parent); - } - return result; - } - - private bool is_tag_hidden(FSpotImportableTag tag, int64 hidden_tag_id) { - bool result = (hidden_tag_id == tag.get_id()); - if (!result) { - FSpotImportableTag? parent = tag.get_fspot_parent(); - if (parent == null) - result = false; - else - result = is_tag_hidden(parent, hidden_tag_id); - } - return result; - } - - private bool is_tag_favorite(FSpotImportableTag tag) { - bool result = (DataImports.FSpot.Db.FSpotTagsTable.STOCK_ICON_FAV == tag.get_stock_icon()); - if (!result) { - FSpotImportableTag? parent = tag.get_fspot_parent(); - if (parent == null) - result = false; - else - result = is_tag_favorite(parent); - } - return result; - } -} - -} // namespace - diff --git a/plugins/shotwell-data-imports/FSpotMetaTable.c b/plugins/shotwell-data-imports/FSpotMetaTable.c deleted file mode 100644 index 0b87d55..0000000 --- a/plugins/shotwell-data-imports/FSpotMetaTable.c +++ /dev/null @@ -1,1464 +0,0 @@ -/* FSpotMetaTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotMetaTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW (data_imports_fspot_db_fspot_meta_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW, DataImportsFSpotDbFSpotMetaRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW, DataImportsFSpotDbFSpotMetaRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW, DataImportsFSpotDbFSpotMetaRowClass)) - -typedef struct _DataImportsFSpotDbFSpotMetaRow DataImportsFSpotDbFSpotMetaRow; -typedef struct _DataImportsFSpotDbFSpotMetaRowClass DataImportsFSpotDbFSpotMetaRowClass; -typedef struct _DataImportsFSpotDbFSpotMetaRowPrivate DataImportsFSpotDbFSpotMetaRowPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE (data_imports_fspot_db_fspot_meta_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass)) - -typedef struct _DataImportsFSpotDbFSpotMetaTable DataImportsFSpotDbFSpotMetaTable; -typedef struct _DataImportsFSpotDbFSpotMetaTableClass DataImportsFSpotDbFSpotMetaTableClass; -typedef struct _DataImportsFSpotDbFSpotMetaTablePrivate DataImportsFSpotDbFSpotMetaTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR (data_imports_fspot_db_fspot_meta_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotMetaBehavior DataImportsFSpotDbFSpotMetaBehavior; -typedef struct _DataImportsFSpotDbFSpotMetaBehaviorClass DataImportsFSpotDbFSpotMetaBehaviorClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) -typedef struct _DataImportsFSpotDbFSpotMetaBehaviorPrivate DataImportsFSpotDbFSpotMetaBehaviorPrivate; - -struct _DataImportsFSpotDbFSpotMetaRow { - GObject parent_instance; - DataImportsFSpotDbFSpotMetaRowPrivate * priv; - gchar* name; - gchar* data; -}; - -struct _DataImportsFSpotDbFSpotMetaRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotMetaTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotMetaTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotMetaTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotDbFSpotMetaBehavior { - GObject parent_instance; - DataImportsFSpotDbFSpotMetaBehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotMetaBehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_meta_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_meta_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_meta_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_instance; -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_meta_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_meta_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_META_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotMetaRow* data_imports_fspot_db_fspot_meta_row_new (void); -DataImportsFSpotDbFSpotMetaRow* data_imports_fspot_db_fspot_meta_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_meta_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_meta_table_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_new (sqlite3* db); -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_construct (GType object_type, sqlite3* db); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -GType data_imports_fspot_db_fspot_meta_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_get_instance (void); -GQuark database_error_quark (void); -gchar* data_imports_fspot_db_fspot_meta_table_get_data (DataImportsFSpotDbFSpotMetaTable* self, const gchar* name, GError** error); -gchar** data_imports_fspot_db_fspot_table_behavior_list_columns (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -gchar* data_imports_fspot_db_fspot_meta_table_get_app_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error); -gchar* data_imports_fspot_db_fspot_meta_table_get_db_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error); -gint64 data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (DataImportsFSpotDbFSpotMetaTable* self, GError** error); -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR_TABLE_NAME "Meta" -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_new (void); -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_construct (GType object_type); -static gchar* data_imports_fspot_db_fspot_meta_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_meta_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_meta_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotMetaRow* * row, gint offset); -static void data_imports_fspot_db_fspot_meta_behavior_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - - -DataImportsFSpotDbFSpotMetaRow* data_imports_fspot_db_fspot_meta_row_construct (GType object_type) { - DataImportsFSpotDbFSpotMetaRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = (DataImportsFSpotDbFSpotMetaRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return self; -#line 214 "FSpotMetaTable.c" -} - - -DataImportsFSpotDbFSpotMetaRow* data_imports_fspot_db_fspot_meta_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return data_imports_fspot_db_fspot_meta_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW); -#line 221 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_row_class_init (DataImportsFSpotDbFSpotMetaRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_meta_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_meta_row_finalize; -#line 230 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_row_instance_init (DataImportsFSpotDbFSpotMetaRow * self) { -} - - -static void data_imports_fspot_db_fspot_meta_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotMetaRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW, DataImportsFSpotDbFSpotMetaRow); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (self->name); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (self->data); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_meta_row_parent_class)->finalize (obj); -#line 248 "FSpotMetaTable.c" -} - - -/** - * The value object for the "meta" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_meta_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_meta_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_meta_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotMetaRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_meta_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotMetaRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_meta_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_meta_row_type_id; - data_imports_fspot_db_fspot_meta_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotMetaRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_meta_row_type_id__volatile, data_imports_fspot_db_fspot_meta_row_type_id); - } - return data_imports_fspot_db_fspot_meta_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_construct (GType object_type, sqlite3* db) { - DataImportsFSpotDbFSpotMetaTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotMetaBehavior* _tmp1_; - DataImportsFSpotDbFSpotMetaBehavior* _tmp2_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = db; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = (DataImportsFSpotDbFSpotMetaTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_meta_behavior_get_instance (); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = _tmp1_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (_tmp2_); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return self; -#line 288 "FSpotMetaTable.c" -} - - -DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_new (sqlite3* db) { -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return data_imports_fspot_db_fspot_meta_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, db); -#line 295 "FSpotMetaTable.c" -} - - -static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { - gchar* result = NULL; - const gchar* _tmp0_; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - gchar** _tmp3_; - gint _tmp3__length1; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = separator; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_ == NULL) { -#line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - separator = ""; -#line 312 "FSpotMetaTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = TRUE; -#line 322 "FSpotMetaTable.c" - } else { - gchar** _tmp4_; - gint _tmp4__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = _tmp4__length1 > 0; -#line 332 "FSpotMetaTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 338 "FSpotMetaTable.c" - } else { - gboolean _tmp5_ = FALSE; - gchar** _tmp6_; - gint _tmp6__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp6__length1 == -1) { -#line 349 "FSpotMetaTable.c" - gchar** _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_[0]; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = _tmp8_ != NULL; -#line 361 "FSpotMetaTable.c" - } else { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = FALSE; -#line 365 "FSpotMetaTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp5_; -#line 369 "FSpotMetaTable.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 373 "FSpotMetaTable.c" - gint i = 0; - gsize len = 0UL; - gint _tmp31_; - gint _tmp33_; - gint _tmp34_; - gsize _tmp35_; - const gchar* _tmp36_; - gint _tmp37_; - gint _tmp38_; - gint _tmp39_; - const gchar* res = NULL; - gsize _tmp40_; - void* _tmp41_; - void* ptr = NULL; - const gchar* _tmp42_; - gchar** _tmp43_; - gint _tmp43__length1; - const gchar* _tmp44_; - void* _tmp45_; - const gchar* _tmp62_; -#line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 396 "FSpotMetaTable.c" - { - gboolean _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 0; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = TRUE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 405 "FSpotMetaTable.c" - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gchar** _tmp13_; - gint _tmp13__length1; - gint _tmp21_ = 0; - gchar** _tmp22_; - gint _tmp22__length1; - gint _tmp23_; - const gchar* _tmp24_; - gsize _tmp30_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp9_) { -#line 418 "FSpotMetaTable.c" - gint _tmp10_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp10_ + 1; -#line 424 "FSpotMetaTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13__length1 != -1) { -#line 434 "FSpotMetaTable.c" - gint _tmp14_; - gchar** _tmp15_; - gint _tmp15__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ < _tmp15__length1; -#line 446 "FSpotMetaTable.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 450 "FSpotMetaTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp12_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = TRUE; -#line 456 "FSpotMetaTable.c" - } else { - gboolean _tmp16_ = FALSE; - gchar** _tmp17_; - gint _tmp17__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp17__length1 == -1) { -#line 467 "FSpotMetaTable.c" - gchar** _tmp18_; - gint _tmp18__length1; - gint _tmp19_; - const gchar* _tmp20_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = _tmp18_[_tmp19_]; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = _tmp20_ != NULL; -#line 482 "FSpotMetaTable.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = FALSE; -#line 486 "FSpotMetaTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp16_; -#line 490 "FSpotMetaTable.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp11_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 496 "FSpotMetaTable.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp23_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp24_ = _tmp22_[_tmp23_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp24_ != NULL) { -#line 508 "FSpotMetaTable.c" - gchar** _tmp25_; - gint _tmp25__length1; - gint _tmp26_; - const gchar* _tmp27_; - gint _tmp28_; - gint _tmp29_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp26_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp27_ = _tmp25_[_tmp26_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp28_ = strlen ((const gchar*) _tmp27_); -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp29_ = _tmp28_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = _tmp29_; -#line 529 "FSpotMetaTable.c" - } else { -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = 0; -#line 533 "FSpotMetaTable.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp30_ = len; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp30_ + _tmp21_; -#line 539 "FSpotMetaTable.c" - } - } -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp31_ = i; -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp31_ == 0) { -#line 546 "FSpotMetaTable.c" - gchar* _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp32_ = g_strdup (""); -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 554 "FSpotMetaTable.c" - } -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp33_ = i; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - str_array_length1 = _tmp33_; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp34_ = str_array_length1; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp35_ = len; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp36_ = separator; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp37_ = strlen ((const gchar*) _tmp36_); -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp38_ = _tmp37_; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp40_ = len; -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp41_ = g_malloc (_tmp40_); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = _tmp41_; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp42_ = res; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43_ = str_array; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43__length1 = str_array_length1; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp44_ = _tmp43_[0]; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp45_; -#line 592 "FSpotMetaTable.c" - { - gboolean _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = TRUE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 601 "FSpotMetaTable.c" - gint _tmp48_; - gchar** _tmp49_; - gint _tmp49__length1; - void* _tmp50_; - const gchar* _tmp51_; - void* _tmp52_; - const gchar* _tmp53_ = NULL; - gchar** _tmp54_; - gint _tmp54__length1; - gint _tmp55_; - const gchar* _tmp56_; - void* _tmp60_; - void* _tmp61_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp46_) { -#line 617 "FSpotMetaTable.c" - gint _tmp47_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp47_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp47_ + 1; -#line 623 "FSpotMetaTable.c" - } -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp48_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49_ = str_array; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49__length1 = str_array_length1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!(_tmp48_ < _tmp49__length1)) { -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 637 "FSpotMetaTable.c" - } -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp50_ = ptr; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp51_ = separator; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp52_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp55_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp56_ = _tmp54_[_tmp55_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp56_ != NULL) { -#line 657 "FSpotMetaTable.c" - gchar** _tmp57_; - gint _tmp57__length1; - gint _tmp58_; - const gchar* _tmp59_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp58_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp59_ = _tmp57_[_tmp58_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = (const gchar*) _tmp59_; -#line 672 "FSpotMetaTable.c" - } else { -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = ""; -#line 676 "FSpotMetaTable.c" - } -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp60_ = ptr; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp61_; -#line 684 "FSpotMetaTable.c" - } - } -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp62_ = res; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = NULL; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gchar*) _tmp62_; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 695 "FSpotMetaTable.c" - } else { - gchar* _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp63_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 704 "FSpotMetaTable.c" - } -} - - -gchar* data_imports_fspot_db_fspot_meta_table_get_data (DataImportsFSpotDbFSpotMetaTable* self, const gchar* name, GError** error) { - gchar* result = NULL; - gchar** columns = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp0_; - gint _tmp1_; - gchar** _tmp2_; - gint columns_length1; - gint _columns_size_; - gchar* column_list = NULL; - gchar** _tmp3_; - gint _tmp3__length1; - gchar* _tmp4_; - gchar* sql = NULL; - const gchar* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - sqlite3_stmt* stmt = NULL; - gint res = 0; - sqlite3* _tmp8_; - const gchar* _tmp9_; - sqlite3_stmt* _tmp10_ = NULL; - gint _tmp11_; - gint _tmp12_; - sqlite3_stmt* _tmp17_; - const gchar* _tmp18_; - gchar* _tmp19_; - GDestroyNotify _tmp20_; - gint _tmp21_; - gint _tmp22_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; - gint _tmp29_; - DataImportsFSpotDbFSpotMetaRow* row = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp32_; - sqlite3_stmt* _tmp33_; - gpointer _tmp34_ = NULL; - DataImportsFSpotDbFSpotMetaRow* _tmp35_; - const gchar* _tmp36_; - gchar* _tmp37_; - GError * _inner_error_ = NULL; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE (self), NULL); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_table_behavior_list_columns (_tmp0_, &_tmp1_); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = _tmp2_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns_length1 = _tmp1_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _columns_size_ = columns_length1; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3_ = columns; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3__length1 = columns_length1; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp4_ = _vala_g_strjoinv (", ", _tmp3_, _tmp3__length1); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - column_list = _tmp4_; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp5_ = column_list; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp7_ = g_strdup_printf ("SELECT %s FROM %s WHERE name=?", _tmp5_, _tmp6_); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - sql = _tmp7_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp9_ = sql; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp11_ = sqlite3_prepare_v2 (_tmp8_, _tmp9_, -1, &_tmp10_, NULL); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - stmt = _tmp10_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - res = _tmp11_; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp12_ = res; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_tmp12_ != SQLITE_OK) { -#line 795 "FSpotMetaTable.c" - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; - gint _tmp16_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp13_ = sql; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp14_ = g_strdup_printf ("Statement failed: %s", _tmp13_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp15_ = _tmp14_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp16_ = res; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - importable_database_table_throw_error (_tmp15_, _tmp16_, &_inner_error_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_tmp15_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 828 "FSpotMetaTable.c" - } else { -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 844 "FSpotMetaTable.c" - } - } - } -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp17_ = stmt; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp18_ = name; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp19_ = g_strdup (_tmp18_); -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp20_ = g_free; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp21_ = sqlite3_bind_text (_tmp17_, 1, _tmp19_, -1, _tmp20_); -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - res = _tmp21_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp22_ = res; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_tmp22_ != SQLITE_OK) { -#line 864 "FSpotMetaTable.c" - const gchar* _tmp23_; - gchar* _tmp24_; - gchar* _tmp25_; - gint _tmp26_; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp23_ = name; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp24_ = g_strdup_printf ("Bind failed for name %s", _tmp23_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp25_ = _tmp24_; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp26_ = res; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - importable_database_table_throw_error (_tmp25_, _tmp26_, &_inner_error_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_tmp25_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 897 "FSpotMetaTable.c" - } else { -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 913 "FSpotMetaTable.c" - } - } - } -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp27_ = stmt; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp28_ = sqlite3_step (_tmp27_); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - res = _tmp28_; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp29_ = res; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_tmp29_ != SQLITE_ROW) { -#line 927 "FSpotMetaTable.c" - gint _tmp30_; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp30_ = res; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_tmp30_ != SQLITE_DONE) { -#line 933 "FSpotMetaTable.c" - gint _tmp31_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp31_ = res; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - importable_database_table_throw_error ("FSpotMetaTable.get_data", _tmp31_, &_inner_error_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 955 "FSpotMetaTable.c" - } else { -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 971 "FSpotMetaTable.c" - } - } - } -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = NULL; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 987 "FSpotMetaTable.c" - } -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp32_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp33_ = stmt; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp32_, _tmp33_, &_tmp34_, 0); -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (row); -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - row = _tmp34_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp35_ = row; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp36_ = _tmp35_->data; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp37_ = g_strdup (_tmp36_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp37_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (row); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _sqlite3_finalize0 (stmt); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (sql); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (column_list); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - columns = (_vala_array_free (columns, columns_length1, (GDestroyNotify) g_free), NULL); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1019 "FSpotMetaTable.c" -} - - -gchar* data_imports_fspot_db_fspot_meta_table_get_app_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error) { - gchar* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - gchar* _tmp2_; - GError * _inner_error_ = NULL; -#line 65 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE (self), NULL); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_meta_table_get_data (self, "F-Spot Version", &_inner_error_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = _tmp1_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 1043 "FSpotMetaTable.c" - } else { -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 1051 "FSpotMetaTable.c" - } - } -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = _tmp0_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = NULL; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp2_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_tmp0_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1064 "FSpotMetaTable.c" -} - - -gchar* data_imports_fspot_db_fspot_meta_table_get_db_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error) { - gchar* result = NULL; - gchar* _tmp0_ = NULL; - gchar* _tmp1_; - gchar* _tmp2_; - GError * _inner_error_ = NULL; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE (self), NULL); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_meta_table_get_data (self, "F-Spot Database Version", &_inner_error_); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = _tmp1_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 1088 "FSpotMetaTable.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return NULL; -#line 1096 "FSpotMetaTable.c" - } - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = _tmp0_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = NULL; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp2_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_tmp0_); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1109 "FSpotMetaTable.c" -} - - -static gint64 int64_parse (const gchar* str) { - gint64 result = 0LL; - const gchar* _tmp0_; - gint64 _tmp1_; -#line 687 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (str != NULL, 0LL); -#line 688 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 688 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = g_ascii_strtoll (_tmp0_, NULL, (guint) 0); -#line 688 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 688 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 1127 "FSpotMetaTable.c" -} - - -gint64 data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (DataImportsFSpotDbFSpotMetaTable* self, GError** error) { - gint64 result = 0LL; - gchar* id_str = NULL; - gchar* _tmp0_; - GError * _inner_error_ = NULL; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE (self), 0LL); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_meta_table_get_data (self, "Hidden Tag Id", &_inner_error_); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - id_str = _tmp0_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 1146 "FSpotMetaTable.c" - gint64 _tmp1_ = 0LL; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_propagate_error (error, _inner_error_); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return _tmp1_; -#line 1152 "FSpotMetaTable.c" - } else { - gint64 _tmp2_ = 0LL; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_clear_error (&_inner_error_); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return _tmp2_; -#line 1161 "FSpotMetaTable.c" - } - } -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (id_str != NULL) { -#line 1166 "FSpotMetaTable.c" - gint64 _tmp3_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3_ = int64_parse (id_str); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp3_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (id_str); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1176 "FSpotMetaTable.c" - } else { -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = (gint64) -1; -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (id_str); -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1184 "FSpotMetaTable.c" - } -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (id_str); -#line 1188 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_table_class_init (DataImportsFSpotDbFSpotMetaTableClass * klass) { -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_meta_table_parent_class = g_type_class_peek_parent (klass); -#line 1195 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_table_instance_init (DataImportsFSpotDbFSpotMetaTable * self) { -} - - -/** - * This class represents the F-Spot meta table, which stores some essential - * meta-data for the whole database. It is implemented as a simple dictionary - * where each row in the table is a key/value pair. - * - * The meta table implementation is the only one that throws a database error - * if something goes wrong because: - * * it is essential to read the content of that table in order to identify - * the version of the database and select the correct behavior, - * * this table is read at the very beginning of the process so any failure - * will occur immediately, - * * failing to read this table means that there is no point in reading the - * attempting to read the rest of the database so we might as well abort. - */ -GType data_imports_fspot_db_fspot_meta_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_meta_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_meta_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotMetaTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_meta_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotMetaTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_meta_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_meta_table_type_id; - data_imports_fspot_db_fspot_meta_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotMetaTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_meta_table_type_id__volatile, data_imports_fspot_db_fspot_meta_table_type_id); - } - return data_imports_fspot_db_fspot_meta_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotMetaBehavior * self = NULL; -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = (DataImportsFSpotDbFSpotMetaBehavior*) g_object_new (object_type, NULL); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return self; -#line 1235 "FSpotMetaTable.c" -} - - -static DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_new (void) { -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return data_imports_fspot_db_fspot_meta_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR); -#line 1242 "FSpotMetaTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return self ? g_object_ref (self) : NULL; -#line 1249 "FSpotMetaTable.c" -} - - -DataImportsFSpotDbFSpotMetaBehavior* data_imports_fspot_db_fspot_meta_behavior_get_instance (void) { - DataImportsFSpotDbFSpotMetaBehavior* result = NULL; - DataImportsFSpotDbFSpotMetaBehavior* _tmp0_; - DataImportsFSpotDbFSpotMetaBehavior* _tmp2_; - DataImportsFSpotDbFSpotMetaBehavior* _tmp3_; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_meta_behavior_instance; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (_tmp0_ == NULL) { -#line 1262 "FSpotMetaTable.c" - DataImportsFSpotDbFSpotMetaBehavior* _tmp1_; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_meta_behavior_new (); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_meta_behavior_instance); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_meta_behavior_instance = _tmp1_; -#line 1270 "FSpotMetaTable.c" - } -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_meta_behavior_instance; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp3_; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1280 "FSpotMetaTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_meta_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotMetaBehavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehavior); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_META_BEHAVIOR_TABLE_NAME); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp0_; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1296 "FSpotMetaTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_meta_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotMetaBehavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint _tmp3__length1; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehavior); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = g_strdup ("name"); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = g_strdup ("data"); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = g_new0 (gchar*, 2 + 1); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_[0] = _tmp0_; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_[1] = _tmp1_; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3_ = _tmp2_; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3__length1 = 2; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (result_length1) { -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - *result_length1 = _tmp3__length1; -#line 1328 "FSpotMetaTable.c" - } -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - result = _tmp3_; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - return result; -#line 1334 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotMetaRow* * row, gint offset) { - DataImportsFSpotDbFSpotMetaBehavior * self; - DataImportsFSpotDbFSpotMetaRow* _vala_row = NULL; - DataImportsFSpotDbFSpotMetaRow* _tmp0_; - sqlite3_stmt* _tmp1_; - gint _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - sqlite3_stmt* _tmp5_; - gint _tmp6_; - const gchar* _tmp7_; - gchar* _tmp8_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehavior); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - g_return_if_fail (stmt != NULL); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_meta_row_new (); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (_vala_row); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _vala_row = _tmp0_; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp1_ = stmt; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp2_ = offset; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp3_ = sqlite3_column_text (_tmp1_, _tmp2_ + 0); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp4_ = g_strdup (_tmp3_); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_vala_row->name); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _vala_row->name = _tmp4_; -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp5_ = stmt; -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp6_ = offset; -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp7_ = sqlite3_column_text (_tmp5_, _tmp6_ + 1); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _tmp8_ = g_strdup (_tmp7_); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_free0 (_vala_row->data); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _vala_row->data = _tmp8_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - if (row) { -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - *row = _vala_row; -#line 1388 "FSpotMetaTable.c" - } else { -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - _g_object_unref0 (_vala_row); -#line 1392 "FSpotMetaTable.c" - } -} - - -static void data_imports_fspot_db_fspot_meta_behavior_class_init (DataImportsFSpotDbFSpotMetaBehaviorClass * klass) { -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_meta_behavior_parent_class = g_type_class_peek_parent (klass); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_meta_behavior_finalize; -#line 1402 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - data_imports_fspot_db_fspot_meta_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_meta_behavior_real_get_table_name; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_meta_behavior_real_list_columns; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_meta_behavior_real_build_row; -#line 1415 "FSpotMetaTable.c" -} - - -static void data_imports_fspot_db_fspot_meta_behavior_instance_init (DataImportsFSpotDbFSpotMetaBehavior * self) { -} - - -static void data_imports_fspot_db_fspot_meta_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotMetaBehavior * self; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_BEHAVIOR, DataImportsFSpotDbFSpotMetaBehavior); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotMetaTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_meta_behavior_parent_class)->finalize (obj); -#line 1429 "FSpotMetaTable.c" -} - - -GType data_imports_fspot_db_fspot_meta_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_meta_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_meta_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotMetaBehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_meta_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotMetaBehavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_meta_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_meta_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_meta_behavior_type_id; - data_imports_fspot_db_fspot_meta_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotMetaBehavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_meta_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_meta_behavior_type_id__volatile, data_imports_fspot_db_fspot_meta_behavior_type_id); - } - return data_imports_fspot_db_fspot_meta_behavior_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff --git a/plugins/shotwell-data-imports/FSpotMetaTable.vala b/plugins/shotwell-data-imports/FSpotMetaTable.vala deleted file mode 100644 index e28d2e6..0000000 --- a/plugins/shotwell-data-imports/FSpotMetaTable.vala +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "meta" table, representing a single database row. - */ -public class FSpotMetaRow : Object { - // ignore the ID - public string name; - public string data; -} - -/** - * This class represents the F-Spot meta table, which stores some essential - * meta-data for the whole database. It is implemented as a simple dictionary - * where each row in the table is a key/value pair. - * - * The meta table implementation is the only one that throws a database error - * if something goes wrong because: - * * it is essential to read the content of that table in order to identify - * the version of the database and select the correct behavior, - * * this table is read at the very beginning of the process so any failure - * will occur immediately, - * * failing to read this table means that there is no point in reading the - * attempting to read the rest of the database so we might as well abort. - */ -public class FSpotMetaTable : FSpotDatabaseTable<FSpotMetaRow> { - - public FSpotMetaTable(Sqlite.Database db) { - base(db); - set_behavior(FSpotMetaBehavior.get_instance()); - } - - public string? get_data(string name) throws DatabaseError { - string[] columns = behavior.list_columns(); - string column_list = string.joinv(", ", columns); - string sql = "SELECT %s FROM %s WHERE name=?".printf(column_list, table_name); - Sqlite.Statement stmt; - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.bind_text(1, name); - if (res != Sqlite.OK) - throw_error("Bind failed for name %s".printf(name), res); - - res = stmt.step(); - if (res != Sqlite.ROW) { - if (res != Sqlite.DONE) - throw_error("FSpotMetaTable.get_data", res); - - return null; - } - - FSpotMetaRow row; - behavior.build_row(stmt, out row); - return row.data; - } - - public string? get_app_version() throws DatabaseError { - return get_data("F-Spot Version"); - } - - public string? get_db_version() throws DatabaseError { - return get_data("F-Spot Database Version"); - } - - public int64 get_hidden_tag_id() throws DatabaseError { - string id_str = get_data("Hidden Tag Id"); - if(id_str != null) { - return int64.parse(id_str); - } else { - return -1; - } - } -} - -public class FSpotMetaBehavior : FSpotTableBehavior<FSpotMetaRow>, Object { - public const string TABLE_NAME = "Meta"; - - private static FSpotMetaBehavior instance; - - private FSpotMetaBehavior() { - } - - public static FSpotMetaBehavior get_instance() { - if (instance == null) - instance = new FSpotMetaBehavior(); - return instance; - } - - public string get_table_name() { - return TABLE_NAME; - } - - public string[] list_columns() { - return { "name", "data" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotMetaRow row, int offset = 0) { - row = new FSpotMetaRow(); - row.name = stmt.column_text(offset + 0); - row.data = stmt.column_text(offset + 1); - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotPhotoTagsTable.c b/plugins/shotwell-data-imports/FSpotPhotoTagsTable.c deleted file mode 100644 index 8865ca1..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotoTagsTable.c +++ /dev/null @@ -1,524 +0,0 @@ -/* FSpotPhotoTagsTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotPhotoTagsTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW (data_imports_fspot_db_fspot_photo_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagRow DataImportsFSpotDbFSpotPhotoTagRow; -typedef struct _DataImportsFSpotDbFSpotPhotoTagRowClass DataImportsFSpotDbFSpotPhotoTagRowClass; -typedef struct _DataImportsFSpotDbFSpotPhotoTagRowPrivate DataImportsFSpotDbFSpotPhotoTagRowPrivate; - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE (data_imports_fspot_db_fspot_photo_tags_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE, DataImportsFSpotDbFSpotPhotoTagsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE, DataImportsFSpotDbFSpotPhotoTagsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE, DataImportsFSpotDbFSpotPhotoTagsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagsTable DataImportsFSpotDbFSpotPhotoTagsTable; -typedef struct _DataImportsFSpotDbFSpotPhotoTagsTableClass DataImportsFSpotDbFSpotPhotoTagsTableClass; -typedef struct _DataImportsFSpotDbFSpotPhotoTagsTablePrivate DataImportsFSpotDbFSpotPhotoTagsTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagsV0Behavior DataImportsFSpotDbFSpotPhotoTagsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoTagsV0BehaviorPrivate DataImportsFSpotDbFSpotPhotoTagsV0BehaviorPrivate; - -struct _DataImportsFSpotDbFSpotPhotoTagRow { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoTagRowPrivate * priv; - gint64 photo_id; - gint64 tag_id; -}; - -struct _DataImportsFSpotDbFSpotPhotoTagRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoTagsTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotPhotoTagsTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoTagsTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoTagsV0Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoTagsV0BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_photo_tag_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photo_tags_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photo_tags_v0_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance; -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_photo_tag_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotPhotoTagRow* data_imports_fspot_db_fspot_photo_tag_row_new (void); -DataImportsFSpotDbFSpotPhotoTagRow* data_imports_fspot_db_fspot_photo_tag_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_photo_tag_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_tags_table_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_TABLE_NAME "Photo_Tags" -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoTagsTable* data_imports_fspot_db_fspot_photo_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotoTagsTable* data_imports_fspot_db_fspot_photo_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -GType data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_V0_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoTagRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_finalize (GObject * obj); - - -DataImportsFSpotDbFSpotPhotoTagRow* data_imports_fspot_db_fspot_photo_tag_row_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoTagRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoTagRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return self; -#line 205 "FSpotPhotoTagsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoTagRow* data_imports_fspot_db_fspot_photo_tag_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return data_imports_fspot_db_fspot_photo_tag_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW); -#line 212 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tag_row_class_init (DataImportsFSpotDbFSpotPhotoTagRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_photo_tag_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_tag_row_finalize; -#line 221 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tag_row_instance_init (DataImportsFSpotDbFSpotPhotoTagRow * self) { -} - - -static void data_imports_fspot_db_fspot_photo_tag_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoTagRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRow); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_tag_row_parent_class)->finalize (obj); -#line 235 "FSpotPhotoTagsTable.c" -} - - -/** - * The value object for the "photo_tags" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_photo_tag_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_tag_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_tag_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoTagRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_tag_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoTagRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_tag_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photo_tag_row_type_id; - data_imports_fspot_db_fspot_photo_tag_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoTagRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_tag_row_type_id__volatile, data_imports_fspot_db_fspot_photo_tag_row_type_id); - } - return data_imports_fspot_db_fspot_photo_tag_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotPhotoTagsTable* data_imports_fspot_db_fspot_photo_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { - DataImportsFSpotDbFSpotPhotoTagsTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp0_ = db; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoTagsTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp1_ = db_behavior; -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (_tmp1_); -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp3_ = _tmp2_; -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_); -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _g_object_unref0 (_tmp3_); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return self; -#line 280 "FSpotPhotoTagsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoTagsTable* data_imports_fspot_db_fspot_photo_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return data_imports_fspot_db_fspot_photo_tags_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_TABLE, db, db_behavior); -#line 287 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tags_table_class_init (DataImportsFSpotDbFSpotPhotoTagsTableClass * klass) { -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_photo_tags_table_parent_class = g_type_class_peek_parent (klass); -#line 294 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tags_table_instance_init (DataImportsFSpotDbFSpotPhotoTagsTable * self) { -} - - -/** - * This class represents the F-Spot photo_tags table. - */ -GType data_imports_fspot_db_fspot_photo_tags_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_tags_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_tags_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoTagsTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_tags_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoTagsTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_tags_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photo_tags_table_type_id; - data_imports_fspot_db_fspot_photo_tags_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotPhotoTagsTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_tags_table_type_id__volatile, data_imports_fspot_db_fspot_photo_tags_table_type_id); - } - return data_imports_fspot_db_fspot_photo_tags_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self = NULL; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoTagsV0Behavior*) g_object_new (object_type, NULL); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return self; -#line 323 "FSpotPhotoTagsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_new (void) { -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return data_imports_fspot_db_fspot_photo_tags_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR); -#line 330 "FSpotPhotoTagsTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return self ? g_object_ref (self) : NULL; -#line 337 "FSpotPhotoTagsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoTagsV0Behavior* data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp3_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - if (_tmp0_ == NULL) { -#line 350 "FSpotPhotoTagsTable.c" - DataImportsFSpotDbFSpotPhotoTagsV0Behavior* _tmp1_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_tags_v0_behavior_new (); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance = _tmp1_; -#line 358 "FSpotPhotoTagsTable.c" - } -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - result = _tmp3_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return result; -#line 368 "FSpotPhotoTagsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAGS_TABLE_TABLE_NAME); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - result = _tmp0_; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return result; -#line 384 "FSpotPhotoTagsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint _tmp3__length1; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp1_ = g_strdup ("tag_id"); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_ = g_new0 (gchar*, 2 + 1); -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_[0] = _tmp0_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_[1] = _tmp1_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp3_ = _tmp2_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp3__length1 = 2; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - if (result_length1) { -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - *result_length1 = _tmp3__length1; -#line 416 "FSpotPhotoTagsTable.c" - } -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - result = _tmp3_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - return result; -#line 422 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoTagRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self; - DataImportsFSpotDbFSpotPhotoTagRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoTagRow* _tmp0_; - sqlite3_stmt* _tmp1_; - gint _tmp2_; - gint64 _tmp3_; - sqlite3_stmt* _tmp4_; - gint _tmp5_; - gint64 _tmp6_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - g_return_if_fail (stmt != NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_tag_row_new (); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _g_object_unref0 (_vala_row); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _vala_row = _tmp0_; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp1_ = stmt; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp2_ = offset; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp3_ = sqlite3_column_int64 (_tmp1_, _tmp2_ + 0); -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _vala_row->photo_id = _tmp3_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp4_ = stmt; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp5_ = offset; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _tmp6_ = sqlite3_column_int64 (_tmp4_, _tmp5_ + 1); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _vala_row->tag_id = _tmp6_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - if (row) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - *row = _vala_row; -#line 466 "FSpotPhotoTagsTable.c" - } else { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - _g_object_unref0 (_vala_row); -#line 470 "FSpotPhotoTagsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_class_init (DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass * klass) { -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_photo_tags_v0_behavior_parent_class = g_type_class_peek_parent (klass); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_tags_v0_behavior_finalize; -#line 480 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - data_imports_fspot_db_fspot_photo_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_get_table_name; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_list_columns; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_tags_v0_behavior_real_build_row; -#line 493 "FSpotPhotoTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance_init (DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_tags_v0_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoTagsV0Behavior * self; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoTagsV0Behavior); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_tags_v0_behavior_parent_class)->finalize (obj); -#line 507 "FSpotPhotoTagsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_tags_v0_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoTagsV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_tags_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoTagsV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_tags_v0_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id; - data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoTagsV0Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_tags_v0_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala b/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala deleted file mode 100644 index afc67ec..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotoTagsTable.vala +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "photo_tags" table, representing a single database row. - */ -public class FSpotPhotoTagRow : Object { - public int64 photo_id; - public int64 tag_id; -} - -/** - * This class represents the F-Spot photo_tags table. - */ -public class FSpotPhotoTagsTable : FSpotDatabaseTable<FSpotPhotoTagRow> { - public const string TABLE_NAME = "Photo_Tags"; - - public FSpotPhotoTagsTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) { - base(db); - set_behavior(db_behavior.get_photo_tags_behavior()); - } -} - -public class FSpotPhotoTagsV0Behavior : FSpotTableBehavior<FSpotPhotoTagRow>, Object { - private static FSpotPhotoTagsV0Behavior instance; - - private FSpotPhotoTagsV0Behavior() { - } - - public static FSpotPhotoTagsV0Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoTagsV0Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoTagsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "tag_id" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoTagRow row, int offset = 0) { - row = new FSpotPhotoTagRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.tag_id = stmt.column_int64(offset + 1); - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.c b/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.c deleted file mode 100644 index d7b9079..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.c +++ /dev/null @@ -1,2440 +0,0 @@ -/* FSpotPhotoVersionsTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotPhotoVersionsTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gio/gio.h> -#include <sqlite3.h> -#include <gee.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW (data_imports_fspot_db_fspot_photo_version_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRow DataImportsFSpotDbFSpotPhotoVersionRow; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRowClass DataImportsFSpotDbFSpotPhotoVersionRowClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionRowPrivate DataImportsFSpotDbFSpotPhotoVersionRowPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE (data_imports_fspot_db_fspot_photo_versions_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTable DataImportsFSpotDbFSpotPhotoVersionsTable; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTableClass DataImportsFSpotDbFSpotPhotoVersionsTableClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTablePrivate DataImportsFSpotDbFSpotPhotoVersionsTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV0Behavior DataImportsFSpotDbFSpotPhotoVersionsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorPrivate DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV9Behavior DataImportsFSpotDbFSpotPhotoVersionsV9Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorPrivate DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV16Behavior DataImportsFSpotDbFSpotPhotoVersionsV16Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorPrivate DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV17Behavior DataImportsFSpotDbFSpotPhotoVersionsV17Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorPrivate DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR (data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV18Behavior DataImportsFSpotDbFSpotPhotoVersionsV18Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorPrivate DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorPrivate; - -struct _DataImportsFSpotDbFSpotPhotoVersionRow { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionRowPrivate * priv; - gint64 photo_id; - gint64 version_id; - gchar* name; - GFile* base_path; - gchar* filename; - gchar* md5_sum; - gboolean is_protected; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotDbFSpotPhotoVersionsV0Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV9Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV16Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV17Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV18Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_photo_version_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_v0_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance; -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_versions_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_v9_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance; -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_versions_v9_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_v16_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance; -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_versions_v16_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_v17_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance; -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_versions_v17_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photo_versions_v18_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance; -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photo_versions_v18_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_photo_version_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSION_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotPhotoVersionRow* data_imports_fspot_db_fspot_photo_version_row_new (void); -DataImportsFSpotDbFSpotPhotoVersionRow* data_imports_fspot_db_fspot_photo_version_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_photo_version_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_versions_table_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME "Photo_versions" -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_versions_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -GQuark database_error_quark (void); -GeeArrayList* data_imports_fspot_db_fspot_photo_versions_table_get_by_photo_id (DataImportsFSpotDbFSpotPhotoVersionsTable* self, gint64 photo_id, GError** error); -gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -GType data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_new (void); -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_finalize (GObject * obj); - - -DataImportsFSpotDbFSpotPhotoVersionRow* data_imports_fspot_db_fspot_photo_version_row_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 368 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionRow* data_imports_fspot_db_fspot_photo_version_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_version_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW); -#line 375 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_version_row_class_init (DataImportsFSpotDbFSpotPhotoVersionRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_version_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_version_row_finalize; -#line 384 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_version_row_instance_init (DataImportsFSpotDbFSpotPhotoVersionRow * self) { -} - - -static void data_imports_fspot_db_fspot_photo_version_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, DataImportsFSpotDbFSpotPhotoVersionRow); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (self->name); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (self->base_path); -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (self->filename); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (self->md5_sum); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_version_row_parent_class)->finalize (obj); -#line 406 "FSpotPhotoVersionsTable.c" -} - - -/** - * The value object for the "photo_versions" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_photo_version_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_version_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_version_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_version_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_version_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photo_version_row_type_id; - data_imports_fspot_db_fspot_photo_version_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_version_row_type_id__volatile, data_imports_fspot_db_fspot_photo_version_row_type_id); - } - return data_imports_fspot_db_fspot_photo_version_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { - DataImportsFSpotDbFSpotPhotoVersionsTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = db; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = db_behavior; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_photo_versions_behavior (_tmp1_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _tmp2_; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp3_); -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 451 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, db, db_behavior); -#line 458 "FSpotPhotoVersionsTable.c" -} - - -GeeArrayList* data_imports_fspot_db_fspot_photo_versions_table_get_by_photo_id (DataImportsFSpotDbFSpotPhotoVersionsTable* self, gint64 photo_id, GError** error) { - GeeArrayList* result = NULL; - GeeArrayList* rows = NULL; - GeeArrayList* _tmp0_; - sqlite3_stmt* stmt = NULL; - gchar* column_list = NULL; - gchar* _tmp1_; - gchar* sql = NULL; - const gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gint res = 0; - sqlite3* _tmp5_; - const gchar* _tmp6_; - sqlite3_stmt* _tmp7_ = NULL; - gint _tmp8_; - gint _tmp9_; - sqlite3_stmt* _tmp14_; - gint64 _tmp15_; - gint _tmp16_; - gint _tmp17_; - sqlite3_stmt* _tmp19_; - gint _tmp20_; - GError * _inner_error_ = NULL; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE (self), NULL); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSION_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - rows = _tmp0_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), FALSE); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - column_list = _tmp1_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = column_list; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_strdup_printf ("SELECT %s FROM %s WHERE photo_id=?", _tmp2_, _tmp3_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - sql = _tmp4_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = sql; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_prepare_v2 (_tmp5_, _tmp6_, -1, &_tmp7_, NULL); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - stmt = _tmp7_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - res = _tmp8_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = res; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp9_ != SQLITE_OK) { -#line 520 "FSpotPhotoVersionsTable.c" - const gchar* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - gint _tmp13_; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = sql; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = g_strdup_printf ("Statement failed: %s", _tmp10_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = _tmp11_; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = res; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - importable_database_table_throw_error (_tmp12_, _tmp13_, &_inner_error_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp12_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_propagate_error (error, _inner_error_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (sql); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (column_list); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (rows); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return NULL; -#line 553 "FSpotPhotoVersionsTable.c" - } else { -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (sql); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (column_list); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (rows); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_clear_error (&_inner_error_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return NULL; -#line 569 "FSpotPhotoVersionsTable.c" - } - } - } -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = photo_id; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_bind_int64 (_tmp14_, 1, _tmp15_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - res = _tmp16_; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = res; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp17_ != SQLITE_OK) { -#line 585 "FSpotPhotoVersionsTable.c" - gint _tmp18_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = res; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - importable_database_table_throw_error ("Bind failed for photo_id", _tmp18_, &_inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_propagate_error (error, _inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (rows); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return NULL; -#line 607 "FSpotPhotoVersionsTable.c" - } else { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (rows); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_clear_error (&_inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return NULL; -#line 623 "FSpotPhotoVersionsTable.c" - } - } - } -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = stmt; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = sqlite3_step (_tmp19_); -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - res = _tmp20_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - while (TRUE) { -#line 635 "FSpotPhotoVersionsTable.c" - gint _tmp21_; - DataImportsFSpotDbFSpotPhotoVersionRow* row = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp22_; - sqlite3_stmt* _tmp23_; - gpointer _tmp24_ = NULL; - GeeArrayList* _tmp25_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = res; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (!(_tmp21_ == SQLITE_ROW)) { -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - break; -#line 651 "FSpotPhotoVersionsTable.c" - } -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = stmt; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp22_, _tmp23_, &_tmp24_, 0); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (row); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - row = _tmp24_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = rows; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = row; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp26_); -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = stmt; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = sqlite3_step (_tmp27_); -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - res = _tmp28_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (row); -#line 677 "FSpotPhotoVersionsTable.c" - } -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = rows; -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (sql); -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (column_list); -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _sqlite3_finalize0 (stmt); -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 689 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_table_class_init (DataImportsFSpotDbFSpotPhotoVersionsTableClass * klass) { -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_table_parent_class = g_type_class_peek_parent (klass); -#line 696 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_table_instance_init (DataImportsFSpotDbFSpotPhotoVersionsTable * self) { -} - - -/** - * This class represents the F-Spot photo_versions table. - */ -GType data_imports_fspot_db_fspot_photo_versions_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photo_versions_table_type_id; - data_imports_fspot_db_fspot_photo_versions_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotPhotoVersionsTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_table_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_table_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self = NULL; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsV0Behavior*) g_object_new (object_type, NULL); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 725 "FSpotPhotoVersionsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_new (void) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR); -#line 732 "FSpotPhotoVersionsTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self ? g_object_ref (self) : NULL; -#line 739 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp3_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp0_ == NULL) { -#line 752 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior* _tmp1_; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_versions_v0_behavior_new (); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance = _tmp1_; -#line 760 "FSpotPhotoVersionsTable.c" - } -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp3_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 770 "FSpotPhotoVersionsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior); -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME); -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp0_; -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 786 "FSpotPhotoVersionsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar** _tmp4_; - gchar** _tmp5_; - gint _tmp5__length1; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = g_strdup ("version_id"); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = g_strdup ("name"); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = g_strdup ("uri"); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_new0 (gchar*, 4 + 1); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_[0] = _tmp0_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_[1] = _tmp1_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_[2] = _tmp2_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_[3] = _tmp3_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _tmp4_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5__length1 = 4; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (result_length1) { -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *result_length1 = _tmp5__length1; -#line 828 "FSpotPhotoVersionsTable.c" - } -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp5_; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 834 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self; - DataImportsFSpotDbFSpotPhotoVersionRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp9_; - sqlite3_stmt* _tmp10_; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp27_; - gchar* _tmp28_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp29_; -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior); -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_if_fail (stmt != NULL); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_version_row_new (); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _vala_row = _tmp0_; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = _vala_row; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = stmt; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = offset; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _vala_row; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = stmt; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = offset; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_->version_id = _tmp8_; -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = _vala_row; -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = stmt; -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = offset; -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = sqlite3_column_text (_tmp10_, _tmp11_ + 2); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp9_->name); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_->name = _tmp13_; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = offset; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_column_text (_tmp14_, _tmp15_ + 3); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = g_strdup (_tmp16_); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - full_path = _tmp17_; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = full_path; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp18_ != NULL) { -#line 922 "FSpotPhotoVersionsTable.c" - GFile* uri = NULL; - const gchar* _tmp19_; - GFile* _tmp20_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp21_; - GFile* _tmp22_; - GFile* _tmp23_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp24_; - GFile* _tmp25_; - gchar* _tmp26_; -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = full_path; -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = g_file_new_for_uri (_tmp19_); -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - uri = _tmp20_; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = _vala_row; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = uri; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = g_file_get_parent (_tmp22_); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp21_->base_path); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_->base_path = _tmp23_; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_ = _vala_row; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = uri; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = g_file_get_basename (_tmp25_); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp24_->filename); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_->filename = _tmp26_; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (uri); -#line 960 "FSpotPhotoVersionsTable.c" - } -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = _vala_row; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = g_strdup (""); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp27_->md5_sum); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_->md5_sum = _tmp28_; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_ = _vala_row; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_->is_protected = FALSE; -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (full_path); -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (row) { -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *row = _vala_row; -#line 980 "FSpotPhotoVersionsTable.c" - } else { -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 984 "FSpotPhotoVersionsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_class_init (DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass * klass) { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v0_behavior_parent_class = g_type_class_peek_parent (klass); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_versions_v0_behavior_finalize; -#line 994 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_get_table_name; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_list_columns; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_versions_v0_behavior_real_build_row; -#line 1007 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance_init (DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_versions_v0_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionsV0Behavior * self; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV0Behavior); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_versions_v0_behavior_parent_class)->finalize (obj); -#line 1021 "FSpotPhotoVersionsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_versions_v0_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_v0_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_versions_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id; - data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionsV0Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_v0_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self = NULL; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsV9Behavior*) g_object_new (object_type, NULL); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 1045 "FSpotPhotoVersionsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_new (void) { -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_v9_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR); -#line 1052 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp3_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp0_ == NULL) { -#line 1065 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior* _tmp1_; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_versions_v9_behavior_new (); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance = _tmp1_; -#line 1073 "FSpotPhotoVersionsTable.c" - } -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp3_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1083 "FSpotPhotoVersionsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior); -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME); -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp0_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1099 "FSpotPhotoVersionsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar** _tmp5_; - gchar** _tmp6_; - gint _tmp6__length1; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = g_strdup ("version_id"); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = g_strdup ("name"); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = g_strdup ("uri"); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_strdup ("protected"); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = g_new0 (gchar*, 5 + 1); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_[0] = _tmp0_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_[1] = _tmp1_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_[2] = _tmp2_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_[3] = _tmp3_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_[4] = _tmp4_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = _tmp5_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6__length1 = 5; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (result_length1) { -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *result_length1 = _tmp6__length1; -#line 1146 "FSpotPhotoVersionsTable.c" - } -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp6_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1152 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self; - DataImportsFSpotDbFSpotPhotoVersionRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp9_; - sqlite3_stmt* _tmp10_; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp27_; - gchar* _tmp28_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp29_; - sqlite3_stmt* _tmp30_; - gint _tmp31_; - gint _tmp32_; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_if_fail (stmt != NULL); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_version_row_new (); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _vala_row = _tmp0_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = _vala_row; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = stmt; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = offset; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _vala_row; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = stmt; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = offset; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_->version_id = _tmp8_; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = _vala_row; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = stmt; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = offset; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = sqlite3_column_text (_tmp10_, _tmp11_ + 2); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp9_->name); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_->name = _tmp13_; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = offset; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_column_text (_tmp14_, _tmp15_ + 3); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = g_strdup (_tmp16_); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - full_path = _tmp17_; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = full_path; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp18_ != NULL) { -#line 1243 "FSpotPhotoVersionsTable.c" - GFile* uri = NULL; - const gchar* _tmp19_; - GFile* _tmp20_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp21_; - GFile* _tmp22_; - GFile* _tmp23_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp24_; - GFile* _tmp25_; - gchar* _tmp26_; -#line 136 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = full_path; -#line 136 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = g_file_new_for_uri (_tmp19_); -#line 136 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - uri = _tmp20_; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = _vala_row; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = uri; -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = g_file_get_parent (_tmp22_); -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp21_->base_path); -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_->base_path = _tmp23_; -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_ = _vala_row; -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = uri; -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = g_file_get_basename (_tmp25_); -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp24_->filename); -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_->filename = _tmp26_; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (uri); -#line 1281 "FSpotPhotoVersionsTable.c" - } -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = _vala_row; -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = g_strdup (""); -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp27_->md5_sum); -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_->md5_sum = _tmp28_; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_ = _vala_row; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp30_ = stmt; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_ = offset; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp32_ = sqlite3_column_int (_tmp30_, _tmp31_ + 4); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_->is_protected = _tmp32_ > 0; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (full_path); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (row) { -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *row = _vala_row; -#line 1307 "FSpotPhotoVersionsTable.c" - } else { -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 1311 "FSpotPhotoVersionsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_class_init (DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass * klass) { -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v9_behavior_parent_class = g_type_class_peek_parent (klass); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_versions_v9_behavior_finalize; -#line 1321 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v9_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_get_table_name; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_list_columns; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_versions_v9_behavior_real_build_row; -#line 1334 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance_init (DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_versions_v9_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionsV9Behavior * self; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V9_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV9Behavior); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_versions_v9_behavior_parent_class)->finalize (obj); -#line 1348 "FSpotPhotoVersionsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_versions_v9_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsV9BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_v9_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsV9Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_v9_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_versions_v9_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id; - data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionsV9Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_v9_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self = NULL; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsV16Behavior*) g_object_new (object_type, NULL); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 1372 "FSpotPhotoVersionsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_new (void) { -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_v16_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR); -#line 1379 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp3_; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp0_ == NULL) { -#line 1392 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior* _tmp1_; -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_versions_v16_behavior_new (); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance = _tmp1_; -#line 1400 "FSpotPhotoVersionsTable.c" - } -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance; -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp3_; -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1410 "FSpotPhotoVersionsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp0_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1426 "FSpotPhotoVersionsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar** _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = g_strdup ("version_id"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = g_strdup ("name"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = g_strdup ("uri"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_strdup ("md5_sum"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = g_strdup ("protected"); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = g_new0 (gchar*, 6 + 1); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[0] = _tmp0_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[1] = _tmp1_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[2] = _tmp2_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[3] = _tmp3_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[4] = _tmp4_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_[5] = _tmp5_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = _tmp6_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7__length1 = 6; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (result_length1) { -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *result_length1 = _tmp7__length1; -#line 1478 "FSpotPhotoVersionsTable.c" - } -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp7_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1484 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self; - DataImportsFSpotDbFSpotPhotoVersionRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp9_; - sqlite3_stmt* _tmp10_; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp27_; - sqlite3_stmt* _tmp28_; - gint _tmp29_; - const gchar* _tmp30_; - gchar* _tmp31_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp32_; - sqlite3_stmt* _tmp33_; - gint _tmp34_; - gint _tmp35_; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_if_fail (stmt != NULL); -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_version_row_new (); -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _vala_row = _tmp0_; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = _vala_row; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = stmt; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = offset; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _vala_row; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = stmt; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = offset; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_->version_id = _tmp8_; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = _vala_row; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = stmt; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = offset; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = sqlite3_column_text (_tmp10_, _tmp11_ + 2); -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp9_->name); -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_->name = _tmp13_; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = offset; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_column_text (_tmp14_, _tmp15_ + 3); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = g_strdup (_tmp16_); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - full_path = _tmp17_; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = full_path; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp18_ != NULL) { -#line 1578 "FSpotPhotoVersionsTable.c" - GFile* uri = NULL; - const gchar* _tmp19_; - GFile* _tmp20_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp21_; - GFile* _tmp22_; - GFile* _tmp23_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp24_; - GFile* _tmp25_; - gchar* _tmp26_; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = full_path; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = g_file_new_for_uri (_tmp19_); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - uri = _tmp20_; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = _vala_row; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = uri; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = g_file_get_parent (_tmp22_); -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp21_->base_path); -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_->base_path = _tmp23_; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_ = _vala_row; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = uri; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = g_file_get_basename (_tmp25_); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp24_->filename); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_->filename = _tmp26_; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (uri); -#line 1616 "FSpotPhotoVersionsTable.c" - } -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = _vala_row; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = stmt; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_ = offset; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp30_ = sqlite3_column_text (_tmp28_, _tmp29_ + 4); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_ = g_strdup (_tmp30_); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp27_->md5_sum); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_->md5_sum = _tmp31_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp32_ = _vala_row; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp33_ = stmt; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp34_ = offset; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp35_ = sqlite3_column_int (_tmp33_, _tmp34_ + 5); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp32_->is_protected = _tmp35_ > 0; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (full_path); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (row) { -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *row = _vala_row; -#line 1648 "FSpotPhotoVersionsTable.c" - } else { -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 1652 "FSpotPhotoVersionsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_class_init (DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass * klass) { -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v16_behavior_parent_class = g_type_class_peek_parent (klass); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_versions_v16_behavior_finalize; -#line 1662 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v16_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_get_table_name; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_list_columns; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_versions_v16_behavior_real_build_row; -#line 1675 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance_init (DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_versions_v16_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionsV16Behavior * self; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV16Behavior); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_versions_v16_behavior_parent_class)->finalize (obj); -#line 1689 "FSpotPhotoVersionsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_versions_v16_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsV16BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_v16_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsV16Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_v16_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_versions_v16_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id; - data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionsV16Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_v16_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self = NULL; -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsV17Behavior*) g_object_new (object_type, NULL); -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 1713 "FSpotPhotoVersionsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_new (void) { -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_v17_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR); -#line 1720 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp3_; -#line 197 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance; -#line 197 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp0_ == NULL) { -#line 1733 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior* _tmp1_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_versions_v17_behavior_new (); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance = _tmp1_; -#line 1741 "FSpotPhotoVersionsTable.c" - } -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp3_; -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1751 "FSpotPhotoVersionsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior); -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME); -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp0_; -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1767 "FSpotPhotoVersionsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint _tmp8__length1; -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = g_strdup ("version_id"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = g_strdup ("name"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = g_strdup ("base_uri"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_strdup ("filename"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = g_strdup ("md5_sum"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = g_strdup ("protected"); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = g_new0 (gchar*, 7 + 1); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[0] = _tmp0_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[1] = _tmp1_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[2] = _tmp2_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[3] = _tmp3_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[4] = _tmp4_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[5] = _tmp5_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[6] = _tmp6_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = _tmp7_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8__length1 = 7; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (result_length1) { -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *result_length1 = _tmp8__length1; -#line 1824 "FSpotPhotoVersionsTable.c" - } -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp8_; -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 1830 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self; - DataImportsFSpotDbFSpotPhotoVersionRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp9_; - sqlite3_stmt* _tmp10_; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - gchar* filename = NULL; - sqlite3_stmt* _tmp18_; - gint _tmp19_; - const gchar* _tmp20_; - gchar* _tmp21_; - gboolean _tmp22_ = FALSE; - const gchar* _tmp23_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - const gchar* _tmp34_; - gchar* _tmp35_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp36_; - sqlite3_stmt* _tmp37_; - gint _tmp38_; - gint _tmp39_; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_if_fail (stmt != NULL); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_version_row_new (); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _vala_row = _tmp0_; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = _vala_row; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = stmt; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = offset; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _vala_row; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = stmt; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = offset; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_->version_id = _tmp8_; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = _vala_row; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = stmt; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = offset; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = sqlite3_column_text (_tmp10_, _tmp11_ + 2); -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp9_->name); -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_->name = _tmp13_; -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = offset; -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_column_text (_tmp14_, _tmp15_ + 3); -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = g_strdup (_tmp16_); -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - base_path = _tmp17_; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = stmt; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = offset; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = sqlite3_column_text (_tmp18_, _tmp19_ + 4); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = g_strdup (_tmp20_); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - filename = _tmp21_; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = base_path; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp23_ != NULL) { -#line 1940 "FSpotPhotoVersionsTable.c" - const gchar* _tmp24_; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_ = filename; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = _tmp24_ != NULL; -#line 1946 "FSpotPhotoVersionsTable.c" - } else { -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = FALSE; -#line 1950 "FSpotPhotoVersionsTable.c" - } -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp22_) { -#line 1954 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp25_; - const gchar* _tmp26_; - GFile* _tmp27_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = _vala_row; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = base_path; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = g_file_new_for_uri (_tmp26_); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp25_->base_path); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_->base_path = _tmp27_; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = _vala_row; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_ = filename; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp28_->filename); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_->filename = _tmp30_; -#line 1981 "FSpotPhotoVersionsTable.c" - } -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_ = _vala_row; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp32_ = stmt; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp33_ = offset; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp34_ = sqlite3_column_text (_tmp32_, _tmp33_ + 5); -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp35_ = g_strdup (_tmp34_); -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp31_->md5_sum); -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_->md5_sum = _tmp35_; -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp36_ = _vala_row; -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp37_ = stmt; -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp38_ = offset; -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp39_ = sqlite3_column_int (_tmp37_, _tmp38_ + 6); -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp36_->is_protected = _tmp39_ > 0; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (filename); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (base_path); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (row) { -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *row = _vala_row; -#line 2015 "FSpotPhotoVersionsTable.c" - } else { -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 2019 "FSpotPhotoVersionsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_class_init (DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass * klass) { -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v17_behavior_parent_class = g_type_class_peek_parent (klass); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_versions_v17_behavior_finalize; -#line 2029 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v17_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_get_table_name; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_list_columns; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_versions_v17_behavior_real_build_row; -#line 2042 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance_init (DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_versions_v17_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionsV17Behavior * self; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV17Behavior); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_versions_v17_behavior_parent_class)->finalize (obj); -#line 2056 "FSpotPhotoVersionsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_versions_v17_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsV17BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_v17_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsV17Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_v17_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_versions_v17_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id; - data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionsV17Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_v17_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self = NULL; -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = (DataImportsFSpotDbFSpotPhotoVersionsV18Behavior*) g_object_new (object_type, NULL); -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return self; -#line 2080 "FSpotPhotoVersionsTable.c" -} - - -static DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_new (void) { -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return data_imports_fspot_db_fspot_photo_versions_v18_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR); -#line 2087 "FSpotPhotoVersionsTable.c" -} - - -DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp3_; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp0_ == NULL) { -#line 2100 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior* _tmp1_; -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photo_versions_v18_behavior_new (); -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance); -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance = _tmp1_; -#line 2108 "FSpotPhotoVersionsTable.c" - } -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance; -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp3_; -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 2118 "FSpotPhotoVersionsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 243 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_TABLE_NAME); -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp0_; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 2134 "FSpotPhotoVersionsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint _tmp8__length1; -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = g_strdup ("photo_id"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = g_strdup ("version_id"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = g_strdup ("name"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = g_strdup ("base_uri"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = g_strdup ("filename"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = g_strdup ("import_md5"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = g_strdup ("protected"); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = g_new0 (gchar*, 7 + 1); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[0] = _tmp0_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[1] = _tmp1_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[2] = _tmp2_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[3] = _tmp3_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[4] = _tmp4_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[5] = _tmp5_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_[6] = _tmp6_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = _tmp7_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8__length1 = 7; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (result_length1) { -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *result_length1 = _tmp8__length1; -#line 2191 "FSpotPhotoVersionsTable.c" - } -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - result = _tmp8_; -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - return result; -#line 2197 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoVersionRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self; - DataImportsFSpotDbFSpotPhotoVersionRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp9_; - sqlite3_stmt* _tmp10_; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp14_; - gint _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - gchar* filename = NULL; - sqlite3_stmt* _tmp18_; - gint _tmp19_; - const gchar* _tmp20_; - gchar* _tmp21_; - gboolean _tmp22_ = FALSE; - const gchar* _tmp23_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - const gchar* _tmp34_; - gchar* _tmp35_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp36_; - sqlite3_stmt* _tmp37_; - gint _tmp38_; - gint _tmp39_; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - g_return_if_fail (stmt != NULL); -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_version_row_new (); -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _vala_row = _tmp0_; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_ = _vala_row; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp2_ = stmt; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp3_ = offset; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_ = _vala_row; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp6_ = stmt; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp7_ = offset; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp5_->version_id = _tmp8_; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_ = _vala_row; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp10_ = stmt; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp11_ = offset; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp12_ = sqlite3_column_text (_tmp10_, _tmp11_ + 2); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp9_->name); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp9_->name = _tmp13_; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp14_ = stmt; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp15_ = offset; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp16_ = sqlite3_column_text (_tmp14_, _tmp15_ + 3); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp17_ = g_strdup (_tmp16_); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - base_path = _tmp17_; -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp18_ = stmt; -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp19_ = offset; -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp20_ = sqlite3_column_text (_tmp18_, _tmp19_ + 4); -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp21_ = g_strdup (_tmp20_); -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - filename = _tmp21_; -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp23_ = base_path; -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp23_ != NULL) { -#line 2307 "FSpotPhotoVersionsTable.c" - const gchar* _tmp24_; -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp24_ = filename; -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = _tmp24_ != NULL; -#line 2313 "FSpotPhotoVersionsTable.c" - } else { -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp22_ = FALSE; -#line 2317 "FSpotPhotoVersionsTable.c" - } -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (_tmp22_) { -#line 2321 "FSpotPhotoVersionsTable.c" - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp25_; - const gchar* _tmp26_; - GFile* _tmp27_; - DataImportsFSpotDbFSpotPhotoVersionRow* _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_ = _vala_row; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp26_ = base_path; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp27_ = g_file_new_for_uri (_tmp26_); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_tmp25_->base_path); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp25_->base_path = _tmp27_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_ = _vala_row; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp29_ = filename; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp28_->filename); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp28_->filename = _tmp30_; -#line 2348 "FSpotPhotoVersionsTable.c" - } -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_ = _vala_row; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp32_ = stmt; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp33_ = offset; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp34_ = sqlite3_column_text (_tmp32_, _tmp33_ + 5); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp35_ = g_strdup (_tmp34_); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (_tmp31_->md5_sum); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp31_->md5_sum = _tmp35_; -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp36_ = _vala_row; -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp37_ = stmt; -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp38_ = offset; -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp39_ = sqlite3_column_int (_tmp37_, _tmp38_ + 6); -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _tmp36_->is_protected = _tmp39_ > 0; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (filename); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_free0 (base_path); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - if (row) { -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - *row = _vala_row; -#line 2382 "FSpotPhotoVersionsTable.c" - } else { -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - _g_object_unref0 (_vala_row); -#line 2386 "FSpotPhotoVersionsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_class_init (DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass * klass) { -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v18_behavior_parent_class = g_type_class_peek_parent (klass); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_versions_v18_behavior_finalize; -#line 2396 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - data_imports_fspot_db_fspot_photo_versions_v18_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_get_table_name; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_list_columns; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photo_versions_v18_behavior_real_build_row; -#line 2409 "FSpotPhotoVersionsTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance_init (DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photo_versions_v18_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoVersionsV18Behavior * self; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotoVersionsV18Behavior); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_versions_v18_behavior_parent_class)->finalize (obj); -#line 2423 "FSpotPhotoVersionsTable.c" -} - - -GType data_imports_fspot_db_fspot_photo_versions_v18_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoVersionsV18BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_versions_v18_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoVersionsV18Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_versions_v18_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photo_versions_v18_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id; - data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoVersionsV18Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id__volatile, data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id); - } - return data_imports_fspot_db_fspot_photo_versions_v18_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala b/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala deleted file mode 100644 index 4c500fe..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotoVersionsTable.vala +++ /dev/null @@ -1,271 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "photo_versions" table, representing a single database row. - */ -public class FSpotPhotoVersionRow : Object { - public int64 photo_id; - public int64 version_id; - public string name; - public File? base_path; - public string? filename; - public string md5_sum; - public bool is_protected; -} - -/** - * This class represents the F-Spot photo_versions table. - */ -public class FSpotPhotoVersionsTable : FSpotDatabaseTable<FSpotPhotoVersionRow> { - public const string TABLE_NAME = "Photo_versions"; - - public FSpotPhotoVersionsTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) { - base(db); - set_behavior(db_behavior.get_photo_versions_behavior()); - } - - public Gee.ArrayList<FSpotPhotoVersionRow> get_by_photo_id(int64 photo_id) throws DatabaseError { - Gee.ArrayList<FSpotPhotoVersionRow> rows = new Gee.ArrayList<FSpotPhotoVersionRow?>(); - - Sqlite.Statement stmt; - - string column_list = get_joined_column_list(); - string sql = "SELECT %s FROM %s WHERE photo_id=?".printf( - column_list, table_name - ); - - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.bind_int64(1, photo_id); - if (res != Sqlite.OK) - throw_error("Bind failed for photo_id", res); - - res = stmt.step(); - while (res == Sqlite.ROW) { - FSpotPhotoVersionRow row; - behavior.build_row(stmt, out row); - rows.add(row); - res = stmt.step(); - } - - return rows; - } -} - -// Photo_versions table behavior for v0-8 -// Note: there is a change in the URI format in version 8 but the File.new_for_uri -// constructor should be able to deal with the variation, so the v8 behavior should -// be handled in a way identical to v0-7 -public class FSpotPhotoVersionsV0Behavior : FSpotTableBehavior<FSpotPhotoVersionRow>, Object { - private static FSpotPhotoVersionsV0Behavior instance; - - private FSpotPhotoVersionsV0Behavior() { - } - - public static FSpotPhotoVersionsV0Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoVersionsV0Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoVersionsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "version_id", "name", "uri" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoVersionRow row, int offset = 0) { - row = new FSpotPhotoVersionRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.version_id = stmt.column_int64(offset + 1); - row.name = stmt.column_text(offset + 2); - - string? full_path = stmt.column_text(offset + 3); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.md5_sum = ""; - row.is_protected = false; - } -} - -// Photo_versions table behavior for v9-15 -// add protected field -public class FSpotPhotoVersionsV9Behavior : FSpotTableBehavior<FSpotPhotoVersionRow>, Object { - private static FSpotPhotoVersionsV9Behavior instance; - - private FSpotPhotoVersionsV9Behavior() { - } - - public static FSpotPhotoVersionsV9Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoVersionsV9Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoVersionsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "version_id", "name", "uri", - "protected" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoVersionRow row, int offset = 0) { - row = new FSpotPhotoVersionRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.version_id = stmt.column_int64(offset + 1); - row.name = stmt.column_text(offset + 2); - - string? full_path = stmt.column_text(offset + 3); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.md5_sum = ""; - row.is_protected = (stmt.column_int(offset + 4) > 0); - } -} - -// Photo_versions table behavior for v16 -// add md5_sum in photo_versions -public class FSpotPhotoVersionsV16Behavior : FSpotTableBehavior<FSpotPhotoVersionRow>, Object { - private static FSpotPhotoVersionsV16Behavior instance; - - private FSpotPhotoVersionsV16Behavior() { - } - - public static FSpotPhotoVersionsV16Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoVersionsV16Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoVersionsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "version_id", "name", "uri", - "md5_sum", "protected" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoVersionRow row, int offset = 0) { - row = new FSpotPhotoVersionRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.version_id = stmt.column_int64(offset + 1); - row.name = stmt.column_text(offset + 2); - - string? full_path = stmt.column_text(offset + 3); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.md5_sum = stmt.column_text(offset + 4); - row.is_protected = (stmt.column_int(offset + 5) > 0); - } -} - -// Photo_versions table behavior for v17 -// v17 split the URI into base_uri and filename (reverting back to the original -// design introduced in v0, albeit with a URI rather than a file system path) -public class FSpotPhotoVersionsV17Behavior : FSpotTableBehavior<FSpotPhotoVersionRow>, Object { - private static FSpotPhotoVersionsV17Behavior instance; - - private FSpotPhotoVersionsV17Behavior() { - } - - public static FSpotPhotoVersionsV17Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoVersionsV17Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoVersionsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "version_id", "name", "base_uri", "filename", - "md5_sum", "protected" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoVersionRow row, int offset = 0) { - row = new FSpotPhotoVersionRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.version_id = stmt.column_int64(offset + 1); - row.name = stmt.column_text(offset + 2); - - string? base_path = stmt.column_text(offset + 3); - string? filename = stmt.column_text(offset + 4); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.md5_sum = stmt.column_text(offset + 5); - row.is_protected = (stmt.column_int(offset + 6) > 0); - } -} - -// Photo_versions table behavior for v18 -// md5_sum renamed import_md5 -public class FSpotPhotoVersionsV18Behavior : FSpotTableBehavior<FSpotPhotoVersionRow>, Object { - private static FSpotPhotoVersionsV18Behavior instance; - - private FSpotPhotoVersionsV18Behavior() { - } - - public static FSpotPhotoVersionsV18Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotoVersionsV18Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotoVersionsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "photo_id", "version_id", "name", "base_uri", "filename", - "import_md5", "protected" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoVersionRow row, int offset = 0) { - row = new FSpotPhotoVersionRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.version_id = stmt.column_int64(offset + 1); - row.name = stmt.column_text(offset + 2); - - string? base_path = stmt.column_text(offset + 3); - string? filename = stmt.column_text(offset + 4); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.md5_sum = stmt.column_text(offset + 5); - row.is_protected = (stmt.column_int(offset + 6) > 0); - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotPhotosTable.c b/plugins/shotwell-data-imports/FSpotPhotosTable.c deleted file mode 100644 index 4eb3d76..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotosTable.c +++ /dev/null @@ -1,3295 +0,0 @@ -/* FSpotPhotosTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotPhotosTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <time.h> -#include <gio/gio.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> -#include <gee.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW (data_imports_fspot_db_fspot_photo_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoRow DataImportsFSpotDbFSpotPhotoRow; -typedef struct _DataImportsFSpotDbFSpotPhotoRowClass DataImportsFSpotDbFSpotPhotoRowClass; -typedef struct _DataImportsFSpotDbFSpotPhotoRowPrivate DataImportsFSpotDbFSpotPhotoRowPrivate; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE (data_imports_fspot_db_fspot_photos_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosTable DataImportsFSpotDbFSpotPhotosTable; -typedef struct _DataImportsFSpotDbFSpotPhotosTableClass DataImportsFSpotDbFSpotPhotosTableClass; -typedef struct _DataImportsFSpotDbFSpotPhotosTablePrivate DataImportsFSpotDbFSpotPhotosTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR (data_imports_fspot_db_fspot_photos_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV0Behavior DataImportsFSpotDbFSpotPhotosV0Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV0BehaviorClass DataImportsFSpotDbFSpotPhotosV0BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV0BehaviorPrivate DataImportsFSpotDbFSpotPhotosV0BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR (data_imports_fspot_db_fspot_photos_v5_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV5Behavior DataImportsFSpotDbFSpotPhotosV5Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV5BehaviorClass DataImportsFSpotDbFSpotPhotosV5BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV5BehaviorPrivate DataImportsFSpotDbFSpotPhotosV5BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR (data_imports_fspot_db_fspot_photos_v7_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V7_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V7_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV7Behavior DataImportsFSpotDbFSpotPhotosV7Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV7BehaviorClass DataImportsFSpotDbFSpotPhotosV7BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV7BehaviorPrivate DataImportsFSpotDbFSpotPhotosV7BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR (data_imports_fspot_db_fspot_photos_v11_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V11_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V11_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV11Behavior DataImportsFSpotDbFSpotPhotosV11Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV11BehaviorClass DataImportsFSpotDbFSpotPhotosV11BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV11BehaviorPrivate DataImportsFSpotDbFSpotPhotosV11BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR (data_imports_fspot_db_fspot_photos_v16_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V16_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V16_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV16Behavior DataImportsFSpotDbFSpotPhotosV16Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV16BehaviorClass DataImportsFSpotDbFSpotPhotosV16BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV16BehaviorPrivate DataImportsFSpotDbFSpotPhotosV16BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR (data_imports_fspot_db_fspot_photos_v17_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V17_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V17_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV17Behavior DataImportsFSpotDbFSpotPhotosV17Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV17BehaviorClass DataImportsFSpotDbFSpotPhotosV17BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV17BehaviorPrivate DataImportsFSpotDbFSpotPhotosV17BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR (data_imports_fspot_db_fspot_photos_v18_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V18_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_V18_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotosV18Behavior DataImportsFSpotDbFSpotPhotosV18Behavior; -typedef struct _DataImportsFSpotDbFSpotPhotosV18BehaviorClass DataImportsFSpotDbFSpotPhotosV18BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotPhotosV18BehaviorPrivate DataImportsFSpotDbFSpotPhotosV18BehaviorPrivate; - -struct _DataImportsFSpotDbFSpotPhotoRow { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotoRowPrivate * priv; - gint64 photo_id; - time_t time; - GFile* base_path; - gchar* filename; - gchar* description; - gint64 roll_id; - gint64 default_version_id; - gint rating; - gchar* md5_sum; -}; - -struct _DataImportsFSpotDbFSpotPhotoRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotPhotosTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotDbFSpotPhotosV0Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV0BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV0BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV5Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV5BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV5BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV7Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV7BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV7BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV11Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV11BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV11BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV16Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV16BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV16BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV17Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV17BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV17BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotPhotosV18Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotPhotosV18BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotPhotosV18BehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_photo_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photos_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v0_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v5_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v5_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v7_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v7_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v11_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v11_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v16_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v16_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v17_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v17_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_photos_v18_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_instance; -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_photos_v18_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_photo_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotPhotoRow* data_imports_fspot_db_fspot_photo_row_new (void); -DataImportsFSpotDbFSpotPhotoRow* data_imports_fspot_db_fspot_photo_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_photo_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photos_table_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME "Photos" -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photos_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -GQuark database_error_quark (void); -GeeArrayList* data_imports_fspot_db_fspot_photos_table_get_all (DataImportsFSpotDbFSpotPhotosTable* self, GError** error); -gint data_imports_fspot_db_fspot_database_table_select_all (DataImportsFSpotDbFSpotDatabaseTable* self, sqlite3_stmt* * stmt, GError** error); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -GType data_imports_fspot_db_fspot_photos_v0_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V0_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -#define DATA_IMPORTS_FSPOT_DB_INVALID_ID ((gint64) -1) -static void data_imports_fspot_db_fspot_photos_v0_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v5_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V5_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v5_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v5_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v5_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v5_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v7_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V7_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v7_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v7_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v7_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v7_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v11_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V11_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v11_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v11_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v11_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v11_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v16_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V16_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v16_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v16_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v16_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v16_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v17_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V17_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v17_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v17_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v17_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v17_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_photos_v18_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_V18_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_new (void); -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_photos_v18_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_photos_v18_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_photos_v18_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset); -static void data_imports_fspot_db_fspot_photos_v18_behavior_finalize (GObject * obj); - - -DataImportsFSpotDbFSpotPhotoRow* data_imports_fspot_db_fspot_photo_row_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotoRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotoRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 441 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotoRow* data_imports_fspot_db_fspot_photo_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photo_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW); -#line 448 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_row_class_init (DataImportsFSpotDbFSpotPhotoRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photo_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photo_row_finalize; -#line 457 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photo_row_instance_init (DataImportsFSpotDbFSpotPhotoRow * self) { -} - - -static void data_imports_fspot_db_fspot_photo_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotoRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, DataImportsFSpotDbFSpotPhotoRow); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (self->base_path); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (self->filename); -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (self->description); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (self->md5_sum); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photo_row_parent_class)->finalize (obj); -#line 479 "FSpotPhotosTable.c" -} - - -/** - * The value object for the "photos" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_photo_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photo_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photo_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotoRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photo_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotoRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photo_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photo_row_type_id; - data_imports_fspot_db_fspot_photo_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotoRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photo_row_type_id__volatile, data_imports_fspot_db_fspot_photo_row_type_id); - } - return data_imports_fspot_db_fspot_photo_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { - DataImportsFSpotDbFSpotPhotosTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = db; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = db_behavior; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_photos_behavior (_tmp1_); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _tmp2_; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp3_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 524 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, db, db_behavior); -#line 531 "FSpotPhotosTable.c" -} - - -GeeArrayList* data_imports_fspot_db_fspot_photos_table_get_all (DataImportsFSpotDbFSpotPhotosTable* self, GError** error) { - GeeArrayList* result = NULL; - GeeArrayList* all = NULL; - GeeArrayList* _tmp0_; - sqlite3_stmt* stmt = NULL; - gint res = 0; - sqlite3_stmt* _tmp1_ = NULL; - gint _tmp2_; - GError * _inner_error_ = NULL; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE (self), NULL); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - all = _tmp0_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_table_select_all (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), &_tmp1_, &_inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _sqlite3_finalize0 (stmt); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - stmt = _tmp1_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - res = _tmp2_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_propagate_error (error, _inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _sqlite3_finalize0 (stmt); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (all); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return NULL; -#line 570 "FSpotPhotosTable.c" - } else { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _sqlite3_finalize0 (stmt); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (all); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_clear_error (&_inner_error_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return NULL; -#line 582 "FSpotPhotosTable.c" - } - } -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - while (TRUE) { -#line 587 "FSpotPhotosTable.c" - gint _tmp3_; - DataImportsFSpotDbFSpotPhotoRow* row = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp4_; - gpointer _tmp5_ = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp6_; - gint _tmp7_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = res; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (!(_tmp3_ == SQLITE_ROW)) { -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - break; -#line 600 "FSpotPhotosTable.c" - } -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp4_, stmt, &_tmp5_, 0); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (row); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - row = _tmp5_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = row; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (all, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp6_); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = sqlite3_step (stmt); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - res = _tmp7_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (row); -#line 620 "FSpotPhotosTable.c" - } -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = all; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _sqlite3_finalize0 (stmt); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 628 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_table_class_init (DataImportsFSpotDbFSpotPhotosTableClass * klass) { -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_table_parent_class = g_type_class_peek_parent (klass); -#line 635 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_table_instance_init (DataImportsFSpotDbFSpotPhotosTable * self) { -} - - -/** - * This class represents the F-Spot photos table. - */ -GType data_imports_fspot_db_fspot_photos_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_photos_table_type_id; - data_imports_fspot_db_fspot_photos_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotPhotosTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_table_type_id__volatile, data_imports_fspot_db_fspot_photos_table_type_id); - } - return data_imports_fspot_db_fspot_photos_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV0Behavior * self = NULL; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV0Behavior*) g_object_new (object_type, NULL); -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 664 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_new (void) { -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR); -#line 671 "FSpotPhotosTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self ? g_object_ref (self) : NULL; -#line 678 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV0Behavior* data_imports_fspot_db_fspot_photos_v0_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV0Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp3_; -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v0_behavior_instance; -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 691 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV0Behavior* _tmp1_; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v0_behavior_new (); -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v0_behavior_instance); -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v0_behavior_instance = _tmp1_; -#line 699 "FSpotPhotosTable.c" - } -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v0_behavior_instance; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 709 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV0Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 65 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 725 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV0Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar** _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("directory_path"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("name"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("description"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("default_version_id"); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_new0 (gchar*, 6 + 1); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[0] = _tmp0_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[1] = _tmp1_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[2] = _tmp2_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[3] = _tmp3_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[4] = _tmp4_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[5] = _tmp5_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = _tmp6_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7__length1 = 6; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp7__length1; -#line 777 "FSpotPhotosTable.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp7_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 783 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV0Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - gchar* filename = NULL; - sqlite3_stmt* _tmp13_; - gint _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; - gboolean _tmp17_ = FALSE; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - DataImportsFSpotDbFSpotPhotoRow* _tmp32_; - sqlite3_stmt* _tmp33_; - gint _tmp34_; - gint64 _tmp35_; - DataImportsFSpotDbFSpotPhotoRow* _tmp36_; - DataImportsFSpotDbFSpotPhotoRow* _tmp37_; - gchar* _tmp38_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - base_path = _tmp12_; -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = stmt; -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = offset; -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = sqlite3_column_text (_tmp13_, _tmp14_ + 3); -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - filename = _tmp16_; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = base_path; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp18_ != NULL) { -#line 878 "FSpotPhotosTable.c" - const gchar* _tmp19_; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = filename; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = _tmp19_ != NULL; -#line 884 "FSpotPhotosTable.c" - } else { -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = FALSE; -#line 888 "FSpotPhotosTable.c" - } -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp17_) { -#line 892 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp20_; - const gchar* _tmp21_; - GFile* _tmp22_; - DataImportsFSpotDbFSpotPhotoRow* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = _vala_row; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = base_path; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = g_file_new_for_uri (_tmp21_); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp20_->base_path); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_->base_path = _tmp22_; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = _vala_row; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = filename; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp23_->filename); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_->filename = _tmp25_; -#line 919 "FSpotPhotosTable.c" - } -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = _vala_row; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = stmt; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = offset; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = sqlite3_column_text (_tmp27_, _tmp28_ + 4); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp26_->description); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_->description = _tmp30_; -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->roll_id = DATA_IMPORTS_FSPOT_DB_INVALID_ID; -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = _vala_row; -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = stmt; -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = offset; -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = sqlite3_column_int64 (_tmp33_, _tmp34_ + 5); -#line 88 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_->default_version_id = _tmp35_; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = _vala_row; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_->rating = 0; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = _vala_row; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = g_strdup (""); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp37_->md5_sum); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_->md5_sum = _tmp38_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (filename); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (base_path); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 969 "FSpotPhotosTable.c" - } else { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 973 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v0_behavior_class_init (DataImportsFSpotDbFSpotPhotosV0BehaviorClass * klass) { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v0_behavior_parent_class = g_type_class_peek_parent (klass); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v0_behavior_finalize; -#line 983 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v0_behavior_real_get_table_name; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v0_behavior_real_list_columns; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v0_behavior_real_build_row; -#line 996 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v0_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV0Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v0_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV0Behavior * self; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V0_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV0Behavior); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v0_behavior_parent_class)->finalize (obj); -#line 1010 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v0_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v0_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v0_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v0_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v0_behavior_type_id; - data_imports_fspot_db_fspot_photos_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV0Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v0_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v0_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV5Behavior * self = NULL; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV5Behavior*) g_object_new (object_type, NULL); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 1034 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_new (void) { -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v5_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR); -#line 1041 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV5Behavior* data_imports_fspot_db_fspot_photos_v5_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV5Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp3_; -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v5_behavior_instance; -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 1054 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV5Behavior* _tmp1_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v5_behavior_new (); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v5_behavior_instance); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v5_behavior_instance = _tmp1_; -#line 1062 "FSpotPhotosTable.c" - } -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v5_behavior_instance; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1072 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v5_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV5Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1088 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v5_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV5Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint _tmp8__length1; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("directory_path"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("name"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("description"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("roll_id"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_strdup ("default_version_id"); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = g_new0 (gchar*, 7 + 1); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[0] = _tmp0_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[1] = _tmp1_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[2] = _tmp2_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[3] = _tmp3_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[4] = _tmp4_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[5] = _tmp5_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[6] = _tmp6_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = _tmp7_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8__length1 = 7; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp8__length1; -#line 1145 "FSpotPhotosTable.c" - } -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp8_; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1151 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v5_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV5Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - gchar* filename = NULL; - sqlite3_stmt* _tmp13_; - gint _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; - gboolean _tmp17_ = FALSE; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - sqlite3_stmt* _tmp36_; - gint _tmp37_; - gint64 _tmp38_; - DataImportsFSpotDbFSpotPhotoRow* _tmp39_; - DataImportsFSpotDbFSpotPhotoRow* _tmp40_; - gchar* _tmp41_; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - base_path = _tmp12_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = stmt; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = offset; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = sqlite3_column_text (_tmp13_, _tmp14_ + 3); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - filename = _tmp16_; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = base_path; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp18_ != NULL) { -#line 1249 "FSpotPhotosTable.c" - const gchar* _tmp19_; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = filename; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = _tmp19_ != NULL; -#line 1255 "FSpotPhotosTable.c" - } else { -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = FALSE; -#line 1259 "FSpotPhotosTable.c" - } -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp17_) { -#line 1263 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp20_; - const gchar* _tmp21_; - GFile* _tmp22_; - DataImportsFSpotDbFSpotPhotoRow* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = _vala_row; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = base_path; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = g_file_new_for_uri (_tmp21_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp20_->base_path); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_->base_path = _tmp22_; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = _vala_row; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = filename; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp23_->filename); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_->filename = _tmp25_; -#line 1290 "FSpotPhotosTable.c" - } -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = _vala_row; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = stmt; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = offset; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = sqlite3_column_text (_tmp27_, _tmp28_ + 4); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp26_->description); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_->description = _tmp30_; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->roll_id = _tmp34_; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = stmt; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = offset; -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = sqlite3_column_int64 (_tmp36_, _tmp37_ + 6); -#line 132 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->default_version_id = _tmp38_; -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_ = _vala_row; -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_->rating = 0; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_ = _vala_row; -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp41_ = g_strdup (""); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp40_->md5_sum); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_->md5_sum = _tmp41_; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (filename); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (base_path); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 1346 "FSpotPhotosTable.c" - } else { -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 1350 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v5_behavior_class_init (DataImportsFSpotDbFSpotPhotosV5BehaviorClass * klass) { -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v5_behavior_parent_class = g_type_class_peek_parent (klass); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v5_behavior_finalize; -#line 1360 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v5_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v5_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v5_behavior_real_get_table_name; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v5_behavior_real_list_columns; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v5_behavior_real_build_row; -#line 1373 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v5_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV5Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v5_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV5Behavior * self; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V5_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV5Behavior); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v5_behavior_parent_class)->finalize (obj); -#line 1387 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v5_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v5_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v5_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV5BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v5_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV5Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v5_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v5_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v5_behavior_type_id; - data_imports_fspot_db_fspot_photos_v5_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV5Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v5_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v5_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v5_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v5_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV7Behavior * self = NULL; -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV7Behavior*) g_object_new (object_type, NULL); -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 1411 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_new (void) { -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v7_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR); -#line 1418 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV7Behavior* data_imports_fspot_db_fspot_photos_v7_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV7Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp3_; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v7_behavior_instance; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 1431 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV7Behavior* _tmp1_; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v7_behavior_new (); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v7_behavior_instance); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v7_behavior_instance = _tmp1_; -#line 1439 "FSpotPhotosTable.c" - } -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v7_behavior_instance; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1449 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v7_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV7Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 154 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior); -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 155 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1465 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v7_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV7Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar** _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; -#line 158 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("uri"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("description"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("roll_id"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("default_version_id"); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_new0 (gchar*, 6 + 1); -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[0] = _tmp0_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[1] = _tmp1_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[2] = _tmp2_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[3] = _tmp3_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[4] = _tmp4_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_[5] = _tmp5_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = _tmp6_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7__length1 = 6; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp7__length1; -#line 1517 "FSpotPhotosTable.c" - } -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp7_; -#line 159 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1523 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v7_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV7Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - const gchar* _tmp13_; - DataImportsFSpotDbFSpotPhotoRow* _tmp22_; - sqlite3_stmt* _tmp23_; - gint _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; - DataImportsFSpotDbFSpotPhotoRow* _tmp27_; - sqlite3_stmt* _tmp28_; - gint _tmp29_; - gint64 _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - DataImportsFSpotDbFSpotPhotoRow* _tmp36_; - gchar* _tmp37_; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 164 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - full_path = _tmp12_; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = full_path; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp13_ != NULL) { -#line 1605 "FSpotPhotosTable.c" - GFile* uri = NULL; - const gchar* _tmp14_; - GFile* _tmp15_; - DataImportsFSpotDbFSpotPhotoRow* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp19_; - GFile* _tmp20_; - gchar* _tmp21_; -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = full_path; -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = g_file_new_for_uri (_tmp14_); -#line 170 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - uri = _tmp15_; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = _vala_row; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = uri; -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = g_file_get_parent (_tmp17_); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp16_->base_path); -#line 171 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_->base_path = _tmp18_; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = _vala_row; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = uri; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = g_file_get_basename (_tmp20_); -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp19_->filename); -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_->filename = _tmp21_; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (uri); -#line 1643 "FSpotPhotosTable.c" - } -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = _vala_row; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = stmt; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = offset; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = sqlite3_column_text (_tmp23_, _tmp24_ + 3); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = g_strdup (_tmp25_); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp22_->description); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_->description = _tmp26_; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = _vala_row; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = stmt; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = offset; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = sqlite3_column_int64 (_tmp28_, _tmp29_ + 4); -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_->roll_id = _tmp30_; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->default_version_id = _tmp34_; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->rating = 0; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = _vala_row; -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = g_strdup (""); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp36_->md5_sum); -#line 179 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_->md5_sum = _tmp37_; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (full_path); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 1697 "FSpotPhotosTable.c" - } else { -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 1701 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v7_behavior_class_init (DataImportsFSpotDbFSpotPhotosV7BehaviorClass * klass) { -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v7_behavior_parent_class = g_type_class_peek_parent (klass); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v7_behavior_finalize; -#line 1711 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v7_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v7_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v7_behavior_real_get_table_name; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v7_behavior_real_list_columns; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v7_behavior_real_build_row; -#line 1724 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v7_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV7Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v7_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV7Behavior * self; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V7_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV7Behavior); -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v7_behavior_parent_class)->finalize (obj); -#line 1738 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v7_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v7_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v7_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV7BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v7_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV7Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v7_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v7_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v7_behavior_type_id; - data_imports_fspot_db_fspot_photos_v7_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV7Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v7_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v7_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v7_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v7_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV11Behavior * self = NULL; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV11Behavior*) g_object_new (object_type, NULL); -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 1762 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_new (void) { -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v11_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR); -#line 1769 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV11Behavior* data_imports_fspot_db_fspot_photos_v11_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV11Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp3_; -#line 192 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v11_behavior_instance; -#line 192 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 1782 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV11Behavior* _tmp1_; -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v11_behavior_new (); -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v11_behavior_instance); -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v11_behavior_instance = _tmp1_; -#line 1790 "FSpotPhotosTable.c" - } -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v11_behavior_instance; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1800 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v11_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV11Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 197 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1816 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v11_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV11Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint _tmp8__length1; -#line 201 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("uri"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("description"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("roll_id"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("default_version_id"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_strdup ("rating"); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = g_new0 (gchar*, 7 + 1); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[0] = _tmp0_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[1] = _tmp1_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[2] = _tmp2_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[3] = _tmp3_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[4] = _tmp4_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[5] = _tmp5_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_[6] = _tmp6_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = _tmp7_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8__length1 = 7; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp8__length1; -#line 1873 "FSpotPhotosTable.c" - } -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp8_; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 1879 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v11_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV11Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - const gchar* _tmp13_; - DataImportsFSpotDbFSpotPhotoRow* _tmp22_; - sqlite3_stmt* _tmp23_; - gint _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; - DataImportsFSpotDbFSpotPhotoRow* _tmp27_; - sqlite3_stmt* _tmp28_; - gint _tmp29_; - gint64 _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - sqlite3_stmt* _tmp36_; - gint _tmp37_; - gint _tmp38_; - DataImportsFSpotDbFSpotPhotoRow* _tmp39_; - gchar* _tmp40_; -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 209 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 209 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 209 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 209 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 209 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 211 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - full_path = _tmp12_; -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = full_path; -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp13_ != NULL) { -#line 1964 "FSpotPhotosTable.c" - GFile* uri = NULL; - const gchar* _tmp14_; - GFile* _tmp15_; - DataImportsFSpotDbFSpotPhotoRow* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp19_; - GFile* _tmp20_; - gchar* _tmp21_; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = full_path; -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = g_file_new_for_uri (_tmp14_); -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - uri = _tmp15_; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = _vala_row; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = uri; -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = g_file_get_parent (_tmp17_); -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp16_->base_path); -#line 214 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_->base_path = _tmp18_; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = _vala_row; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = uri; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = g_file_get_basename (_tmp20_); -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp19_->filename); -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_->filename = _tmp21_; -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (uri); -#line 2002 "FSpotPhotosTable.c" - } -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = _vala_row; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = stmt; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = offset; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = sqlite3_column_text (_tmp23_, _tmp24_ + 3); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = g_strdup (_tmp25_); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp22_->description); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_->description = _tmp26_; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = _vala_row; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = stmt; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = offset; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = sqlite3_column_int64 (_tmp28_, _tmp29_ + 4); -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_->roll_id = _tmp30_; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->default_version_id = _tmp34_; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = stmt; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = offset; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = sqlite3_column_int (_tmp36_, _tmp37_ + 6); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->rating = _tmp38_; -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_ = _vala_row; -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_ = g_strdup (""); -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp39_->md5_sum); -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_->md5_sum = _tmp40_; -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (full_path); -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 2062 "FSpotPhotosTable.c" - } else { -#line 206 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 2066 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v11_behavior_class_init (DataImportsFSpotDbFSpotPhotosV11BehaviorClass * klass) { -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v11_behavior_parent_class = g_type_class_peek_parent (klass); -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v11_behavior_finalize; -#line 2076 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v11_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v11_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v11_behavior_real_get_table_name; -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v11_behavior_real_list_columns; -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v11_behavior_real_build_row; -#line 2089 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v11_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV11Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v11_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV11Behavior * self; -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V11_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV11Behavior); -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v11_behavior_parent_class)->finalize (obj); -#line 2103 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v11_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v11_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v11_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV11BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v11_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV11Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v11_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v11_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v11_behavior_type_id; - data_imports_fspot_db_fspot_photos_v11_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV11Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v11_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v11_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v11_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v11_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV16Behavior * self = NULL; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV16Behavior*) g_object_new (object_type, NULL); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 2127 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_new (void) { -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v16_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR); -#line 2134 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV16Behavior* data_imports_fspot_db_fspot_photos_v16_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV16Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp3_; -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v16_behavior_instance; -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 2147 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV16Behavior* _tmp1_; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v16_behavior_new (); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v16_behavior_instance); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v16_behavior_instance = _tmp1_; -#line 2155 "FSpotPhotosTable.c" - } -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v16_behavior_instance; -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2165 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v16_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV16Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior); -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2181 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v16_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV16Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar** _tmp8_; - gchar** _tmp9_; - gint _tmp9__length1; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("uri"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("description"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("roll_id"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("default_version_id"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_strdup ("rating"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = g_strdup ("md5_sum"); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = g_new0 (gchar*, 8 + 1); -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[0] = _tmp0_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[1] = _tmp1_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[2] = _tmp2_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[3] = _tmp3_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[4] = _tmp4_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[5] = _tmp5_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[6] = _tmp6_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[7] = _tmp7_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = _tmp8_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9__length1 = 8; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp9__length1; -#line 2243 "FSpotPhotosTable.c" - } -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp9_; -#line 245 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2249 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v16_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV16Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* full_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - const gchar* _tmp13_; - DataImportsFSpotDbFSpotPhotoRow* _tmp22_; - sqlite3_stmt* _tmp23_; - gint _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; - DataImportsFSpotDbFSpotPhotoRow* _tmp27_; - sqlite3_stmt* _tmp28_; - gint _tmp29_; - gint64 _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - sqlite3_stmt* _tmp36_; - gint _tmp37_; - gint _tmp38_; - DataImportsFSpotDbFSpotPhotoRow* _tmp39_; - sqlite3_stmt* _tmp40_; - gint _tmp41_; - const gchar* _tmp42_; - gchar* _tmp43_; -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior); -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 250 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 250 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 250 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 254 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - full_path = _tmp12_; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = full_path; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp13_ != NULL) { -#line 2337 "FSpotPhotosTable.c" - GFile* uri = NULL; - const gchar* _tmp14_; - GFile* _tmp15_; - DataImportsFSpotDbFSpotPhotoRow* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp19_; - GFile* _tmp20_; - gchar* _tmp21_; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = full_path; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = g_file_new_for_uri (_tmp14_); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - uri = _tmp15_; -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = _vala_row; -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = uri; -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = g_file_get_parent (_tmp17_); -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp16_->base_path); -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_->base_path = _tmp18_; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = _vala_row; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = uri; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = g_file_get_basename (_tmp20_); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp19_->filename); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_->filename = _tmp21_; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (uri); -#line 2375 "FSpotPhotosTable.c" - } -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = _vala_row; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = stmt; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = offset; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = sqlite3_column_text (_tmp23_, _tmp24_ + 3); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = g_strdup (_tmp25_); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp22_->description); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_->description = _tmp26_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = _vala_row; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = stmt; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = offset; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = sqlite3_column_int64 (_tmp28_, _tmp29_ + 4); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_->roll_id = _tmp30_; -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->default_version_id = _tmp34_; -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = stmt; -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = offset; -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = sqlite3_column_int (_tmp36_, _tmp37_ + 6); -#line 264 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->rating = _tmp38_; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_ = _vala_row; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_ = stmt; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp41_ = offset; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp42_ = sqlite3_column_text (_tmp40_, _tmp41_ + 7); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp43_ = g_strdup (_tmp42_); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp39_->md5_sum); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_->md5_sum = _tmp43_; -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (full_path); -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 2441 "FSpotPhotosTable.c" - } else { -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 2445 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v16_behavior_class_init (DataImportsFSpotDbFSpotPhotosV16BehaviorClass * klass) { -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v16_behavior_parent_class = g_type_class_peek_parent (klass); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v16_behavior_finalize; -#line 2455 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v16_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v16_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v16_behavior_real_get_table_name; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v16_behavior_real_list_columns; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v16_behavior_real_build_row; -#line 2468 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v16_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV16Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v16_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV16Behavior * self; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V16_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV16Behavior); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v16_behavior_parent_class)->finalize (obj); -#line 2482 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v16_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v16_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v16_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV16BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v16_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV16Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v16_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v16_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v16_behavior_type_id; - data_imports_fspot_db_fspot_photos_v16_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV16Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v16_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v16_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v16_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v16_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV17Behavior * self = NULL; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV17Behavior*) g_object_new (object_type, NULL); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 2506 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_new (void) { -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v17_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR); -#line 2513 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV17Behavior* data_imports_fspot_db_fspot_photos_v17_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV17Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp3_; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v17_behavior_instance; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 2526 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV17Behavior* _tmp1_; -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v17_behavior_new (); -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v17_behavior_instance); -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v17_behavior_instance = _tmp1_; -#line 2534 "FSpotPhotosTable.c" - } -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v17_behavior_instance; -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2544 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v17_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV17Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 284 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior); -#line 285 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 285 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 285 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2560 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v17_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV17Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar** _tmp9_; - gchar** _tmp10_; - gint _tmp10__length1; -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("base_uri"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("filename"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("description"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("roll_id"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_strdup ("default_version_id"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = g_strdup ("rating"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = g_strdup ("md5_sum"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = g_new0 (gchar*, 9 + 1); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[0] = _tmp0_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[1] = _tmp1_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[2] = _tmp2_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[3] = _tmp3_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[4] = _tmp4_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[5] = _tmp5_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[6] = _tmp6_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[7] = _tmp7_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_[8] = _tmp8_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = _tmp9_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10__length1 = 9; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp10__length1; -#line 2627 "FSpotPhotosTable.c" - } -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp10_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2633 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v17_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV17Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - gchar* filename = NULL; - sqlite3_stmt* _tmp13_; - gint _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; - gboolean _tmp17_ = FALSE; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - sqlite3_stmt* _tmp36_; - gint _tmp37_; - gint64 _tmp38_; - DataImportsFSpotDbFSpotPhotoRow* _tmp39_; - sqlite3_stmt* _tmp40_; - gint _tmp41_; - gint _tmp42_; - DataImportsFSpotDbFSpotPhotoRow* _tmp43_; - sqlite3_stmt* _tmp44_; - gint _tmp45_; - const gchar* _tmp46_; - gchar* _tmp47_; -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior); -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 296 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 296 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 296 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 296 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 296 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 298 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - base_path = _tmp12_; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = stmt; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = offset; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = sqlite3_column_text (_tmp13_, _tmp14_ + 3); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - filename = _tmp16_; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = base_path; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp18_ != NULL) { -#line 2737 "FSpotPhotosTable.c" - const gchar* _tmp19_; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = filename; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = _tmp19_ != NULL; -#line 2743 "FSpotPhotosTable.c" - } else { -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = FALSE; -#line 2747 "FSpotPhotosTable.c" - } -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp17_) { -#line 2751 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp20_; - const gchar* _tmp21_; - GFile* _tmp22_; - DataImportsFSpotDbFSpotPhotoRow* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = _vala_row; -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = base_path; -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = g_file_new_for_uri (_tmp21_); -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp20_->base_path); -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_->base_path = _tmp22_; -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = _vala_row; -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = filename; -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp23_->filename); -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_->filename = _tmp25_; -#line 2778 "FSpotPhotosTable.c" - } -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = _vala_row; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = stmt; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = offset; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = sqlite3_column_text (_tmp27_, _tmp28_ + 4); -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp26_->description); -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_->description = _tmp30_; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->roll_id = _tmp34_; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = stmt; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = offset; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = sqlite3_column_int64 (_tmp36_, _tmp37_ + 6); -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->default_version_id = _tmp38_; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_ = _vala_row; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_ = stmt; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp41_ = offset; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp42_ = sqlite3_column_int (_tmp40_, _tmp41_ + 7); -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_->rating = _tmp42_; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp43_ = _vala_row; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp44_ = stmt; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp45_ = offset; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp46_ = sqlite3_column_text (_tmp44_, _tmp45_ + 8); -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp47_ = g_strdup (_tmp46_); -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp43_->md5_sum); -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp43_->md5_sum = _tmp47_; -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (filename); -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (base_path); -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 2846 "FSpotPhotosTable.c" - } else { -#line 293 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 2850 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v17_behavior_class_init (DataImportsFSpotDbFSpotPhotosV17BehaviorClass * klass) { -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v17_behavior_parent_class = g_type_class_peek_parent (klass); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v17_behavior_finalize; -#line 2860 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v17_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v17_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v17_behavior_real_get_table_name; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v17_behavior_real_list_columns; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v17_behavior_real_build_row; -#line 2873 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v17_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV17Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v17_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV17Behavior * self; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V17_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV17Behavior); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v17_behavior_parent_class)->finalize (obj); -#line 2887 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v17_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v17_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v17_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV17BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v17_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV17Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v17_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v17_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v17_behavior_type_id; - data_imports_fspot_db_fspot_photos_v17_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV17Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v17_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v17_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v17_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v17_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotPhotosV18Behavior * self = NULL; -#line 317 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = (DataImportsFSpotDbFSpotPhotosV18Behavior*) g_object_new (object_type, NULL); -#line 317 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return self; -#line 2911 "FSpotPhotosTable.c" -} - - -static DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_new (void) { -#line 317 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return data_imports_fspot_db_fspot_photos_v18_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR); -#line 2918 "FSpotPhotosTable.c" -} - - -DataImportsFSpotDbFSpotPhotosV18Behavior* data_imports_fspot_db_fspot_photos_v18_behavior_get_instance (void) { - DataImportsFSpotDbFSpotPhotosV18Behavior* result = NULL; - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp0_; - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp2_; - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp3_; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photos_v18_behavior_instance; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp0_ == NULL) { -#line 2931 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotosV18Behavior* _tmp1_; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_photos_v18_behavior_new (); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_photos_v18_behavior_instance); -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v18_behavior_instance = _tmp1_; -#line 2939 "FSpotPhotosTable.c" - } -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_photos_v18_behavior_instance; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp3_; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2949 "FSpotPhotosTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_photos_v18_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotPhotosV18Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior); -#line 327 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_TABLE_NAME); -#line 327 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp0_; -#line 327 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 2965 "FSpotPhotosTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_photos_v18_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotPhotosV18Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar** _tmp8_; - gchar** _tmp9_; - gint _tmp9__length1; -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = g_strdup ("id"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = g_strdup ("time"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = g_strdup ("base_uri"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = g_strdup ("filename"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = g_strdup ("description"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = g_strdup ("roll_id"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = g_strdup ("default_version_id"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = g_strdup ("rating"); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = g_new0 (gchar*, 8 + 1); -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[0] = _tmp0_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[1] = _tmp1_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[2] = _tmp2_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[3] = _tmp3_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[4] = _tmp4_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[5] = _tmp5_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[6] = _tmp6_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_[7] = _tmp7_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = _tmp8_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9__length1 = 8; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (result_length1) { -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *result_length1 = _tmp9__length1; -#line 3027 "FSpotPhotosTable.c" - } -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - result = _tmp9_; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - return result; -#line 3033 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v18_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotPhotoRow* * row, gint offset) { - DataImportsFSpotDbFSpotPhotosV18Behavior * self; - DataImportsFSpotDbFSpotPhotoRow* _vala_row = NULL; - DataImportsFSpotDbFSpotPhotoRow* _tmp0_; - DataImportsFSpotDbFSpotPhotoRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotPhotoRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - gint64 _tmp8_; - gchar* base_path = NULL; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - gchar* filename = NULL; - sqlite3_stmt* _tmp13_; - gint _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; - gboolean _tmp17_ = FALSE; - const gchar* _tmp18_; - DataImportsFSpotDbFSpotPhotoRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; - DataImportsFSpotDbFSpotPhotoRow* _tmp31_; - sqlite3_stmt* _tmp32_; - gint _tmp33_; - gint64 _tmp34_; - DataImportsFSpotDbFSpotPhotoRow* _tmp35_; - sqlite3_stmt* _tmp36_; - gint _tmp37_; - gint64 _tmp38_; - DataImportsFSpotDbFSpotPhotoRow* _tmp39_; - sqlite3_stmt* _tmp40_; - gint _tmp41_; - gint _tmp42_; - DataImportsFSpotDbFSpotPhotoRow* _tmp43_; - gchar* _tmp44_; -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior); -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - g_return_if_fail (stmt != NULL); -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_photo_row_new (); -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 336 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _vala_row = _tmp0_; -#line 337 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_ = _vala_row; -#line 337 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp2_ = stmt; -#line 337 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp3_ = offset; -#line 337 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 337 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp1_->photo_id = _tmp4_; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_ = _vala_row; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp6_ = stmt; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp7_ = offset; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp8_ = sqlite3_column_int64 (_tmp6_, _tmp7_ + 1); -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp5_->time = (time_t) _tmp8_; -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp9_ = stmt; -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp10_ = offset; -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp11_ = sqlite3_column_text (_tmp9_, _tmp10_ + 2); -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - base_path = _tmp12_; -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp13_ = stmt; -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp14_ = offset; -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp15_ = sqlite3_column_text (_tmp13_, _tmp14_ + 3); -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - filename = _tmp16_; -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp18_ = base_path; -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp18_ != NULL) { -#line 3134 "FSpotPhotosTable.c" - const gchar* _tmp19_; -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp19_ = filename; -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = _tmp19_ != NULL; -#line 3140 "FSpotPhotosTable.c" - } else { -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp17_ = FALSE; -#line 3144 "FSpotPhotosTable.c" - } -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (_tmp17_) { -#line 3148 "FSpotPhotosTable.c" - DataImportsFSpotDbFSpotPhotoRow* _tmp20_; - const gchar* _tmp21_; - GFile* _tmp22_; - DataImportsFSpotDbFSpotPhotoRow* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_ = _vala_row; -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp21_ = base_path; -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp22_ = g_file_new_for_uri (_tmp21_); -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_tmp20_->base_path); -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp20_->base_path = _tmp22_; -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_ = _vala_row; -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp24_ = filename; -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp23_->filename); -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp23_->filename = _tmp25_; -#line 3175 "FSpotPhotosTable.c" - } -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_ = _vala_row; -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp27_ = stmt; -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp28_ = offset; -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp29_ = sqlite3_column_text (_tmp27_, _tmp28_ + 4); -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp26_->description); -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp26_->description = _tmp30_; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_ = _vala_row; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp32_ = stmt; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp33_ = offset; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp32_, _tmp33_ + 5); -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp31_->roll_id = _tmp34_; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_ = _vala_row; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp36_ = stmt; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp37_ = offset; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp38_ = sqlite3_column_int64 (_tmp36_, _tmp37_ + 6); -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp35_->default_version_id = _tmp38_; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_ = _vala_row; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp40_ = stmt; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp41_ = offset; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp42_ = sqlite3_column_int (_tmp40_, _tmp41_ + 7); -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp39_->rating = _tmp42_; -#line 351 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp43_ = _vala_row; -#line 351 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp44_ = g_strdup (""); -#line 351 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (_tmp43_->md5_sum); -#line 351 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _tmp43_->md5_sum = _tmp44_; -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (filename); -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_free0 (base_path); -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - if (row) { -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - *row = _vala_row; -#line 3237 "FSpotPhotosTable.c" - } else { -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - _g_object_unref0 (_vala_row); -#line 3241 "FSpotPhotosTable.c" - } -} - - -static void data_imports_fspot_db_fspot_photos_v18_behavior_class_init (DataImportsFSpotDbFSpotPhotosV18BehaviorClass * klass) { -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v18_behavior_parent_class = g_type_class_peek_parent (klass); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_photos_v18_behavior_finalize; -#line 3251 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v18_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - data_imports_fspot_db_fspot_photos_v18_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_photos_v18_behavior_real_get_table_name; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_photos_v18_behavior_real_list_columns; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_photos_v18_behavior_real_build_row; -#line 3264 "FSpotPhotosTable.c" -} - - -static void data_imports_fspot_db_fspot_photos_v18_behavior_instance_init (DataImportsFSpotDbFSpotPhotosV18Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_photos_v18_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotPhotosV18Behavior * self; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_V18_BEHAVIOR, DataImportsFSpotDbFSpotPhotosV18Behavior); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotPhotosTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_photos_v18_behavior_parent_class)->finalize (obj); -#line 3278 "FSpotPhotosTable.c" -} - - -GType data_imports_fspot_db_fspot_photos_v18_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_photos_v18_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_photos_v18_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotPhotosV18BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_photos_v18_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotPhotosV18Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_photos_v18_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_photos_v18_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_photos_v18_behavior_type_id; - data_imports_fspot_db_fspot_photos_v18_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotPhotosV18Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_photos_v18_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_photos_v18_behavior_type_id__volatile, data_imports_fspot_db_fspot_photos_v18_behavior_type_id); - } - return data_imports_fspot_db_fspot_photos_v18_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotPhotosTable.vala b/plugins/shotwell-data-imports/FSpotPhotosTable.vala deleted file mode 100644 index 39329d4..0000000 --- a/plugins/shotwell-data-imports/FSpotPhotosTable.vala +++ /dev/null @@ -1,356 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "photos" table, representing a single database row. - */ -public class FSpotPhotoRow : Object { - public int64 photo_id; - public time_t time; - public File? base_path; - public string? filename; - public string description; - public int64 roll_id; - public int64 default_version_id; - public int rating; - public string md5_sum; -} - -/** - * This class represents the F-Spot photos table. - */ -public class FSpotPhotosTable : FSpotDatabaseTable<FSpotPhotoRow> { - public const string TABLE_NAME = "Photos"; - - public FSpotPhotosTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) { - base(db); - set_behavior(db_behavior.get_photos_behavior()); - } - - public Gee.ArrayList<FSpotPhotoRow> get_all() throws DatabaseError { - Gee.ArrayList<FSpotPhotoRow> all = new Gee.ArrayList<FSpotPhotoRow?>(); - - Sqlite.Statement stmt; - int res = select_all(out stmt); - while (res == Sqlite.ROW) { - FSpotPhotoRow row; - behavior.build_row(stmt, out row); - all.add(row); - res = stmt.step(); - } - - return all; - } -} - -// Photos table behavior for v0-4 -// The original table format -public class FSpotPhotosV0Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV0Behavior instance; - - private FSpotPhotosV0Behavior() { - } - - public static FSpotPhotosV0Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV0Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "directory_path", "name", "description", - "default_version_id" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? base_path = stmt.column_text(offset + 2); - string? filename = stmt.column_text(offset + 3); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.description = stmt.column_text(offset + 4); - row.roll_id = INVALID_ID; - row.default_version_id = stmt.column_int64(offset + 5); - row.rating = 0; - row.md5_sum = ""; - } -} - -// Photos table behavior for v5-6 -// v5 introduced a roll_id to reference the imported roll (rolls were a new -// table migrated from imports) -public class FSpotPhotosV5Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV5Behavior instance; - - private FSpotPhotosV5Behavior() { - } - - public static FSpotPhotosV5Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV5Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "directory_path", "name", "description", "roll_id", - "default_version_id" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? base_path = stmt.column_text(offset + 2); - string? filename = stmt.column_text(offset + 3); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.description = stmt.column_text(offset + 4); - row.roll_id = stmt.column_int64(offset + 5); - row.default_version_id = stmt.column_int64(offset + 6); - row.rating = 0; - row.md5_sum = ""; - } -} - -// Photos table behavior for v7-10 -// v7 merged directory_path and name into a single URI value with a file:// -// prefix; presumaly this is meant to be able to handle remote files using a -// different URI prefix such as remote files -public class FSpotPhotosV7Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV7Behavior instance; - - private FSpotPhotosV7Behavior() { - } - - public static FSpotPhotosV7Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV7Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "uri", "description", "roll_id", - "default_version_id" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? full_path = stmt.column_text(offset + 2); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.description = stmt.column_text(offset + 3); - row.roll_id = stmt.column_int64(offset + 4); - row.default_version_id = stmt.column_int64(offset + 5); - row.rating = 0; - row.md5_sum = ""; - } -} - -// Photos table behavior for v11-15 -// v11 introduced the concept of rating so add this to the list of fields -public class FSpotPhotosV11Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV11Behavior instance; - - private FSpotPhotosV11Behavior() { - } - - public static FSpotPhotosV11Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV11Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "uri", "description", "roll_id", - "default_version_id", "rating" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? full_path = stmt.column_text(offset + 2); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.description = stmt.column_text(offset + 3); - row.roll_id = stmt.column_int64(offset + 4); - row.default_version_id = stmt.column_int64(offset + 5); - row.rating = stmt.column_int(offset + 6); - row.md5_sum = ""; - } -} - -// Photos table behavior for v16 -// v16 introduced the MD5 sum so add this to the list of fields -public class FSpotPhotosV16Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV16Behavior instance; - - private FSpotPhotosV16Behavior() { - } - - public static FSpotPhotosV16Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV16Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "uri", "description", "roll_id", - "default_version_id", "rating", "md5_sum" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? full_path = stmt.column_text(offset + 2); - if (full_path != null) { - File uri = File.new_for_uri(full_path); - row.base_path = uri.get_parent(); - row.filename = uri.get_basename(); - } - - row.description = stmt.column_text(offset + 3); - row.roll_id = stmt.column_int64(offset + 4); - row.default_version_id = stmt.column_int64(offset + 5); - row.rating = stmt.column_int(offset + 6); - row.md5_sum = stmt.column_text(offset + 7); - } -} - -// Photos table behavior for v17 -// v17 split the URI into base_uri and filename (reverting back to the original -// design introduced in v0, albeit with a URI rather than a file system path) -public class FSpotPhotosV17Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV17Behavior instance; - - private FSpotPhotosV17Behavior() { - } - - public static FSpotPhotosV17Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV17Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "base_uri", "filename", "description", "roll_id", - "default_version_id", "rating", "md5_sum" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? base_path = stmt.column_text(offset + 2); - string? filename = stmt.column_text(offset + 3); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.description = stmt.column_text(offset + 4); - row.roll_id = stmt.column_int64(offset + 5); - row.default_version_id = stmt.column_int64(offset + 6); - row.rating = stmt.column_int(offset + 7); - row.md5_sum = stmt.column_text(offset + 8); - } -} - -// v18: no more MD5 hash in the photos table: moved to photo_versions table -public class FSpotPhotosV18Behavior : FSpotTableBehavior<FSpotPhotoRow>, Object { - private static FSpotPhotosV18Behavior instance; - - private FSpotPhotosV18Behavior() { - } - - public static FSpotPhotosV18Behavior get_instance() { - if (instance == null) - instance = new FSpotPhotosV18Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotPhotosTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time", "base_uri", "filename", "description", "roll_id", - "default_version_id", "rating" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotPhotoRow row, int offset = 0) { - row = new FSpotPhotoRow(); - row.photo_id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - - string? base_path = stmt.column_text(offset + 2); - string? filename = stmt.column_text(offset + 3); - if (base_path != null && filename != null) { - row.base_path = File.new_for_uri(base_path); - row.filename = filename; - } - - row.description = stmt.column_text(offset + 4); - row.roll_id = stmt.column_int64(offset + 5); - row.default_version_id = stmt.column_int64(offset + 6); - row.rating = stmt.column_int(offset + 7); - row.md5_sum = ""; - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotRollsTable.c b/plugins/shotwell-data-imports/FSpotRollsTable.c deleted file mode 100644 index 3b3e3e4..0000000 --- a/plugins/shotwell-data-imports/FSpotRollsTable.c +++ /dev/null @@ -1,995 +0,0 @@ -/* FSpotRollsTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotRollsTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <time.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW (data_imports_fspot_db_fspot_roll_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRowClass)) - -typedef struct _DataImportsFSpotDbFSpotRollRow DataImportsFSpotDbFSpotRollRow; -typedef struct _DataImportsFSpotDbFSpotRollRowClass DataImportsFSpotDbFSpotRollRowClass; -typedef struct _DataImportsFSpotDbFSpotRollRowPrivate DataImportsFSpotDbFSpotRollRowPrivate; - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE (data_imports_fspot_db_fspot_rolls_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsTable DataImportsFSpotDbFSpotRollsTable; -typedef struct _DataImportsFSpotDbFSpotRollsTableClass DataImportsFSpotDbFSpotRollsTableClass; -typedef struct _DataImportsFSpotDbFSpotRollsTablePrivate DataImportsFSpotDbFSpotRollsTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR (data_imports_fspot_db_fspot_rolls_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsV0Behavior DataImportsFSpotDbFSpotRollsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotRollsV0BehaviorClass DataImportsFSpotDbFSpotRollsV0BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotRollsV0BehaviorPrivate DataImportsFSpotDbFSpotRollsV0BehaviorPrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR (data_imports_fspot_db_fspot_rolls_v5_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V5_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_V5_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotRollsV5Behavior DataImportsFSpotDbFSpotRollsV5Behavior; -typedef struct _DataImportsFSpotDbFSpotRollsV5BehaviorClass DataImportsFSpotDbFSpotRollsV5BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotRollsV5BehaviorPrivate DataImportsFSpotDbFSpotRollsV5BehaviorPrivate; - -struct _DataImportsFSpotDbFSpotRollRow { - GObject parent_instance; - DataImportsFSpotDbFSpotRollRowPrivate * priv; - gint64 id; - time_t time; -}; - -struct _DataImportsFSpotDbFSpotRollRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotRollsTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotRollsTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotRollsTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotDbFSpotRollsV0Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotRollsV0BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotRollsV0BehaviorClass { - GObjectClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotRollsV5Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotRollsV5BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotRollsV5BehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_roll_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_rolls_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_rolls_v0_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_instance; -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_rolls_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; -static gpointer data_imports_fspot_db_fspot_rolls_v5_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_instance; -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_rolls_v5_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_roll_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_ROLL_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_roll_row_new (void); -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_roll_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_roll_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_rolls_table_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME "Rolls" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME_PRE_V5 "Imports" -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_rolls_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -GQuark database_error_quark (void); -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_rolls_table_get_by_id (DataImportsFSpotDbFSpotRollsTable* self, gint64 roll_id, GError** error); -gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -GType data_imports_fspot_db_fspot_rolls_v0_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V0_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_new (void); -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_rolls_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_rolls_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_rolls_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotRollRow* * row, gint offset); -static void data_imports_fspot_db_fspot_rolls_v0_behavior_finalize (GObject * obj); -GType data_imports_fspot_db_fspot_rolls_v5_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_V5_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_new (void); -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_rolls_v5_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_rolls_v5_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_rolls_v5_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotRollRow* * row, gint offset); -static void data_imports_fspot_db_fspot_rolls_v5_behavior_finalize (GObject * obj); - - -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_roll_row_construct (GType object_type) { - DataImportsFSpotDbFSpotRollRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = (DataImportsFSpotDbFSpotRollRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return self; -#line 258 "FSpotRollsTable.c" -} - - -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_roll_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return data_imports_fspot_db_fspot_roll_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW); -#line 265 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_roll_row_class_init (DataImportsFSpotDbFSpotRollRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_roll_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_roll_row_finalize; -#line 274 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_roll_row_instance_init (DataImportsFSpotDbFSpotRollRow * self) { -} - - -static void data_imports_fspot_db_fspot_roll_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotRollRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, DataImportsFSpotDbFSpotRollRow); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_roll_row_parent_class)->finalize (obj); -#line 288 "FSpotRollsTable.c" -} - - -/** - * The value object for the "rolls" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_roll_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_roll_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_roll_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotRollRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_roll_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotRollRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_roll_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_roll_row_type_id; - data_imports_fspot_db_fspot_roll_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotRollRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_roll_row_type_id__volatile, data_imports_fspot_db_fspot_roll_row_type_id); - } - return data_imports_fspot_db_fspot_roll_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { - DataImportsFSpotDbFSpotRollsTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL); -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = db; -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = (DataImportsFSpotDbFSpotRollsTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLL_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = db_behavior; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_rolls_behavior (_tmp1_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = _tmp2_; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (_tmp3_); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return self; -#line 333 "FSpotRollsTable.c" -} - - -DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return data_imports_fspot_db_fspot_rolls_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, db, db_behavior); -#line 340 "FSpotRollsTable.c" -} - - -DataImportsFSpotDbFSpotRollRow* data_imports_fspot_db_fspot_rolls_table_get_by_id (DataImportsFSpotDbFSpotRollsTable* self, gint64 roll_id, GError** error) { - DataImportsFSpotDbFSpotRollRow* result = NULL; - sqlite3_stmt* stmt = NULL; - DataImportsFSpotDbFSpotRollRow* row = NULL; - gchar* column_list = NULL; - gchar* _tmp0_; - gchar* sql = NULL; - const gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - gint res = 0; - sqlite3* _tmp4_; - const gchar* _tmp5_; - sqlite3_stmt* _tmp6_ = NULL; - gint _tmp7_; - gint _tmp8_; - sqlite3_stmt* _tmp13_; - gint64 _tmp14_; - gint _tmp15_; - gint _tmp16_; - sqlite3_stmt* _tmp18_; - gint _tmp19_; - gint _tmp20_; - GError * _inner_error_ = NULL; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE (self), NULL); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - row = NULL; -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), FALSE); -#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - column_list = _tmp0_; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = column_list; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", _tmp1_, _tmp2_); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - sql = _tmp3_; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp5_ = sql; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp7_ = sqlite3_prepare_v2 (_tmp4_, _tmp5_, -1, &_tmp6_, NULL); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - stmt = _tmp6_; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - res = _tmp7_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp8_ = res; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp8_ != SQLITE_OK) { -#line 400 "FSpotRollsTable.c" - const gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gint _tmp12_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp9_ = sql; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp10_ = g_strdup_printf ("Statement failed: %s", _tmp9_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp11_ = _tmp10_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp12_ = res; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - importable_database_table_throw_error (_tmp11_, _tmp12_, &_inner_error_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (_tmp11_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_propagate_error (error, _inner_error_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (sql); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (column_list); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (row); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return NULL; -#line 433 "FSpotRollsTable.c" - } else { -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (sql); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (column_list); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (row); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_clear_error (&_inner_error_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return NULL; -#line 449 "FSpotRollsTable.c" - } - } - } -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp13_ = stmt; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp14_ = roll_id; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp15_ = sqlite3_bind_int64 (_tmp13_, 1, _tmp14_); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - res = _tmp15_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp16_ = res; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp16_ != SQLITE_OK) { -#line 465 "FSpotRollsTable.c" - gint _tmp17_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp17_ = res; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - importable_database_table_throw_error ("Bind failed for roll_id", _tmp17_, &_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_propagate_error (error, _inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (sql); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (column_list); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (row); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return NULL; -#line 487 "FSpotRollsTable.c" - } else { -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (sql); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (column_list); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (row); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_clear_error (&_inner_error_); -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return NULL; -#line 503 "FSpotRollsTable.c" - } - } - } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp18_ = stmt; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp19_ = sqlite3_step (_tmp18_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - res = _tmp19_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp20_ = res; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp20_ == SQLITE_ROW) { -#line 517 "FSpotRollsTable.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp21_; - sqlite3_stmt* _tmp22_; - gpointer _tmp23_ = NULL; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp21_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp22_ = stmt; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp21_, _tmp22_, &_tmp23_, 0); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (row); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - row = _tmp23_; -#line 531 "FSpotRollsTable.c" - } else { - gint _tmp24_; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp24_ = res; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp24_ == SQLITE_DONE) { -#line 538 "FSpotRollsTable.c" - gint64 _tmp25_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp25_ = roll_id; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_message ("FSpotRollsTable.vala:47: Could not find roll row with ID %d", (gint) _tmp25_); -#line 544 "FSpotRollsTable.c" - } - } -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = row; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _sqlite3_finalize0 (stmt); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 557 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_table_class_init (DataImportsFSpotDbFSpotRollsTableClass * klass) { -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_table_parent_class = g_type_class_peek_parent (klass); -#line 564 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_table_instance_init (DataImportsFSpotDbFSpotRollsTable * self) { -} - - -/** - * This class represents the F-Spot rolls table. - */ -GType data_imports_fspot_db_fspot_rolls_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_rolls_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_rolls_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotRollsTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_rolls_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotRollsTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_rolls_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_rolls_table_type_id; - data_imports_fspot_db_fspot_rolls_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotRollsTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_rolls_table_type_id__volatile, data_imports_fspot_db_fspot_rolls_table_type_id); - } - return data_imports_fspot_db_fspot_rolls_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotRollsV0Behavior * self = NULL; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = (DataImportsFSpotDbFSpotRollsV0Behavior*) g_object_new (object_type, NULL); -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return self; -#line 593 "FSpotRollsTable.c" -} - - -static DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_new (void) { -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return data_imports_fspot_db_fspot_rolls_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR); -#line 600 "FSpotRollsTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return self ? g_object_ref (self) : NULL; -#line 607 "FSpotRollsTable.c" -} - - -DataImportsFSpotDbFSpotRollsV0Behavior* data_imports_fspot_db_fspot_rolls_v0_behavior_get_instance (void) { - DataImportsFSpotDbFSpotRollsV0Behavior* result = NULL; - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp0_; - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp2_; - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp3_; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_rolls_v0_behavior_instance; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp0_ == NULL) { -#line 620 "FSpotRollsTable.c" - DataImportsFSpotDbFSpotRollsV0Behavior* _tmp1_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_rolls_v0_behavior_new (); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_rolls_v0_behavior_instance); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v0_behavior_instance = _tmp1_; -#line 628 "FSpotRollsTable.c" - } -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_rolls_v0_behavior_instance; -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp3_; -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 638 "FSpotRollsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_rolls_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotRollsV0Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME_PRE_V5); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp0_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 654 "FSpotRollsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_rolls_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotRollsV0Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint _tmp3__length1; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = g_strdup ("id"); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = g_strdup ("time"); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = g_new0 (gchar*, 2 + 1); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_[0] = _tmp0_; -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_[1] = _tmp1_; -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = _tmp2_; -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3__length1 = 2; -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (result_length1) { -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - *result_length1 = _tmp3__length1; -#line 686 "FSpotRollsTable.c" - } -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp3_; -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 692 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotRollRow* * row, gint offset) { - DataImportsFSpotDbFSpotRollsV0Behavior * self; - DataImportsFSpotDbFSpotRollRow* _vala_row = NULL; - DataImportsFSpotDbFSpotRollRow* _tmp0_; - sqlite3_stmt* _tmp1_; - gint _tmp2_; - gint64 _tmp3_; - sqlite3_stmt* _tmp4_; - gint _tmp5_; - gint64 _tmp6_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_return_if_fail (stmt != NULL); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_roll_row_new (); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (_vala_row); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row = _tmp0_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = stmt; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = offset; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = sqlite3_column_int64 (_tmp1_, _tmp2_ + 0); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row->id = _tmp3_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp4_ = stmt; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp5_ = offset; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp6_ = sqlite3_column_int64 (_tmp4_, _tmp5_ + 1); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row->time = (time_t) _tmp6_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (row) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - *row = _vala_row; -#line 736 "FSpotRollsTable.c" - } else { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (_vala_row); -#line 740 "FSpotRollsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_rolls_v0_behavior_class_init (DataImportsFSpotDbFSpotRollsV0BehaviorClass * klass) { -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v0_behavior_parent_class = g_type_class_peek_parent (klass); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_rolls_v0_behavior_finalize; -#line 750 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_rolls_v0_behavior_real_get_table_name; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_rolls_v0_behavior_real_list_columns; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_rolls_v0_behavior_real_build_row; -#line 763 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v0_behavior_instance_init (DataImportsFSpotDbFSpotRollsV0Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_rolls_v0_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotRollsV0Behavior * self; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V0_BEHAVIOR, DataImportsFSpotDbFSpotRollsV0Behavior); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_rolls_v0_behavior_parent_class)->finalize (obj); -#line 777 "FSpotRollsTable.c" -} - - -GType data_imports_fspot_db_fspot_rolls_v0_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_rolls_v0_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_rolls_v0_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotRollsV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_rolls_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotRollsV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_rolls_v0_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_rolls_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_rolls_v0_behavior_type_id; - data_imports_fspot_db_fspot_rolls_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotRollsV0Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_rolls_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_rolls_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_rolls_v0_behavior_type_id); - } - return data_imports_fspot_db_fspot_rolls_v0_behavior_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotRollsV5Behavior * self = NULL; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = (DataImportsFSpotDbFSpotRollsV5Behavior*) g_object_new (object_type, NULL); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return self; -#line 801 "FSpotRollsTable.c" -} - - -static DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_new (void) { -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return data_imports_fspot_db_fspot_rolls_v5_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR); -#line 808 "FSpotRollsTable.c" -} - - -DataImportsFSpotDbFSpotRollsV5Behavior* data_imports_fspot_db_fspot_rolls_v5_behavior_get_instance (void) { - DataImportsFSpotDbFSpotRollsV5Behavior* result = NULL; - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp0_; - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp2_; - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp3_; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_rolls_v5_behavior_instance; -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (_tmp0_ == NULL) { -#line 821 "FSpotRollsTable.c" - DataImportsFSpotDbFSpotRollsV5Behavior* _tmp1_; -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_rolls_v5_behavior_new (); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_rolls_v5_behavior_instance); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v5_behavior_instance = _tmp1_; -#line 829 "FSpotRollsTable.c" - } -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_rolls_v5_behavior_instance; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp3_; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 839 "FSpotRollsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_rolls_v5_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotRollsV5Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_TABLE_NAME); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp0_; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 855 "FSpotRollsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_rolls_v5_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotRollsV5Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint _tmp3__length1; -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = g_strdup ("id"); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = g_strdup ("time"); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = g_new0 (gchar*, 2 + 1); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_[0] = _tmp0_; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_[1] = _tmp1_; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = _tmp2_; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3__length1 = 2; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (result_length1) { -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - *result_length1 = _tmp3__length1; -#line 887 "FSpotRollsTable.c" - } -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - result = _tmp3_; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - return result; -#line 893 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v5_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotRollRow* * row, gint offset) { - DataImportsFSpotDbFSpotRollsV5Behavior * self; - DataImportsFSpotDbFSpotRollRow* _vala_row = NULL; - DataImportsFSpotDbFSpotRollRow* _tmp0_; - sqlite3_stmt* _tmp1_; - gint _tmp2_; - gint64 _tmp3_; - sqlite3_stmt* _tmp4_; - gint _tmp5_; - gint64 _tmp6_; -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior); -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - g_return_if_fail (stmt != NULL); -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_roll_row_new (); -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (_vala_row); -#line 104 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row = _tmp0_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp1_ = stmt; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp2_ = offset; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp3_ = sqlite3_column_int64 (_tmp1_, _tmp2_ + 0); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row->id = _tmp3_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp4_ = stmt; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp5_ = offset; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _tmp6_ = sqlite3_column_int64 (_tmp4_, _tmp5_ + 1); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _vala_row->time = (time_t) _tmp6_; -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - if (row) { -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - *row = _vala_row; -#line 937 "FSpotRollsTable.c" - } else { -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - _g_object_unref0 (_vala_row); -#line 941 "FSpotRollsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_rolls_v5_behavior_class_init (DataImportsFSpotDbFSpotRollsV5BehaviorClass * klass) { -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v5_behavior_parent_class = g_type_class_peek_parent (klass); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_rolls_v5_behavior_finalize; -#line 951 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v5_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - data_imports_fspot_db_fspot_rolls_v5_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_rolls_v5_behavior_real_get_table_name; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_rolls_v5_behavior_real_list_columns; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_rolls_v5_behavior_real_build_row; -#line 964 "FSpotRollsTable.c" -} - - -static void data_imports_fspot_db_fspot_rolls_v5_behavior_instance_init (DataImportsFSpotDbFSpotRollsV5Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_rolls_v5_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotRollsV5Behavior * self; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_V5_BEHAVIOR, DataImportsFSpotDbFSpotRollsV5Behavior); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotRollsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_rolls_v5_behavior_parent_class)->finalize (obj); -#line 978 "FSpotRollsTable.c" -} - - -GType data_imports_fspot_db_fspot_rolls_v5_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_rolls_v5_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_rolls_v5_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotRollsV5BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_rolls_v5_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotRollsV5Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_rolls_v5_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_rolls_v5_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_rolls_v5_behavior_type_id; - data_imports_fspot_db_fspot_rolls_v5_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotRollsV5Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_rolls_v5_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_rolls_v5_behavior_type_id__volatile, data_imports_fspot_db_fspot_rolls_v5_behavior_type_id); - } - return data_imports_fspot_db_fspot_rolls_v5_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotRollsTable.vala b/plugins/shotwell-data-imports/FSpotRollsTable.vala deleted file mode 100644 index 8a5ee8c..0000000 --- a/plugins/shotwell-data-imports/FSpotRollsTable.vala +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "rolls" table, representing a single database row. - */ -public class FSpotRollRow : Object { - public int64 id; - public time_t time; -} - -/** - * This class represents the F-Spot rolls table. - */ -public class FSpotRollsTable : FSpotDatabaseTable<FSpotRollRow> { - public const string TABLE_NAME = "Rolls"; - public const string TABLE_NAME_PRE_V5 = "Imports"; - - public FSpotRollsTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) { - base(db); - set_behavior(db_behavior.get_rolls_behavior()); - } - - public FSpotRollRow? get_by_id(int64 roll_id) throws DatabaseError { - Sqlite.Statement stmt; - FSpotRollRow? row = null; - string column_list = get_joined_column_list(); - string sql = "SELECT %s FROM %s WHERE id=?".printf(column_list, table_name); - - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.bind_int64(1, roll_id); - if (res != Sqlite.OK) - throw_error("Bind failed for roll_id", res); - - res = stmt.step(); - if (res == Sqlite.ROW) - behavior.build_row(stmt, out row); - else if (res == Sqlite.DONE) - message("Could not find roll row with ID %d", (int)roll_id); - - return row; - } -} - -// Rolls table behavior for v0-4 -public class FSpotRollsV0Behavior : FSpotTableBehavior<FSpotRollRow>, Object { - private static FSpotRollsV0Behavior instance; - - private FSpotRollsV0Behavior() { - } - - public static FSpotRollsV0Behavior get_instance() { - if (instance == null) - instance = new FSpotRollsV0Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotRollsTable.TABLE_NAME_PRE_V5; - } - - public string[] list_columns() { - return { "id", "time" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotRollRow row, int offset = 0) { - row = new FSpotRollRow(); - row.id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - } -} - -// Rolls table behavior for v5+ -// Table name changed from "imports" to "rolls" -public class FSpotRollsV5Behavior : FSpotTableBehavior<FSpotRollRow>, Object { - private static FSpotRollsV5Behavior instance; - - private FSpotRollsV5Behavior() { - } - - public static FSpotRollsV5Behavior get_instance() { - if (instance == null) - instance = new FSpotRollsV5Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotRollsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "time" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotRollRow row, int offset = 0) { - row = new FSpotRollRow(); - row.id = stmt.column_int64(offset + 0); - row.time = (time_t) stmt.column_int64(offset + 1); - } -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotTableBehavior.c b/plugins/shotwell-data-imports/FSpotTableBehavior.c deleted file mode 100644 index 016fee8..0000000 --- a/plugins/shotwell-data-imports/FSpotTableBehavior.c +++ /dev/null @@ -1,102 +0,0 @@ -/* FSpotTableBehavior.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotTableBehavior.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - - - -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -gchar* data_imports_fspot_db_fspot_table_behavior_get_table_name (DataImportsFSpotDbFSpotTableBehavior* self); -gchar** data_imports_fspot_db_fspot_table_behavior_list_columns (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); - - -gchar* data_imports_fspot_db_fspot_table_behavior_get_table_name (DataImportsFSpotDbFSpotTableBehavior* self) { -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR (self), NULL); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - return DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE (self)->get_table_name (self); -#line 46 "FSpotTableBehavior.c" -} - - -gchar** data_imports_fspot_db_fspot_table_behavior_list_columns (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1) { -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR (self), NULL); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - return DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE (self)->list_columns (self, result_length1); -#line 55 "FSpotTableBehavior.c" -} - - -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset) { -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - g_return_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR (self)); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE (self)->build_row (self, stmt, row, offset); -#line 64 "FSpotTableBehavior.c" -} - - -static void data_imports_fspot_db_fspot_table_behavior_base_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - static gboolean initialized = FALSE; -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - if (!initialized) { -#line 19 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTableBehavior.vala" - initialized = TRUE; -#line 75 "FSpotTableBehavior.c" - } -} - - -/** - * This class defines a generic table behavior. In practice, it implements - * the concept of a DAO (Data Access Object) in ORM terms and is responsible - * for transforming the data extracted from a relational statement into a - * lightweight value object. - * - * The type T defined in the generic is the value object type a behavior - * implementation is designed to handle. Value object types are designed to - * contain the data for a single database row. - */ -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_table_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_table_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTableBehaviorIface), (GBaseInitFunc) data_imports_fspot_db_fspot_table_behavior_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType data_imports_fspot_db_fspot_table_behavior_type_id; - data_imports_fspot_db_fspot_table_behavior_type_id = g_type_register_static (G_TYPE_INTERFACE, "DataImportsFSpotDbFSpotTableBehavior", &g_define_type_info, 0); - g_type_interface_add_prerequisite (data_imports_fspot_db_fspot_table_behavior_type_id, G_TYPE_OBJECT); - g_once_init_leave (&data_imports_fspot_db_fspot_table_behavior_type_id__volatile, data_imports_fspot_db_fspot_table_behavior_type_id); - } - return data_imports_fspot_db_fspot_table_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotTableBehavior.vala b/plugins/shotwell-data-imports/FSpotTableBehavior.vala deleted file mode 100644 index 0922912..0000000 --- a/plugins/shotwell-data-imports/FSpotTableBehavior.vala +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * This class defines a generic table behavior. In practice, it implements - * the concept of a DAO (Data Access Object) in ORM terms and is responsible - * for transforming the data extracted from a relational statement into a - * lightweight value object. - * - * The type T defined in the generic is the value object type a behavior - * implementation is designed to handle. Value object types are designed to - * contain the data for a single database row. - */ -public interface FSpotTableBehavior<T> : Object { - public abstract string get_table_name(); - - public abstract string[] list_columns(); - - public abstract void build_row(Sqlite.Statement stmt, out T row, int offset = 0); -} - -} - diff --git a/plugins/shotwell-data-imports/FSpotTagsTable.c b/plugins/shotwell-data-imports/FSpotTagsTable.c deleted file mode 100644 index 54fe7c6..0000000 --- a/plugins/shotwell-data-imports/FSpotTagsTable.c +++ /dev/null @@ -1,1169 +0,0 @@ -/* FSpotTagsTable.c generated by valac 0.36.6, the Vala compiler - * generated from FSpotTagsTable.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> -#include <gee.h> - - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW (data_imports_fspot_db_fspot_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotTagRow DataImportsFSpotDbFSpotTagRow; -typedef struct _DataImportsFSpotDbFSpotTagRowClass DataImportsFSpotDbFSpotTagRowClass; -typedef struct _DataImportsFSpotDbFSpotTagRowPrivate DataImportsFSpotDbFSpotTagRowPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable; -typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass; -typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface)) - -typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior; -typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE (data_imports_fspot_db_fspot_tags_table_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass)) - -typedef struct _DataImportsFSpotDbFSpotTagsTable DataImportsFSpotDbFSpotTagsTable; -typedef struct _DataImportsFSpotDbFSpotTagsTableClass DataImportsFSpotDbFSpotTagsTableClass; -typedef struct _DataImportsFSpotDbFSpotTagsTablePrivate DataImportsFSpotDbFSpotTagsTablePrivate; - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW (data_imports_fspot_db_fspot_photo_tag_row_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRow)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass)) - -typedef struct _DataImportsFSpotDbFSpotPhotoTagRow DataImportsFSpotDbFSpotPhotoTagRow; -typedef struct _DataImportsFSpotDbFSpotPhotoTagRowClass DataImportsFSpotDbFSpotPhotoTagRowClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior; -typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass; -#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL))) - -#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR (data_imports_fspot_db_fspot_tags_v0_behavior_get_type ()) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR)) -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass)) - -typedef struct _DataImportsFSpotDbFSpotTagsV0Behavior DataImportsFSpotDbFSpotTagsV0Behavior; -typedef struct _DataImportsFSpotDbFSpotTagsV0BehaviorClass DataImportsFSpotDbFSpotTagsV0BehaviorClass; -typedef struct _DataImportsFSpotDbFSpotTagsV0BehaviorPrivate DataImportsFSpotDbFSpotTagsV0BehaviorPrivate; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _DataImportsFSpotDbFSpotTagRow { - GObject parent_instance; - DataImportsFSpotDbFSpotTagRowPrivate * priv; - gint64 tag_id; - gchar* name; - gint64 category_id; - gboolean is_category; - gint sort_priority; - gchar* stock_icon; -}; - -struct _DataImportsFSpotDbFSpotTagRowClass { - GObjectClass parent_class; -}; - -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _DataImportsFSpotDbFSpotTableBehaviorIface { - GTypeInterface parent_iface; - gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self); - gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1); - void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -}; - -struct _DataImportsFSpotDbFSpotDatabaseTable { - ImportableDatabaseTable parent_instance; - DataImportsFSpotDbFSpotDatabaseTablePrivate * priv; - sqlite3* fspot_db; - DataImportsFSpotDbFSpotTableBehavior* behavior; -}; - -struct _DataImportsFSpotDbFSpotDatabaseTableClass { - ImportableDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotTagsTable { - DataImportsFSpotDbFSpotDatabaseTable parent_instance; - DataImportsFSpotDbFSpotTagsTablePrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotTagsTableClass { - DataImportsFSpotDbFSpotDatabaseTableClass parent_class; -}; - -struct _DataImportsFSpotDbFSpotTagsTablePrivate { - DataImportsFSpotDbFSpotTableBehavior* photo_tags_behavior; -}; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _DataImportsFSpotDbFSpotTagsV0Behavior { - GObject parent_instance; - DataImportsFSpotDbFSpotTagsV0BehaviorPrivate * priv; -}; - -struct _DataImportsFSpotDbFSpotTagsV0BehaviorClass { - GObjectClass parent_class; -}; - - -static gpointer data_imports_fspot_db_fspot_tag_row_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_tags_table_parent_class = NULL; -static gpointer data_imports_fspot_db_fspot_tags_v0_behavior_parent_class = NULL; -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_instance; -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_instance = NULL; -static DataImportsFSpotDbFSpotTableBehaviorIface * data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL; - -GType data_imports_fspot_db_fspot_tag_row_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_DUMMY_PROPERTY -}; -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_new (void); -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_construct (GType object_type); -static void data_imports_fspot_db_fspot_tag_row_finalize (GObject * obj); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_tags_table_get_type (void) G_GNUC_CONST; -GType data_imports_fspot_db_fspot_photo_tag_row_get_type (void) G_GNUC_CONST; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTablePrivate)) -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_DUMMY_PROPERTY -}; -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME "Tags" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON "stock_icon:" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_FAV "stock_icon:emblem-favorite" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_PEOPLE "stock_icon:emblem-people" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_PLACES "stock_icon:emblem-places" -#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_EVENTS "stock_icon:emblem-event" -GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST; -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior); -DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db); -void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self); -GQuark database_error_quark (void); -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tags_table_get_by_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 tag_id, GError** error); -gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset); -GeeArrayList* data_imports_fspot_db_fspot_tags_table_get_by_photo_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 photo_id, GError** error); -gchar* data_imports_fspot_db_fspot_table_behavior_get_table_name (DataImportsFSpotDbFSpotTableBehavior* self); -static void data_imports_fspot_db_fspot_tags_table_finalize (ImportableDatabaseTable * obj); -GType data_imports_fspot_db_fspot_tags_v0_behavior_get_type (void) G_GNUC_CONST; -enum { - DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_DUMMY_PROPERTY -}; -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_new (void); -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_construct (GType object_type); -DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (void); -static gchar* data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base); -static gchar** data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1); -static void data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotTagRow* * row, gint offset); -static void data_imports_fspot_db_fspot_tags_v0_behavior_finalize (GObject * obj); - - -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_construct (GType object_type) { - DataImportsFSpotDbFSpotTagRow * self = NULL; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = (DataImportsFSpotDbFSpotTagRow*) g_object_new (object_type, NULL); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return self; -#line 255 "FSpotTagsTable.c" -} - - -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_new (void) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return data_imports_fspot_db_fspot_tag_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW); -#line 262 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tag_row_class_init (DataImportsFSpotDbFSpotTagRowClass * klass) { -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_tag_row_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_tag_row_finalize; -#line 271 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tag_row_instance_init (DataImportsFSpotDbFSpotTagRow * self) { -} - - -static void data_imports_fspot_db_fspot_tag_row_finalize (GObject * obj) { - DataImportsFSpotDbFSpotTagRow * self; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (self->name); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (self->stock_icon); -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_tag_row_parent_class)->finalize (obj); -#line 289 "FSpotTagsTable.c" -} - - -/** - * The value object for the "tags" table, representing a single database row. - */ -GType data_imports_fspot_db_fspot_tag_row_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_tag_row_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_tag_row_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tag_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tag_row_instance_init, NULL }; - GType data_imports_fspot_db_fspot_tag_row_type_id; - data_imports_fspot_db_fspot_tag_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotTagRow", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_tag_row_type_id__volatile, data_imports_fspot_db_fspot_tag_row_type_id); - } - return data_imports_fspot_db_fspot_tag_row_type_id__volatile; -} - - -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { - DataImportsFSpotDbFSpotTagsTable* self = NULL; - sqlite3* _tmp0_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_; - DataImportsFSpotDbFSpotTableBehavior* _tmp2_; - DataImportsFSpotDbFSpotTableBehavior* _tmp3_; - DataImportsFSpotDbFSpotDatabaseBehavior* _tmp4_; - DataImportsFSpotDbFSpotTableBehavior* _tmp5_; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_return_val_if_fail (db != NULL, NULL); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = db; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = (DataImportsFSpotDbFSpotTagsTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = db_behavior; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (_tmp1_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = _tmp2_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (_tmp3_); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp4_ = db_behavior; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_ = data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (_tmp4_); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (self->priv->photo_tags_behavior); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self->priv->photo_tags_behavior = _tmp5_; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return self; -#line 344 "FSpotTagsTable.c" -} - - -DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) { -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return data_imports_fspot_db_fspot_tags_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, db, db_behavior); -#line 351 "FSpotTagsTable.c" -} - - -DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tags_table_get_by_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 tag_id, GError** error) { - DataImportsFSpotDbFSpotTagRow* result = NULL; - sqlite3_stmt* stmt = NULL; - DataImportsFSpotDbFSpotTagRow* row = NULL; - gchar* column_list = NULL; - gchar* _tmp0_; - gchar* sql = NULL; - const gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - gint res = 0; - sqlite3* _tmp4_; - const gchar* _tmp5_; - sqlite3_stmt* _tmp6_ = NULL; - gint _tmp7_; - gint _tmp8_; - sqlite3_stmt* _tmp13_; - gint64 _tmp14_; - gint _tmp15_; - gint _tmp16_; - sqlite3_stmt* _tmp17_; - gint _tmp18_; - gint _tmp19_; - GError * _inner_error_ = NULL; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE (self), NULL); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - row = NULL; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), FALSE); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - column_list = _tmp0_; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = column_list; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", _tmp1_, _tmp2_); -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - sql = _tmp3_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_ = sql; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp7_ = sqlite3_prepare_v2 (_tmp4_, _tmp5_, -1, &_tmp6_, NULL); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - stmt = _tmp6_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp7_; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp8_ = res; -#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp8_ != SQLITE_OK) { -#line 411 "FSpotTagsTable.c" - const gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gint _tmp12_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp9_ = sql; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp10_ = g_strdup_printf ("Statement failed: %s", _tmp9_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp11_ = _tmp10_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp12_ = res; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - importable_database_table_throw_error (_tmp11_, _tmp12_, &_inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp11_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_propagate_error (error, _inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (row); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 444 "FSpotTagsTable.c" - } else { -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (row); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_clear_error (&_inner_error_); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 460 "FSpotTagsTable.c" - } - } - } -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp13_ = stmt; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp14_ = tag_id; -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp15_ = sqlite3_bind_int64 (_tmp13_, 1, _tmp14_); -#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp15_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp16_ = res; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _vala_assert (_tmp16_ == SQLITE_OK, "res == Sqlite.OK"); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp17_ = stmt; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp18_ = sqlite3_step (_tmp17_); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp18_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp19_ = res; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp19_ == SQLITE_ROW) { -#line 486 "FSpotTagsTable.c" - DataImportsFSpotDbFSpotTableBehavior* _tmp20_; - sqlite3_stmt* _tmp21_; - gpointer _tmp22_ = NULL; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp21_ = stmt; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp20_, _tmp21_, &_tmp22_, 0); -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (row); -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - row = _tmp22_; -#line 500 "FSpotTagsTable.c" - } else { - gint _tmp23_; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp23_ = res; -#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp23_ == SQLITE_DONE) { -#line 507 "FSpotTagsTable.c" - gint64 _tmp24_; -#line 58 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp24_ = tag_id; -#line 58 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_message ("FSpotTagsTable.vala:58: Could not find tag row with ID %d", (gint) _tmp24_); -#line 513 "FSpotTagsTable.c" - } - } -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - result = row; -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return result; -#line 526 "FSpotTagsTable.c" -} - - -GeeArrayList* data_imports_fspot_db_fspot_tags_table_get_by_photo_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 photo_id, GError** error) { - GeeArrayList* result = NULL; - GeeArrayList* rows = NULL; - GeeArrayList* _tmp0_; - sqlite3_stmt* stmt = NULL; - gchar* column_list = NULL; - gchar* _tmp1_; - gchar* sql = NULL; - const gchar* _tmp2_; - const gchar* _tmp3_; - DataImportsFSpotDbFSpotTableBehavior* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gint res = 0; - sqlite3* _tmp9_; - const gchar* _tmp10_; - sqlite3_stmt* _tmp11_ = NULL; - gint _tmp12_; - gint _tmp13_; - sqlite3_stmt* _tmp18_; - gint64 _tmp19_; - gint _tmp20_; - gint _tmp21_; - sqlite3_stmt* _tmp23_; - gint _tmp24_; - GError * _inner_error_ = NULL; -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE (self), NULL); -#line 64 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 64 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - rows = _tmp0_; -#line 68 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), TRUE); -#line 68 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - column_list = _tmp1_; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = column_list; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp4_ = self->priv->photo_tags_behavior; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_ = data_imports_fspot_db_fspot_table_behavior_get_table_name (_tmp4_); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_ = _tmp5_; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp7_ = g_strdup_printf ("SELECT %1$s FROM %2$s, %3$s WHERE %3$s.photo_id=? AND %3$s.tag_id = %2" \ -"$s.id", _tmp2_, _tmp3_, _tmp6_); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp8_ = _tmp7_; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp6_); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - sql = _tmp8_; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp10_ = sql; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp12_ = sqlite3_prepare_v2 (_tmp9_, _tmp10_, -1, &_tmp11_, NULL); -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - stmt = _tmp11_; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp12_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp13_ = res; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp13_ != SQLITE_OK) { -#line 602 "FSpotTagsTable.c" - const gchar* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - gint _tmp17_; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp14_ = sql; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp15_ = g_strdup_printf ("Statement failed: %s", _tmp14_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp16_ = _tmp15_; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp17_ = res; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - importable_database_table_throw_error (_tmp16_, _tmp17_, &_inner_error_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp16_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_propagate_error (error, _inner_error_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (rows); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 635 "FSpotTagsTable.c" - } else { -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (rows); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_clear_error (&_inner_error_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 651 "FSpotTagsTable.c" - } - } - } -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp18_ = stmt; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp19_ = photo_id; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp20_ = sqlite3_bind_int64 (_tmp18_, 1, _tmp19_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp20_; -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp21_ = res; -#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp21_ != SQLITE_OK) { -#line 667 "FSpotTagsTable.c" - gint _tmp22_; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp22_ = res; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - importable_database_table_throw_error ("Bind failed for photo_id", _tmp22_, &_inner_error_); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_propagate_error (error, _inner_error_); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (rows); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 689 "FSpotTagsTable.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (rows); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_clear_error (&_inner_error_); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return NULL; -#line 705 "FSpotTagsTable.c" - } - } - } -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp23_ = stmt; -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp24_ = sqlite3_step (_tmp23_); -#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp24_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - while (TRUE) { -#line 717 "FSpotTagsTable.c" - gint _tmp25_; - DataImportsFSpotDbFSpotTagRow* row = NULL; - DataImportsFSpotDbFSpotTableBehavior* _tmp26_; - sqlite3_stmt* _tmp27_; - gpointer _tmp28_ = NULL; - GeeArrayList* _tmp29_; - DataImportsFSpotDbFSpotTagRow* _tmp30_; - sqlite3_stmt* _tmp31_; - gint _tmp32_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp25_ = res; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (!(_tmp25_ == SQLITE_ROW)) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - break; -#line 733 "FSpotTagsTable.c" - } -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp26_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp27_ = stmt; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_table_behavior_build_row (_tmp26_, _tmp27_, &_tmp28_, 0); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (row); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - row = _tmp28_; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp29_ = rows; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp30_ = row; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp30_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp31_ = stmt; -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp32_ = sqlite3_step (_tmp31_); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - res = _tmp32_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (row); -#line 759 "FSpotTagsTable.c" - } -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - result = rows; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (sql); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (column_list); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _sqlite3_finalize0 (stmt); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return result; -#line 771 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_table_class_init (DataImportsFSpotDbFSpotTagsTableClass * klass) { -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_tags_table_parent_class = g_type_class_peek_parent (klass); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - ((ImportableDatabaseTableClass *) klass)->finalize = data_imports_fspot_db_fspot_tags_table_finalize; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotTagsTablePrivate)); -#line 782 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_table_instance_init (DataImportsFSpotDbFSpotTagsTable * self) { -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_PRIVATE (self); -#line 789 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_table_finalize (ImportableDatabaseTable * obj) { - DataImportsFSpotDbFSpotTagsTable * self; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable); -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (self->priv->photo_tags_behavior); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - IMPORTABLE_DATABASE_TABLE_CLASS (data_imports_fspot_db_fspot_tags_table_parent_class)->finalize (obj); -#line 801 "FSpotTagsTable.c" -} - - -/** - * This class represents the F-Spot tags table. - */ -GType data_imports_fspot_db_fspot_tags_table_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_tags_table_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_tags_table_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagsTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tags_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagsTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tags_table_instance_init, NULL }; - GType data_imports_fspot_db_fspot_tags_table_type_id; - data_imports_fspot_db_fspot_tags_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotTagsTable", &g_define_type_info, 0); - g_once_init_leave (&data_imports_fspot_db_fspot_tags_table_type_id__volatile, data_imports_fspot_db_fspot_tags_table_type_id); - } - return data_imports_fspot_db_fspot_tags_table_type_id__volatile; -} - - -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_construct (GType object_type) { - DataImportsFSpotDbFSpotTagsV0Behavior * self = NULL; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = (DataImportsFSpotDbFSpotTagsV0Behavior*) g_object_new (object_type, NULL); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return self; -#line 826 "FSpotTagsTable.c" -} - - -static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_new (void) { -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return data_imports_fspot_db_fspot_tags_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR); -#line 833 "FSpotTagsTable.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return self ? g_object_ref (self) : NULL; -#line 840 "FSpotTagsTable.c" -} - - -DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (void) { - DataImportsFSpotDbFSpotTagsV0Behavior* result = NULL; - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp0_; - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp2_; - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp3_; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_tags_v0_behavior_instance; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp0_ == NULL) { -#line 853 "FSpotTagsTable.c" - DataImportsFSpotDbFSpotTagsV0Behavior* _tmp1_; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = data_imports_fspot_db_fspot_tags_v0_behavior_new (); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (data_imports_fspot_db_fspot_tags_v0_behavior_instance); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_tags_v0_behavior_instance = _tmp1_; -#line 861 "FSpotTagsTable.c" - } -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = data_imports_fspot_db_fspot_tags_v0_behavior_instance; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - result = _tmp3_; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return result; -#line 871 "FSpotTagsTable.c" -} - - -static gchar* data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) { - DataImportsFSpotDbFSpotTagsV0Behavior * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - result = _tmp0_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return result; -#line 887 "FSpotTagsTable.c" -} - - -static gchar** data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) { - DataImportsFSpotDbFSpotTagsV0Behavior * self; - gchar** result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar** _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = g_strdup ("id"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = g_strdup ("name"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = g_strdup ("category_id"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = g_strdup ("is_category"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp4_ = g_strdup ("sort_priority"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_ = g_strdup ("icon"); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_ = g_new0 (gchar*, 6 + 1); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[0] = _tmp0_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[1] = _tmp1_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[2] = _tmp2_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[3] = _tmp3_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[4] = _tmp4_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_[5] = _tmp5_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp7_ = _tmp6_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp7__length1 = 6; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (result_length1) { -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - *result_length1 = _tmp7__length1; -#line 939 "FSpotTagsTable.c" - } -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - result = _tmp7_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - return result; -#line 945 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotTagRow* * row, gint offset) { - DataImportsFSpotDbFSpotTagsV0Behavior * self; - DataImportsFSpotDbFSpotTagRow* _vala_row = NULL; - DataImportsFSpotDbFSpotTagRow* _tmp0_; - DataImportsFSpotDbFSpotTagRow* _tmp1_; - sqlite3_stmt* _tmp2_; - gint _tmp3_; - gint64 _tmp4_; - DataImportsFSpotDbFSpotTagRow* _tmp5_; - sqlite3_stmt* _tmp6_; - gint _tmp7_; - const gchar* _tmp8_; - gchar* _tmp9_; - DataImportsFSpotDbFSpotTagRow* _tmp10_; - sqlite3_stmt* _tmp11_; - gint _tmp12_; - gint64 _tmp13_; - DataImportsFSpotDbFSpotTagRow* _tmp14_; - sqlite3_stmt* _tmp15_; - gint _tmp16_; - gint _tmp17_; - DataImportsFSpotDbFSpotTagRow* _tmp18_; - sqlite3_stmt* _tmp19_; - gint _tmp20_; - gint _tmp21_; - gchar* icon_str = NULL; - sqlite3_stmt* _tmp22_; - gint _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; - gboolean _tmp26_ = FALSE; - const gchar* _tmp27_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - g_return_if_fail (stmt != NULL); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp0_ = data_imports_fspot_db_fspot_tag_row_new (); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (_vala_row); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _vala_row = _tmp0_; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_ = _vala_row; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp2_ = stmt; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp3_ = offset; -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0); -#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp1_->tag_id = _tmp4_; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_ = _vala_row; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp6_ = stmt; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp7_ = offset; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp8_ = sqlite3_column_text (_tmp6_, _tmp7_ + 1); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp9_ = g_strdup (_tmp8_); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp5_->name); -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp5_->name = _tmp9_; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp10_ = _vala_row; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp11_ = stmt; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp12_ = offset; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp13_ = sqlite3_column_int64 (_tmp11_, _tmp12_ + 2); -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp10_->category_id = _tmp13_; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp14_ = _vala_row; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp15_ = stmt; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp16_ = offset; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp17_ = sqlite3_column_int (_tmp15_, _tmp16_ + 3); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp14_->is_category = _tmp17_ > 0; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp18_ = _vala_row; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp19_ = stmt; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp20_ = offset; -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp21_ = sqlite3_column_int (_tmp19_, _tmp20_ + 4); -#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp18_->sort_priority = _tmp21_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp22_ = stmt; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp23_ = offset; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp24_ = sqlite3_column_text (_tmp22_, _tmp23_ + 5); -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - icon_str = _tmp25_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp27_ = icon_str; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp27_ != NULL) { -#line 1059 "FSpotTagsTable.c" - const gchar* _tmp28_; - gboolean _tmp29_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp28_ = icon_str; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp29_ = g_str_has_prefix (_tmp28_, DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON); -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp26_ = _tmp29_; -#line 1068 "FSpotTagsTable.c" - } else { -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp26_ = FALSE; -#line 1072 "FSpotTagsTable.c" - } -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (_tmp26_) { -#line 1076 "FSpotTagsTable.c" - DataImportsFSpotDbFSpotTagRow* _tmp30_; - const gchar* _tmp31_; - gchar* _tmp32_; -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp30_ = _vala_row; -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp31_ = icon_str; -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp32_ = g_strdup (_tmp31_); -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp30_->stock_icon); -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp30_->stock_icon = _tmp32_; -#line 1090 "FSpotTagsTable.c" - } else { - DataImportsFSpotDbFSpotTagRow* _tmp33_; - gchar* _tmp34_; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp33_ = _vala_row; -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp34_ = g_strdup (""); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (_tmp33_->stock_icon); -#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _tmp33_->stock_icon = _tmp34_; -#line 1102 "FSpotTagsTable.c" - } -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_free0 (icon_str); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - if (row) { -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - *row = _vala_row; -#line 1110 "FSpotTagsTable.c" - } else { -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - _g_object_unref0 (_vala_row); -#line 1114 "FSpotTagsTable.c" - } -} - - -static void data_imports_fspot_db_fspot_tags_v0_behavior_class_init (DataImportsFSpotDbFSpotTagsV0BehaviorClass * klass) { -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_tags_v0_behavior_parent_class = g_type_class_peek_parent (klass); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_tags_v0_behavior_finalize; -#line 1124 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) { -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - iface->get_table_name = (gchar* (*) (DataImportsFSpotDbFSpotTableBehavior *)) data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - iface->list_columns = (gchar** (*) (DataImportsFSpotDbFSpotTableBehavior *, int*)) data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - iface->build_row = (void (*) (DataImportsFSpotDbFSpotTableBehavior *, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row; -#line 1137 "FSpotTagsTable.c" -} - - -static void data_imports_fspot_db_fspot_tags_v0_behavior_instance_init (DataImportsFSpotDbFSpotTagsV0Behavior * self) { -} - - -static void data_imports_fspot_db_fspot_tags_v0_behavior_finalize (GObject * obj) { - DataImportsFSpotDbFSpotTagsV0Behavior * self; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala" - G_OBJECT_CLASS (data_imports_fspot_db_fspot_tags_v0_behavior_parent_class)->finalize (obj); -#line 1151 "FSpotTagsTable.c" -} - - -GType data_imports_fspot_db_fspot_tags_v0_behavior_get_type (void) { - static volatile gsize data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile = 0; - if (g_once_init_enter (&data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagsV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagsV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_instance_init, NULL }; - static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_imports_fspot_db_fspot_tags_v0_behavior_type_id; - data_imports_fspot_db_fspot_tags_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotTagsV0Behavior", &g_define_type_info, 0); - g_type_add_interface_static (data_imports_fspot_db_fspot_tags_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info); - g_once_init_leave (&data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_tags_v0_behavior_type_id); - } - return data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile; -} - - - diff --git a/plugins/shotwell-data-imports/FSpotTagsTable.vala b/plugins/shotwell-data-imports/FSpotTagsTable.vala deleted file mode 100644 index 7660154..0000000 --- a/plugins/shotwell-data-imports/FSpotTagsTable.vala +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace DataImports.FSpot.Db { - -/** - * The value object for the "tags" table, representing a single database row. - */ -public class FSpotTagRow : Object { - public int64 tag_id; - public string name; - public int64 category_id; - public bool is_category; - public int sort_priority; - public string stock_icon; // only store stock icons -} - -/** - * This class represents the F-Spot tags table. - */ -public class FSpotTagsTable : FSpotDatabaseTable<FSpotTagRow> { - public const string TABLE_NAME = "Tags"; - - public const string PREFIX_STOCK_ICON = "stock_icon:"; - public const string STOCK_ICON_FAV = "stock_icon:emblem-favorite"; - public const string STOCK_ICON_PEOPLE = "stock_icon:emblem-people"; - public const string STOCK_ICON_PLACES = "stock_icon:emblem-places"; - public const string STOCK_ICON_EVENTS = "stock_icon:emblem-event"; - - private FSpotTableBehavior<FSpotPhotoTagRow> photo_tags_behavior; - - public FSpotTagsTable(Sqlite.Database db, FSpotDatabaseBehavior db_behavior) { - base(db); - set_behavior(db_behavior.get_tags_behavior()); - photo_tags_behavior = db_behavior.get_photo_tags_behavior(); - } - - public FSpotTagRow? get_by_id(int64 tag_id) throws DatabaseError { - Sqlite.Statement stmt; - FSpotTagRow? row = null; - string column_list = get_joined_column_list(); - string sql = "SELECT %s FROM %s WHERE id=?".printf(column_list, table_name); - - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.bind_int64(1, tag_id); - assert(res == Sqlite.OK); - - res = stmt.step(); - if (res == Sqlite.ROW) - behavior.build_row(stmt, out row); - else if (res == Sqlite.DONE) - message("Could not find tag row with ID %d", (int)tag_id); - - return row; - } - - public Gee.ArrayList<FSpotTagRow> get_by_photo_id(int64 photo_id) throws DatabaseError { - Gee.ArrayList<FSpotTagRow> rows = new Gee.ArrayList<FSpotTagRow?>(); - - Sqlite.Statement stmt; - - string column_list = get_joined_column_list(true); - string sql = "SELECT %1$s FROM %2$s, %3$s WHERE %3$s.photo_id=? AND %3$s.tag_id = %2$s.id".printf( - column_list, table_name, photo_tags_behavior.get_table_name() - ); - - int res = fspot_db.prepare_v2(sql, -1, out stmt); - if (res != Sqlite.OK) - throw_error("Statement failed: %s".printf(sql), res); - - res = stmt.bind_int64(1, photo_id); - if (res != Sqlite.OK) - throw_error("Bind failed for photo_id", res); - - res = stmt.step(); - while (res == Sqlite.ROW) { - FSpotTagRow row; - behavior.build_row(stmt, out row); - rows.add(row); - res = stmt.step(); - } - - return rows; - } -} - -public class FSpotTagsV0Behavior : FSpotTableBehavior<FSpotTagRow>, Object { - private static FSpotTagsV0Behavior instance; - - private FSpotTagsV0Behavior() { - } - - public static FSpotTagsV0Behavior get_instance() { - if (instance == null) - instance = new FSpotTagsV0Behavior(); - return instance; - } - - public string get_table_name() { - return FSpotTagsTable.TABLE_NAME; - } - - public string[] list_columns() { - return { "id", "name", "category_id", "is_category", "sort_priority", "icon" }; - } - - public void build_row(Sqlite.Statement stmt, out FSpotTagRow row, int offset = 0) { - row = new FSpotTagRow(); - row.tag_id = stmt.column_int64(offset + 0); - row.name = stmt.column_text(offset + 1); - row.category_id = stmt.column_int64(offset + 2); - row.is_category = (stmt.column_int(offset + 3) > 0); - row.sort_priority = stmt.column_int(offset + 4); - string icon_str = stmt.column_text(offset + 5); - if (icon_str != null && icon_str.has_prefix(FSpotTagsTable.PREFIX_STOCK_ICON)) - row.stock_icon = icon_str; - else - row.stock_icon = ""; - } -} - -} - diff --git a/plugins/shotwell-data-imports/SqliteSupport.c b/plugins/shotwell-data-imports/SqliteSupport.c deleted file mode 100644 index eb9eec2..0000000 --- a/plugins/shotwell-data-imports/SqliteSupport.c +++ /dev/null @@ -1,644 +0,0 @@ -/* SqliteSupport.c generated by valac 0.36.6, the Vala compiler - * generated from SqliteSupport.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <sqlite3.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ()) -#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)) -#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) -#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE)) -#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass)) - -typedef struct _ImportableDatabaseTable ImportableDatabaseTable; -typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass; -typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _ParamSpecImportableDatabaseTable ParamSpecImportableDatabaseTable; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -struct _ImportableDatabaseTable { - GTypeInstance parent_instance; - volatile int ref_count; - ImportableDatabaseTablePrivate * priv; - gchar* table_name; -}; - -struct _ImportableDatabaseTableClass { - GTypeClass parent_class; - void (*finalize) (ImportableDatabaseTable *self); -}; - -struct _ParamSpecImportableDatabaseTable { - GParamSpec parent_instance; -}; - - -static gpointer importable_database_table_parent_class = NULL; -extern sqlite3* importable_database_table_db; -sqlite3* importable_database_table_db = NULL; - -GQuark database_error_quark (void); -gpointer importable_database_table_ref (gpointer instance); -void importable_database_table_unref (gpointer instance); -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_importable_database_table (GValue* value, gpointer v_object); -void value_take_importable_database_table (GValue* value, gpointer v_object); -gpointer value_get_importable_database_table (const GValue* value); -GType importable_database_table_get_type (void) G_GNUC_CONST; -enum { - IMPORTABLE_DATABASE_TABLE_DUMMY_PROPERTY -}; -void importable_database_table_set_table_name (ImportableDatabaseTable* self, const gchar* table_name); -void importable_database_table_throw_error (const gchar* method, gint res, GError** error); -ImportableDatabaseTable* importable_database_table_construct (GType object_type); -static void importable_database_table_finalize (ImportableDatabaseTable * obj); - - -GQuark database_error_quark (void) { - return g_quark_from_static_string ("database_error-quark"); -} - - -void importable_database_table_set_table_name (ImportableDatabaseTable* self, const gchar* table_name) { - const gchar* _tmp0_; - gchar* _tmp1_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (IS_IMPORTABLE_DATABASE_TABLE (self)); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (table_name != NULL); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp0_ = table_name; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (self->table_name); -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - self->table_name = _tmp1_; -#line 99 "SqliteSupport.c" -} - - -void importable_database_table_throw_error (const gchar* method, gint res, GError** error) { - gchar* msg = NULL; - const gchar* _tmp0_; - gint _tmp1_; - sqlite3* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gint _tmp5_; - GError * _inner_error_ = NULL; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (method != NULL); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp0_ = method; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp1_ = res; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp2_ = importable_database_table_db; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp3_ = sqlite3_errmsg (_tmp2_); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp4_ = g_strdup_printf ("(%s) [%d] - %s", _tmp0_, _tmp1_, _tmp3_); -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - msg = _tmp4_; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp5_ = res; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - switch (_tmp5_) { -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_OK: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_DONE: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_ROW: -#line 136 "SqliteSupport.c" - { -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 142 "SqliteSupport.c" - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_PERM: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_BUSY: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_READONLY: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_IOERR: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_CORRUPT: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_CANTOPEN: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_NOLFS: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_AUTH: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_FORMAT: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_NOTADB: -#line 164 "SqliteSupport.c" - { - const gchar* _tmp6_; - GError* _tmp7_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp6_ = msg; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp7_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_BACKING, _tmp6_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp7_; -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 182 "SqliteSupport.c" - } else { -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 192 "SqliteSupport.c" - } - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_NOMEM: -#line 197 "SqliteSupport.c" - { - const gchar* _tmp8_; - GError* _tmp9_; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp8_ = msg; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp9_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_MEMORY, _tmp8_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp9_; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 215 "SqliteSupport.c" - } else { -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 225 "SqliteSupport.c" - } - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_ABORT: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_LOCKED: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_INTERRUPT: -#line 234 "SqliteSupport.c" - { - const gchar* _tmp10_; - GError* _tmp11_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp10_ = msg; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp11_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ABORT, _tmp10_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp11_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 252 "SqliteSupport.c" - } else { -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 262 "SqliteSupport.c" - } - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_FULL: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_EMPTY: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_TOOBIG: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_CONSTRAINT: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_RANGE: -#line 275 "SqliteSupport.c" - { - const gchar* _tmp12_; - GError* _tmp13_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp12_ = msg; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp13_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_LIMITS, _tmp12_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp13_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 293 "SqliteSupport.c" - } else { -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 303 "SqliteSupport.c" - } - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_SCHEMA: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_MISMATCH: -#line 310 "SqliteSupport.c" - { - const gchar* _tmp14_; - GError* _tmp15_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp14_ = msg; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp15_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_TYPESPEC, _tmp14_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp15_; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 328 "SqliteSupport.c" - } else { -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 338 "SqliteSupport.c" - } - } - default: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_ERROR: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_INTERNAL: -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - case SQLITE_MISUSE: -#line 348 "SqliteSupport.c" - { - const gchar* _tmp16_; - GError* _tmp17_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp16_ = msg; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _tmp17_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ERROR, _tmp16_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _inner_error_ = _tmp17_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_propagate_error (error, _inner_error_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 366 "SqliteSupport.c" - } else { -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_clear_error (&_inner_error_); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return; -#line 376 "SqliteSupport.c" - } - } - } -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (msg); -#line 382 "SqliteSupport.c" -} - - -ImportableDatabaseTable* importable_database_table_construct (GType object_type) { - ImportableDatabaseTable* self = NULL; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - self = (ImportableDatabaseTable*) g_type_create_instance (object_type); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return self; -#line 392 "SqliteSupport.c" -} - - -static void value_importable_database_table_init (GValue* value) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = NULL; -#line 399 "SqliteSupport.c" -} - - -static void value_importable_database_table_free_value (GValue* value) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (value->data[0].v_pointer) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - importable_database_table_unref (value->data[0].v_pointer); -#line 408 "SqliteSupport.c" - } -} - - -static void value_importable_database_table_copy_value (const GValue* src_value, GValue* dest_value) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (src_value->data[0].v_pointer) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - dest_value->data[0].v_pointer = importable_database_table_ref (src_value->data[0].v_pointer); -#line 418 "SqliteSupport.c" - } else { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - dest_value->data[0].v_pointer = NULL; -#line 422 "SqliteSupport.c" - } -} - - -static gpointer value_importable_database_table_peek_pointer (const GValue* value) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return value->data[0].v_pointer; -#line 430 "SqliteSupport.c" -} - - -static gchar* value_importable_database_table_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (collect_values[0].v_pointer) { -#line 437 "SqliteSupport.c" - ImportableDatabaseTable * object; - object = collect_values[0].v_pointer; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (object->parent_instance.g_class == NULL) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 444 "SqliteSupport.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 448 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = importable_database_table_ref (object); -#line 452 "SqliteSupport.c" - } else { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = NULL; -#line 456 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return NULL; -#line 460 "SqliteSupport.c" -} - - -static gchar* value_importable_database_table_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { - ImportableDatabaseTable ** object_p; - object_p = collect_values[0].v_pointer; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (!object_p) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 471 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (!value->data[0].v_pointer) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - *object_p = NULL; -#line 477 "SqliteSupport.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - *object_p = value->data[0].v_pointer; -#line 481 "SqliteSupport.c" - } else { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - *object_p = importable_database_table_ref (value->data[0].v_pointer); -#line 485 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return NULL; -#line 489 "SqliteSupport.c" -} - - -GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { - ParamSpecImportableDatabaseTable* spec; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_IMPORTABLE_DATABASE_TABLE), NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return G_PARAM_SPEC (spec); -#line 503 "SqliteSupport.c" -} - - -gpointer value_get_importable_database_table (const GValue* value) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORTABLE_DATABASE_TABLE), NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return value->data[0].v_pointer; -#line 512 "SqliteSupport.c" -} - - -void value_set_importable_database_table (GValue* value, gpointer v_object) { - ImportableDatabaseTable * old; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORTABLE_DATABASE_TABLE)); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - old = value->data[0].v_pointer; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (v_object) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IMPORTABLE_DATABASE_TABLE)); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = v_object; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - importable_database_table_ref (value->data[0].v_pointer); -#line 532 "SqliteSupport.c" - } else { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = NULL; -#line 536 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (old) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - importable_database_table_unref (old); -#line 542 "SqliteSupport.c" - } -} - - -void value_take_importable_database_table (GValue* value, gpointer v_object) { - ImportableDatabaseTable * old; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORTABLE_DATABASE_TABLE)); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - old = value->data[0].v_pointer; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (v_object) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IMPORTABLE_DATABASE_TABLE)); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = v_object; -#line 561 "SqliteSupport.c" - } else { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - value->data[0].v_pointer = NULL; -#line 565 "SqliteSupport.c" - } -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (old) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - importable_database_table_unref (old); -#line 571 "SqliteSupport.c" - } -} - - -static void importable_database_table_class_init (ImportableDatabaseTableClass * klass) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - importable_database_table_parent_class = g_type_class_peek_parent (klass); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - ((ImportableDatabaseTableClass *) klass)->finalize = importable_database_table_finalize; -#line 581 "SqliteSupport.c" -} - - -static void importable_database_table_instance_init (ImportableDatabaseTable * self) { -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - self->table_name = NULL; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - self->ref_count = 1; -#line 590 "SqliteSupport.c" -} - - -static void importable_database_table_finalize (ImportableDatabaseTable * obj) { - ImportableDatabaseTable * self; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_signal_handlers_destroy (self); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - _g_free0 (self->table_name); -#line 602 "SqliteSupport.c" -} - - -GType importable_database_table_get_type (void) { - static volatile gsize importable_database_table_type_id__volatile = 0; - if (g_once_init_enter (&importable_database_table_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_importable_database_table_init, value_importable_database_table_free_value, value_importable_database_table_copy_value, value_importable_database_table_peek_pointer, "p", value_importable_database_table_collect_value, "p", value_importable_database_table_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (ImportableDatabaseTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) importable_database_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportableDatabaseTable), 0, (GInstanceInitFunc) importable_database_table_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType importable_database_table_type_id; - importable_database_table_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ImportableDatabaseTable", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&importable_database_table_type_id__volatile, importable_database_table_type_id); - } - return importable_database_table_type_id__volatile; -} - - -gpointer importable_database_table_ref (gpointer instance) { - ImportableDatabaseTable * self; - self = instance; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_atomic_int_inc (&self->ref_count); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - return instance; -#line 627 "SqliteSupport.c" -} - - -void importable_database_table_unref (gpointer instance) { - ImportableDatabaseTable * self; - self = instance; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - IMPORTABLE_DATABASE_TABLE_GET_CLASS (self)->finalize (self); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/SqliteSupport.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 640 "SqliteSupport.c" - } -} - - - diff --git a/plugins/shotwell-data-imports/SqliteSupport.vala b/plugins/shotwell-data-imports/SqliteSupport.vala deleted file mode 100644 index 859dc84..0000000 --- a/plugins/shotwell-data-imports/SqliteSupport.vala +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - -public errordomain DatabaseError { - ERROR, - BACKING, - MEMORY, - ABORT, - LIMITS, - TYPESPEC -} - -public abstract class ImportableDatabaseTable { - - protected static Sqlite.Database db; - - public string table_name = null; - - protected void set_table_name(string table_name) { - this.table_name = table_name; - } - - // This method will throw an error on an SQLite return code unless it's OK, DONE, or ROW, which - // are considered normal results. - protected static void throw_error(string method, int res) throws DatabaseError { - string msg = "(%s) [%d] - %s".printf(method, res, db.errmsg()); - - switch (res) { - case Sqlite.OK: - case Sqlite.DONE: - case Sqlite.ROW: - return; - - case Sqlite.PERM: - case Sqlite.BUSY: - case Sqlite.READONLY: - case Sqlite.IOERR: - case Sqlite.CORRUPT: - case Sqlite.CANTOPEN: - case Sqlite.NOLFS: - case Sqlite.AUTH: - case Sqlite.FORMAT: - case Sqlite.NOTADB: - throw new DatabaseError.BACKING(msg); - - case Sqlite.NOMEM: - throw new DatabaseError.MEMORY(msg); - - case Sqlite.ABORT: - case Sqlite.LOCKED: - case Sqlite.INTERRUPT: - throw new DatabaseError.ABORT(msg); - - case Sqlite.FULL: - case Sqlite.EMPTY: - case Sqlite.TOOBIG: - case Sqlite.CONSTRAINT: - case Sqlite.RANGE: - throw new DatabaseError.LIMITS(msg); - - case Sqlite.SCHEMA: - case Sqlite.MISMATCH: - throw new DatabaseError.TYPESPEC(msg); - - case Sqlite.ERROR: - case Sqlite.INTERNAL: - case Sqlite.MISUSE: - default: - throw new DatabaseError.ERROR(msg); - } - } -} diff --git a/plugins/shotwell-data-imports/VersionNumber.c b/plugins/shotwell-data-imports/VersionNumber.c deleted file mode 100644 index dd5f414..0000000 --- a/plugins/shotwell-data-imports/VersionNumber.c +++ /dev/null @@ -1,1053 +0,0 @@ -/* VersionNumber.c generated by valac 0.36.6, the Vala compiler - * generated from VersionNumber.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <gee.h> -#include <stdlib.h> -#include <string.h> - - -#define UTILS_TYPE_VERSION_NUMBER (utils_version_number_get_type ()) -#define UTILS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber)) -#define UTILS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) -#define UTILS_IS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_IS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UTILS_TYPE_VERSION_NUMBER)) -#define UTILS_VERSION_NUMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass)) - -typedef struct _UtilsVersionNumber UtilsVersionNumber; -typedef struct _UtilsVersionNumberClass UtilsVersionNumberClass; -typedef struct _UtilsVersionNumberPrivate UtilsVersionNumberPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -struct _UtilsVersionNumber { - GObject parent_instance; - UtilsVersionNumberPrivate * priv; -}; - -struct _UtilsVersionNumberClass { - GObjectClass parent_class; -}; - -struct _UtilsVersionNumberPrivate { - gint* version; - gint version_length1; - gint _version_size_; -}; - - -static gpointer utils_version_number_parent_class = NULL; -static GeeComparableIface * utils_version_number_gee_comparable_parent_iface = NULL; - -GType utils_version_number_get_type (void) G_GNUC_CONST; -#define UTILS_VERSION_NUMBER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberPrivate)) -enum { - UTILS_VERSION_NUMBER_DUMMY_PROPERTY -}; -UtilsVersionNumber* utils_version_number_new (gint* version, int version_length1); -UtilsVersionNumber* utils_version_number_construct (GType object_type, gint* version, int version_length1); -static gint* _vala_array_dup3 (gint* self, int length); -UtilsVersionNumber* utils_version_number_new_from_string (const gchar* str_version, const gchar* separator); -UtilsVersionNumber* utils_version_number_construct_from_string (GType object_type, const gchar* str_version, const gchar* separator); -gchar* utils_version_number_to_string (UtilsVersionNumber* self); -static gint utils_version_number_real_compare_to (GeeComparable* base, UtilsVersionNumber* other); -static void utils_version_number_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - - -static gint* _vala_array_dup3 (gint* self, int length) { -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return g_memdup (self, length * sizeof (gint)); -#line 70 "VersionNumber.c" -} - - -UtilsVersionNumber* utils_version_number_construct (GType object_type, gint* version, int version_length1) { - UtilsVersionNumber * self = NULL; - gint* _tmp0_; - gint _tmp0__length1; - gint* _tmp1_; - gint _tmp1__length1; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self = (UtilsVersionNumber*) g_object_new (object_type, NULL); -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0_ = version; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0__length1 = version_length1; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1__length1 = _tmp0__length1; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version = (g_free (self->priv->version), NULL); -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version = _tmp1_; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version_length1 = _tmp1__length1; -#line 17 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->_version_size_ = self->priv->version_length1; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return self; -#line 100 "VersionNumber.c" -} - - -UtilsVersionNumber* utils_version_number_new (gint* version, int version_length1) { -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return utils_version_number_construct (UTILS_TYPE_VERSION_NUMBER, version, version_length1); -#line 107 "VersionNumber.c" -} - - -UtilsVersionNumber* utils_version_number_construct_from_string (GType object_type, const gchar* str_version, const gchar* separator) { - UtilsVersionNumber * self = NULL; - gchar** version_items = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint version_items_length1; - gint _version_items_size_; - gchar** _tmp4_; - gint _tmp4__length1; - gint* _tmp5_; -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - g_return_val_if_fail (str_version != NULL, NULL); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - g_return_val_if_fail (separator != NULL, NULL); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self = (UtilsVersionNumber*) g_object_new (object_type, NULL); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0_ = str_version; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1_ = separator; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp3_ = _tmp2_ = g_strsplit (_tmp0_, _tmp1_, 0); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items = _tmp3_; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items_length1 = _vala_array_length (_tmp2_); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _version_items_size_ = version_items_length1; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp4_ = version_items; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp4__length1 = version_items_length1; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp5_ = g_new0 (gint, _tmp4__length1); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version = (g_free (self->priv->version), NULL); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version = _tmp5_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version_length1 = _tmp4__length1; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->_version_size_ = self->priv->version_length1; -#line 155 "VersionNumber.c" - { - gint i = 0; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = 0; -#line 160 "VersionNumber.c" - { - gboolean _tmp6_ = FALSE; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6_ = TRUE; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - while (TRUE) { -#line 167 "VersionNumber.c" - gint _tmp8_; - gchar** _tmp9_; - gint _tmp9__length1; - gint* _tmp10_; - gint _tmp10__length1; - gint _tmp11_; - gchar** _tmp12_; - gint _tmp12__length1; - gint _tmp13_; - const gchar* _tmp14_; - gint _tmp15_; - gint _tmp16_; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!_tmp6_) { -#line 182 "VersionNumber.c" - gint _tmp7_; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp7_ = i; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = _tmp7_ + 1; -#line 188 "VersionNumber.c" - } -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6_ = FALSE; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp8_ = i; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp9_ = version_items; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp9__length1 = version_items_length1; -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!(_tmp8_ < _tmp9__length1)) { -#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - break; -#line 202 "VersionNumber.c" - } -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp10_ = self->priv->version; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp10__length1 = self->priv->version_length1; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp11_ = i; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp12_ = version_items; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp12__length1 = version_items_length1; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp13_ = i; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp14_ = _tmp12_[_tmp13_]; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp15_ = atoi (_tmp14_); -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp10_[_tmp11_] = _tmp15_; -#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp16_ = _tmp10_[_tmp11_]; -#line 224 "VersionNumber.c" - } - } - } -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items = (_vala_array_free (version_items, version_items_length1, (GDestroyNotify) g_free), NULL); -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return self; -#line 232 "VersionNumber.c" -} - - -UtilsVersionNumber* utils_version_number_new_from_string (const gchar* str_version, const gchar* separator) { -#line 20 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return utils_version_number_construct_from_string (UTILS_TYPE_VERSION_NUMBER, str_version, separator); -#line 239 "VersionNumber.c" -} - - -static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { - gchar* result = NULL; - const gchar* _tmp0_; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - gchar** _tmp3_; - gint _tmp3__length1; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = separator; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_ == NULL) { -#line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - separator = ""; -#line 256 "VersionNumber.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = TRUE; -#line 266 "VersionNumber.c" - } else { - gchar** _tmp4_; - gint _tmp4__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = _tmp4__length1 > 0; -#line 276 "VersionNumber.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 282 "VersionNumber.c" - } else { - gboolean _tmp5_ = FALSE; - gchar** _tmp6_; - gint _tmp6__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp6__length1 == -1) { -#line 293 "VersionNumber.c" - gchar** _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_[0]; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = _tmp8_ != NULL; -#line 305 "VersionNumber.c" - } else { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = FALSE; -#line 309 "VersionNumber.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp5_; -#line 313 "VersionNumber.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 317 "VersionNumber.c" - gint i = 0; - gsize len = 0UL; - gint _tmp31_; - gint _tmp33_; - gint _tmp34_; - gsize _tmp35_; - const gchar* _tmp36_; - gint _tmp37_; - gint _tmp38_; - gint _tmp39_; - const gchar* res = NULL; - gsize _tmp40_; - void* _tmp41_; - void* ptr = NULL; - const gchar* _tmp42_; - gchar** _tmp43_; - gint _tmp43__length1; - const gchar* _tmp44_; - void* _tmp45_; - const gchar* _tmp62_; -#line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 340 "VersionNumber.c" - { - gboolean _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 0; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = TRUE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 349 "VersionNumber.c" - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gchar** _tmp13_; - gint _tmp13__length1; - gint _tmp21_ = 0; - gchar** _tmp22_; - gint _tmp22__length1; - gint _tmp23_; - const gchar* _tmp24_; - gsize _tmp30_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp9_) { -#line 362 "VersionNumber.c" - gint _tmp10_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp10_ + 1; -#line 368 "VersionNumber.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13__length1 != -1) { -#line 378 "VersionNumber.c" - gint _tmp14_; - gchar** _tmp15_; - gint _tmp15__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ < _tmp15__length1; -#line 390 "VersionNumber.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 394 "VersionNumber.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp12_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = TRUE; -#line 400 "VersionNumber.c" - } else { - gboolean _tmp16_ = FALSE; - gchar** _tmp17_; - gint _tmp17__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp17__length1 == -1) { -#line 411 "VersionNumber.c" - gchar** _tmp18_; - gint _tmp18__length1; - gint _tmp19_; - const gchar* _tmp20_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = _tmp18_[_tmp19_]; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = _tmp20_ != NULL; -#line 426 "VersionNumber.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = FALSE; -#line 430 "VersionNumber.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp16_; -#line 434 "VersionNumber.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp11_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 440 "VersionNumber.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp23_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp24_ = _tmp22_[_tmp23_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp24_ != NULL) { -#line 452 "VersionNumber.c" - gchar** _tmp25_; - gint _tmp25__length1; - gint _tmp26_; - const gchar* _tmp27_; - gint _tmp28_; - gint _tmp29_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp26_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp27_ = _tmp25_[_tmp26_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp28_ = strlen ((const gchar*) _tmp27_); -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp29_ = _tmp28_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = _tmp29_; -#line 473 "VersionNumber.c" - } else { -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = 0; -#line 477 "VersionNumber.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp30_ = len; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp30_ + _tmp21_; -#line 483 "VersionNumber.c" - } - } -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp31_ = i; -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp31_ == 0) { -#line 490 "VersionNumber.c" - gchar* _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp32_ = g_strdup (""); -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 498 "VersionNumber.c" - } -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp33_ = i; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - str_array_length1 = _tmp33_; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp34_ = str_array_length1; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp35_ = len; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp36_ = separator; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp37_ = strlen ((const gchar*) _tmp36_); -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp38_ = _tmp37_; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp40_ = len; -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp41_ = g_malloc (_tmp40_); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = _tmp41_; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp42_ = res; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43_ = str_array; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43__length1 = str_array_length1; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp44_ = _tmp43_[0]; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp45_; -#line 536 "VersionNumber.c" - { - gboolean _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = TRUE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 545 "VersionNumber.c" - gint _tmp48_; - gchar** _tmp49_; - gint _tmp49__length1; - void* _tmp50_; - const gchar* _tmp51_; - void* _tmp52_; - const gchar* _tmp53_ = NULL; - gchar** _tmp54_; - gint _tmp54__length1; - gint _tmp55_; - const gchar* _tmp56_; - void* _tmp60_; - void* _tmp61_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp46_) { -#line 561 "VersionNumber.c" - gint _tmp47_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp47_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp47_ + 1; -#line 567 "VersionNumber.c" - } -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp48_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49_ = str_array; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49__length1 = str_array_length1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!(_tmp48_ < _tmp49__length1)) { -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 581 "VersionNumber.c" - } -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp50_ = ptr; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp51_ = separator; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp52_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp55_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp56_ = _tmp54_[_tmp55_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp56_ != NULL) { -#line 601 "VersionNumber.c" - gchar** _tmp57_; - gint _tmp57__length1; - gint _tmp58_; - const gchar* _tmp59_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp58_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp59_ = _tmp57_[_tmp58_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = (const gchar*) _tmp59_; -#line 616 "VersionNumber.c" - } else { -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = ""; -#line 620 "VersionNumber.c" - } -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp60_ = ptr; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp61_; -#line 628 "VersionNumber.c" - } - } -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp62_ = res; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = NULL; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gchar*) _tmp62_; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 639 "VersionNumber.c" - } else { - gchar* _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp63_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 648 "VersionNumber.c" - } -} - - -gchar* utils_version_number_to_string (UtilsVersionNumber* self) { - gchar* result = NULL; - gchar** version_items = NULL; - gint* _tmp0_; - gint _tmp0__length1; - gchar** _tmp1_; - gint version_items_length1; - gint _version_items_size_; - gchar** _tmp13_; - gint _tmp13__length1; - gchar* _tmp14_; -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - g_return_val_if_fail (UTILS_IS_VERSION_NUMBER (self), NULL); -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0_ = self->priv->version; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0__length1 = self->priv->version_length1; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1_ = g_new0 (gchar*, _tmp0__length1 + 1); -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items = _tmp1_; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items_length1 = _tmp0__length1; -#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _version_items_size_ = version_items_length1; -#line 678 "VersionNumber.c" - { - gint i = 0; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = 0; -#line 683 "VersionNumber.c" - { - gboolean _tmp2_ = FALSE; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp2_ = TRUE; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - while (TRUE) { -#line 690 "VersionNumber.c" - gint _tmp4_; - gint* _tmp5_; - gint _tmp5__length1; - gchar** _tmp6_; - gint _tmp6__length1; - gint _tmp7_; - gint* _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - gint _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!_tmp2_) { -#line 705 "VersionNumber.c" - gint _tmp3_; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp3_ = i; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = _tmp3_ + 1; -#line 711 "VersionNumber.c" - } -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp2_ = FALSE; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp4_ = i; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp5_ = self->priv->version; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp5__length1 = self->priv->version_length1; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!(_tmp4_ < _tmp5__length1)) { -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - break; -#line 725 "VersionNumber.c" - } -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6_ = version_items; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6__length1 = version_items_length1; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp7_ = i; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp8_ = self->priv->version; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp8__length1 = self->priv->version_length1; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp9_ = i; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp10_ = _tmp8_[_tmp9_]; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp11_ = g_strdup_printf ("%i", _tmp10_); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _g_free0 (_tmp6_[_tmp7_]); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6_[_tmp7_] = _tmp11_; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp12_ = _tmp6_[_tmp7_]; -#line 749 "VersionNumber.c" - } - } - } -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp13_ = version_items; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp13__length1 = version_items_length1; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp14_ = _vala_g_strjoinv (".", _tmp13_, _tmp13__length1); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - result = _tmp14_; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - version_items = (_vala_array_free (version_items, version_items_length1, (GDestroyNotify) g_free), NULL); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return result; -#line 765 "VersionNumber.c" -} - - -static gint utils_version_number_real_compare_to (GeeComparable* base, UtilsVersionNumber* other) { - UtilsVersionNumber * self; - gint result = 0; - gint _tmp0_ = 0; - gint* _tmp1_; - gint _tmp1__length1; - UtilsVersionNumber* _tmp2_; - gint* _tmp3_; - gint _tmp3__length1; - gint max_len = 0; - gint res = 0; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - g_return_val_if_fail (UTILS_IS_VERSION_NUMBER (other), 0); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1_ = self->priv->version; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp1__length1 = self->priv->version_length1; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp2_ = other; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp3_ = _tmp2_->priv->version; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp3__length1 = _tmp2_->priv->version_length1; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (_tmp1__length1 > _tmp3__length1) { -#line 796 "VersionNumber.c" - gint* _tmp4_; - gint _tmp4__length1; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp4_ = self->priv->version; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp4__length1 = self->priv->version_length1; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0_ = _tmp4__length1; -#line 805 "VersionNumber.c" - } else { - UtilsVersionNumber* _tmp5_; - gint* _tmp6_; - gint _tmp6__length1; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp5_ = other; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6_ = _tmp5_->priv->version; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp6__length1 = _tmp5_->priv->version_length1; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp0_ = _tmp6__length1; -#line 818 "VersionNumber.c" - } -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - max_len = _tmp0_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - res = 0; -#line 824 "VersionNumber.c" - { - gint i = 0; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = 0; -#line 829 "VersionNumber.c" - { - gboolean _tmp7_ = FALSE; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp7_ = TRUE; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - while (TRUE) { -#line 836 "VersionNumber.c" - gint _tmp9_; - gint _tmp10_; - gint _tmp11_ = 0; - gint _tmp12_; - gint* _tmp13_; - gint _tmp13__length1; - gint this_v = 0; - gint _tmp17_ = 0; - gint _tmp18_; - UtilsVersionNumber* _tmp19_; - gint* _tmp20_; - gint _tmp20__length1; - gint other_v = 0; - gint _tmp25_; - gint _tmp26_; - gint _tmp27_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!_tmp7_) { -#line 855 "VersionNumber.c" - gint _tmp8_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp8_ = i; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - i = _tmp8_ + 1; -#line 861 "VersionNumber.c" - } -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp7_ = FALSE; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp9_ = i; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp10_ = max_len; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (!(_tmp9_ < _tmp10_)) { -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - break; -#line 873 "VersionNumber.c" - } -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp12_ = i; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp13_ = self->priv->version; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp13__length1 = self->priv->version_length1; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (_tmp12_ < _tmp13__length1) { -#line 883 "VersionNumber.c" - gint* _tmp14_; - gint _tmp14__length1; - gint _tmp15_; - gint _tmp16_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp14_ = self->priv->version; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp14__length1 = self->priv->version_length1; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp15_ = i; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp16_ = _tmp14_[_tmp15_]; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp11_ = _tmp16_; -#line 898 "VersionNumber.c" - } else { -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp11_ = 0; -#line 902 "VersionNumber.c" - } -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - this_v = _tmp11_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp18_ = i; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp19_ = other; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp20_ = _tmp19_->priv->version; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp20__length1 = _tmp19_->priv->version_length1; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (_tmp18_ < _tmp20__length1) { -#line 916 "VersionNumber.c" - UtilsVersionNumber* _tmp21_; - gint* _tmp22_; - gint _tmp22__length1; - gint _tmp23_; - gint _tmp24_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp21_ = other; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp22_ = _tmp21_->priv->version; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp22__length1 = _tmp21_->priv->version_length1; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp23_ = i; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp24_ = _tmp22_[_tmp23_]; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp17_ = _tmp24_; -#line 934 "VersionNumber.c" - } else { -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp17_ = 0; -#line 938 "VersionNumber.c" - } -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - other_v = _tmp17_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp25_ = this_v; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp26_ = other_v; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - res = _tmp25_ - _tmp26_; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - _tmp27_ = res; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - if (_tmp27_ != 0) { -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - break; -#line 954 "VersionNumber.c" - } - } - } - } -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - result = res; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - return result; -#line 963 "VersionNumber.c" -} - - -static void utils_version_number_class_init (UtilsVersionNumberClass * klass) { -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - utils_version_number_parent_class = g_type_class_peek_parent (klass); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - g_type_class_add_private (klass, sizeof (UtilsVersionNumberPrivate)); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - G_OBJECT_CLASS (klass)->finalize = utils_version_number_finalize; -#line 974 "VersionNumber.c" -} - - -static void utils_version_number_gee_comparable_interface_init (GeeComparableIface * iface) { -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - utils_version_number_gee_comparable_parent_iface = g_type_interface_peek_parent (iface); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - iface->compare_to = (gint (*) (GeeComparable *, gconstpointer)) utils_version_number_real_compare_to; -#line 983 "VersionNumber.c" -} - - -static void utils_version_number_instance_init (UtilsVersionNumber * self) { -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv = UTILS_VERSION_NUMBER_GET_PRIVATE (self); -#line 990 "VersionNumber.c" -} - - -static void utils_version_number_finalize (GObject * obj) { - UtilsVersionNumber * self; -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - self->priv->version = (g_free (self->priv->version), NULL); -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/VersionNumber.vala" - G_OBJECT_CLASS (utils_version_number_parent_class)->finalize (obj); -#line 1002 "VersionNumber.c" -} - - -/** - * A class that represents a version number in the form x.y.z and is able to compare - * different versions. - */ -GType utils_version_number_get_type (void) { - static volatile gsize utils_version_number_type_id__volatile = 0; - if (g_once_init_enter (&utils_version_number_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (UtilsVersionNumberClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) utils_version_number_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UtilsVersionNumber), 0, (GInstanceInitFunc) utils_version_number_instance_init, NULL }; - static const GInterfaceInfo gee_comparable_info = { (GInterfaceInitFunc) utils_version_number_gee_comparable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType utils_version_number_type_id; - utils_version_number_type_id = g_type_register_static (G_TYPE_OBJECT, "UtilsVersionNumber", &g_define_type_info, 0); - g_type_add_interface_static (utils_version_number_type_id, GEE_TYPE_COMPARABLE, &gee_comparable_info); - g_once_init_leave (&utils_version_number_type_id__volatile, utils_version_number_type_id); - } - return utils_version_number_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - diff --git a/plugins/shotwell-data-imports/VersionNumber.vala b/plugins/shotwell-data-imports/VersionNumber.vala deleted file mode 100644 index 7077597..0000000 --- a/plugins/shotwell-data-imports/VersionNumber.vala +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -namespace Utils { - -/** - * A class that represents a version number in the form x.y.z and is able to compare - * different versions. - */ -public class VersionNumber : Object, Gee.Comparable<VersionNumber> { - private int[] version; - - public VersionNumber(int[] version) { - this.version = version; - } - - public VersionNumber.from_string(string str_version, string separator = ".") { - string[] version_items = str_version.split(separator); - this.version = new int[version_items.length]; - for (int i = 0; i < version_items.length; i++) - this.version[i] = int.parse(version_items[i]); - } - - public string to_string() { - string[] version_items = new string[this.version.length]; - for (int i = 0; i < this.version.length; i++) - version_items[i] = this.version[i].to_string(); - return string.joinv(".", version_items); - } - - public int compare_to(VersionNumber other) { - int max_len = ((this.version.length > other.version.length) ? - this.version.length : other.version.length); - int res = 0; - for(int i = 0; i < max_len; i++) { - int this_v = (i < this.version.length ? this.version[i] : 0); - int other_v = (i < other.version.length ? other.version[i] : 0); - res = this_v - other_v; - if (res != 0) - break; - } - return res; - } -} - -} diff --git a/plugins/shotwell-data-imports/f-spot-24.png b/plugins/shotwell-data-imports/f-spot-24.png Binary files differdeleted file mode 100644 index fda9672..0000000 --- a/plugins/shotwell-data-imports/f-spot-24.png +++ /dev/null diff --git a/plugins/shotwell-data-imports/org.gnome.Shotwell.Imports.gresource.xml b/plugins/shotwell-data-imports/org.gnome.Shotwell.Imports.gresource.xml deleted file mode 100644 index 0c77317..0000000 --- a/plugins/shotwell-data-imports/org.gnome.Shotwell.Imports.gresource.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<gresources> - <gresource prefix="/org/gnome/Shotwell/Imports"> - <file>f-spot-24.png</file> - </gresource> -</gresources> diff --git a/plugins/shotwell-data-imports/shotwell-data-imports.c b/plugins/shotwell-data-imports/shotwell-data-imports.c deleted file mode 100644 index 467066b..0000000 --- a/plugins/shotwell-data-imports/shotwell-data-imports.c +++ /dev/null @@ -1,353 +0,0 @@ -/* shotwell-data-imports.c generated by valac 0.36.6, the Vala compiler - * generated from shotwell-data-imports.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <shotwell-plugin-dev-1.0.h> -#include <gio/gio.h> -#include <stdlib.h> -#include <string.h> -#include <glib/gi18n-lib.h> - - -#define TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES (shotwell_data_imports_core_services_get_type ()) -#define SHOTWELL_DATA_IMPORTS_CORE_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices)) -#define SHOTWELL_DATA_IMPORTS_CORE_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServicesClass)) -#define IS_SHOTWELL_DATA_IMPORTS_CORE_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES)) -#define IS_SHOTWELL_DATA_IMPORTS_CORE_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES)) -#define SHOTWELL_DATA_IMPORTS_CORE_SERVICES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServicesClass)) - -typedef struct _ShotwellDataImportsCoreServices ShotwellDataImportsCoreServices; -typedef struct _ShotwellDataImportsCoreServicesClass ShotwellDataImportsCoreServicesClass; -typedef struct _ShotwellDataImportsCoreServicesPrivate ShotwellDataImportsCoreServicesPrivate; - -#define TYPE_FSPOT_SERVICE (fspot_service_get_type ()) -#define FSPOT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FSPOT_SERVICE, FSpotService)) -#define FSPOT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FSPOT_SERVICE, FSpotServiceClass)) -#define IS_FSPOT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FSPOT_SERVICE)) -#define IS_FSPOT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FSPOT_SERVICE)) -#define FSPOT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FSPOT_SERVICE, FSpotServiceClass)) - -typedef struct _FSpotService FSpotService; -typedef struct _FSpotServiceClass FSpotServiceClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -struct _ShotwellDataImportsCoreServices { - GObject parent_instance; - ShotwellDataImportsCoreServicesPrivate * priv; -}; - -struct _ShotwellDataImportsCoreServicesClass { - GObjectClass parent_class; -}; - -struct _ShotwellDataImportsCoreServicesPrivate { - SpitPluggable** pluggables; - gint pluggables_length1; - gint _pluggables_size_; -}; - - -static gpointer shotwell_data_imports_core_services_parent_class = NULL; -static SpitModuleIface * shotwell_data_imports_core_services_spit_module_parent_iface = NULL; - -GType shotwell_data_imports_core_services_get_type (void) G_GNUC_CONST; -#define SHOTWELL_DATA_IMPORTS_CORE_SERVICES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServicesPrivate)) -enum { - SHOTWELL_DATA_IMPORTS_CORE_SERVICES_DUMMY_PROPERTY -}; -ShotwellDataImportsCoreServices* shotwell_data_imports_core_services_new (GFile* module_file); -ShotwellDataImportsCoreServices* shotwell_data_imports_core_services_construct (GType object_type, GFile* module_file); -FSpotService* fspot_service_new (GFile* resource_directory); -FSpotService* fspot_service_construct (GType object_type, GFile* resource_directory); -GType fspot_service_get_type (void) G_GNUC_CONST; -static void _vala_array_add7 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); -static const gchar* shotwell_data_imports_core_services_real_get_module_name (SpitModule* base); -static const gchar* shotwell_data_imports_core_services_real_get_version (SpitModule* base); -static const gchar* shotwell_data_imports_core_services_real_get_id (SpitModule* base); -static SpitPluggable** shotwell_data_imports_core_services_real_get_pluggables (SpitModule* base, int* result_length1); -static void shotwell_data_imports_core_services_finalize (GObject * obj); -SpitModule* spit_entry_point (SpitEntryPointParams* params); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); - - -static void _vala_array_add7 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - if ((*length) == (*size)) { -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 89 "shotwell-data-imports.c" - } -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - (*array)[(*length)++] = value; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - (*array)[*length] = NULL; -#line 95 "shotwell-data-imports.c" -} - - -ShotwellDataImportsCoreServices* shotwell_data_imports_core_services_construct (GType object_type, GFile* module_file) { - ShotwellDataImportsCoreServices * self = NULL; - GFile* resource_directory = NULL; - GFile* _tmp0_; - GFile* _tmp1_; - SpitPluggable** _tmp2_; - gint _tmp2__length1; - FSpotService* _tmp3_; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - g_return_val_if_fail (G_IS_FILE (module_file), NULL); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = (ShotwellDataImportsCoreServices*) g_object_new (object_type, NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp0_ = module_file; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp1_ = g_file_get_parent (_tmp0_); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - resource_directory = _tmp1_; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp2_ = self->priv->pluggables; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp2__length1 = self->priv->pluggables_length1; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp3_ = fspot_service_new (resource_directory); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _vala_array_add7 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _g_object_unref0 (resource_directory); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return self; -#line 129 "shotwell-data-imports.c" -} - - -ShotwellDataImportsCoreServices* shotwell_data_imports_core_services_new (GFile* module_file) { -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return shotwell_data_imports_core_services_construct (TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, module_file); -#line 136 "shotwell-data-imports.c" -} - - -static const gchar* shotwell_data_imports_core_services_real_get_module_name (SpitModule* base) { - ShotwellDataImportsCoreServices * self; - const gchar* result = NULL; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - result = _ ("Core Data Import Services"); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return result; -#line 149 "shotwell-data-imports.c" -} - - -static const gchar* shotwell_data_imports_core_services_real_get_version (SpitModule* base) { - ShotwellDataImportsCoreServices * self; - const gchar* result = NULL; -#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - result = _VERSION; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return result; -#line 162 "shotwell-data-imports.c" -} - - -static const gchar* shotwell_data_imports_core_services_real_get_id (SpitModule* base) { - ShotwellDataImportsCoreServices * self; - const gchar* result = NULL; -#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices); -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - result = "org.yorba.shotwell.data_imports.core_services"; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return result; -#line 175 "shotwell-data-imports.c" -} - - -static SpitPluggable** shotwell_data_imports_core_services_real_get_pluggables (SpitModule* base, int* result_length1) { - ShotwellDataImportsCoreServices * self; - SpitPluggable** result = NULL; - SpitPluggable** _tmp0_; - gint _tmp0__length1; - SpitPluggable** _tmp1_; - gint _tmp1__length1; -#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp0_ = self->priv->pluggables; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp0__length1 = self->priv->pluggables_length1; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp1_ = _tmp0_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp1__length1 = _tmp0__length1; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - if (result_length1) { -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - *result_length1 = _tmp1__length1; -#line 200 "shotwell-data-imports.c" - } -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - result = _tmp1_; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return result; -#line 206 "shotwell-data-imports.c" -} - - -static void shotwell_data_imports_core_services_class_init (ShotwellDataImportsCoreServicesClass * klass) { -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - shotwell_data_imports_core_services_parent_class = g_type_class_peek_parent (klass); -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - g_type_class_add_private (klass, sizeof (ShotwellDataImportsCoreServicesPrivate)); -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - G_OBJECT_CLASS (klass)->finalize = shotwell_data_imports_core_services_finalize; -#line 217 "shotwell-data-imports.c" -} - - -static void shotwell_data_imports_core_services_spit_module_interface_init (SpitModuleIface * iface) { -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - shotwell_data_imports_core_services_spit_module_parent_iface = g_type_interface_peek_parent (iface); -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - iface->get_module_name = (const gchar* (*) (SpitModule *)) shotwell_data_imports_core_services_real_get_module_name; -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - iface->get_version = (const gchar* (*) (SpitModule *)) shotwell_data_imports_core_services_real_get_version; -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - iface->get_id = (const gchar* (*) (SpitModule *)) shotwell_data_imports_core_services_real_get_id; -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - iface->get_pluggables = (SpitPluggable** (*) (SpitModule *, int*)) shotwell_data_imports_core_services_real_get_pluggables; -#line 232 "shotwell-data-imports.c" -} - - -static void shotwell_data_imports_core_services_instance_init (ShotwellDataImportsCoreServices * self) { - SpitPluggable** _tmp0_; -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self->priv = SHOTWELL_DATA_IMPORTS_CORE_SERVICES_GET_PRIVATE (self); -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp0_ = g_new0 (SpitPluggable*, 0 + 1); -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self->priv->pluggables = _tmp0_; -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self->priv->pluggables_length1 = 0; -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self->priv->_pluggables_size_ = self->priv->pluggables_length1; -#line 248 "shotwell-data-imports.c" -} - - -static void shotwell_data_imports_core_services_finalize (GObject * obj) { - ShotwellDataImportsCoreServices * self; -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_DATA_IMPORTS_CORE_SERVICES, ShotwellDataImportsCoreServices); -#line 11 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL); -#line 10 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - G_OBJECT_CLASS (shotwell_data_imports_core_services_parent_class)->finalize (obj); -#line 260 "shotwell-data-imports.c" -} - - -GType shotwell_data_imports_core_services_get_type (void) { - static volatile gsize shotwell_data_imports_core_services_type_id__volatile = 0; - if (g_once_init_enter (&shotwell_data_imports_core_services_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ShotwellDataImportsCoreServicesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_data_imports_core_services_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellDataImportsCoreServices), 0, (GInstanceInitFunc) shotwell_data_imports_core_services_instance_init, NULL }; - static const GInterfaceInfo spit_module_info = { (GInterfaceInitFunc) shotwell_data_imports_core_services_spit_module_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType shotwell_data_imports_core_services_type_id; - shotwell_data_imports_core_services_type_id = g_type_register_static (G_TYPE_OBJECT, "ShotwellDataImportsCoreServices", &g_define_type_info, 0); - g_type_add_interface_static (shotwell_data_imports_core_services_type_id, SPIT_TYPE_MODULE, &spit_module_info); - g_once_init_leave (&shotwell_data_imports_core_services_type_id__volatile, shotwell_data_imports_core_services_type_id); - } - return shotwell_data_imports_core_services_type_id__volatile; -} - - -SpitModule* spit_entry_point (SpitEntryPointParams* params) { - SpitModule* result = NULL; - SpitEntryPointParams* _tmp0_; - gint _tmp1_; - SpitEntryPointParams* _tmp2_; - gint _tmp3_; - gint _tmp4_; - ShotwellDataImportsCoreServices* _tmp5_ = NULL; - SpitEntryPointParams* _tmp6_; - gint _tmp7_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp0_ = params; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp1_ = (*_tmp0_).host_min_spit_interface; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp2_ = params; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp3_ = (*_tmp2_).host_max_spit_interface; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - (*params).module_spit_interface = _tmp4_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp6_ = params; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp7_ = (*_tmp6_).module_spit_interface; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) { -#line 306 "shotwell-data-imports.c" - SpitEntryPointParams* _tmp8_; - GFile* _tmp9_; - ShotwellDataImportsCoreServices* _tmp10_; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp8_ = params; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp9_ = (*_tmp8_).module_file; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp10_ = shotwell_data_imports_core_services_new (_tmp9_); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _g_object_unref0 (_tmp5_); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp5_ = _tmp10_; -#line 320 "shotwell-data-imports.c" - } else { -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _g_object_unref0 (_tmp5_); -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - _tmp5_ = NULL; -#line 326 "shotwell-data-imports.c" - } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/shotwell-data-imports.vala" - return result; -#line 332 "shotwell-data-imports.c" -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - diff --git a/plugins/shotwell-data-imports/shotwell-data-imports.vala b/plugins/shotwell-data-imports/shotwell-data-imports.vala deleted file mode 100644 index 78dace0..0000000 --- a/plugins/shotwell-data-imports/shotwell-data-imports.vala +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -extern const string _VERSION; - -// "core services" are: F-Spot -private class ShotwellDataImportsCoreServices : Object, Spit.Module { - private Spit.Pluggable[] pluggables = new Spit.Pluggable[0]; - - // we need to get a module file handle because our pluggables have to load resources from the - // module file directory - public ShotwellDataImportsCoreServices(GLib.File module_file) { - GLib.File resource_directory = module_file.get_parent(); - - pluggables += new FSpotService(resource_directory); - } - - public unowned string get_module_name() { - return _("Core Data Import Services"); - } - - public unowned string get_version() { - return _VERSION; - } - - public unowned string get_id() { - return "org.yorba.shotwell.data_imports.core_services"; - } - - public unowned Spit.Pluggable[]? get_pluggables() { - return pluggables; - } -} - -// This entry point is required for all SPIT modules. -public Spit.Module? spit_entry_point(Spit.EntryPointParams *params) { - params->module_spit_interface = Spit.negotiate_interfaces(params->host_min_spit_interface, - params->host_max_spit_interface, Spit.CURRENT_INTERFACE); - - return (params->module_spit_interface != Spit.UNSUPPORTED_INTERFACE) - ? new ShotwellDataImportsCoreServices(params->module_file) : null; -} - diff --git a/plugins/shotwell-plugin-common.h b/plugins/shotwell-plugin-common.h index 797b04e..a4e0d62 100644 --- a/plugins/shotwell-plugin-common.h +++ b/plugins/shotwell-plugin-common.h @@ -122,6 +122,39 @@ typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransaction Pub typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass; typedef struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate PublishingRESTSupportGooglePublisherAuthenticatedTransactionPrivate; +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION (publishing_rest_support_oauth1_session_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1SessionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1SessionClass)) + +typedef struct _PublishingRESTSupportOAuth1Session PublishingRESTSupportOAuth1Session; +typedef struct _PublishingRESTSupportOAuth1SessionClass PublishingRESTSupportOAuth1SessionClass; +typedef struct _PublishingRESTSupportOAuth1SessionPrivate PublishingRESTSupportOAuth1SessionPrivate; + +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION (publishing_rest_support_oauth1_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1Transaction)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1TransactionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, PublishingRESTSupportOAuth1TransactionClass)) + +typedef struct _PublishingRESTSupportOAuth1Transaction PublishingRESTSupportOAuth1Transaction; +typedef struct _PublishingRESTSupportOAuth1TransactionClass PublishingRESTSupportOAuth1TransactionClass; +typedef struct _PublishingRESTSupportOAuth1TransactionPrivate PublishingRESTSupportOAuth1TransactionPrivate; + +#define PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION (publishing_rest_support_oauth1_upload_transaction_get_type ()) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransactionClass)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_REST_SUPPORT_OAUTH1_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransactionClass)) + +typedef struct _PublishingRESTSupportOAuth1UploadTransaction PublishingRESTSupportOAuth1UploadTransaction; +typedef struct _PublishingRESTSupportOAuth1UploadTransactionClass PublishingRESTSupportOAuth1UploadTransactionClass; +typedef struct _PublishingRESTSupportOAuth1UploadTransactionPrivate PublishingRESTSupportOAuth1UploadTransactionPrivate; + #define SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE (shotwell_plugins_common_web_authentication_pane_get_type ()) #define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane)) #define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPaneClass)) @@ -261,6 +294,34 @@ struct _PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass { PublishingRESTSupportTransactionClass parent_class; }; +struct _PublishingRESTSupportOAuth1Session { + PublishingRESTSupportSession parent_instance; + PublishingRESTSupportOAuth1SessionPrivate * priv; +}; + +struct _PublishingRESTSupportOAuth1SessionClass { + PublishingRESTSupportSessionClass parent_class; +}; + +struct _PublishingRESTSupportOAuth1Transaction { + PublishingRESTSupportTransaction parent_instance; + PublishingRESTSupportOAuth1TransactionPrivate * priv; +}; + +struct _PublishingRESTSupportOAuth1TransactionClass { + PublishingRESTSupportTransactionClass parent_class; +}; + +struct _PublishingRESTSupportOAuth1UploadTransaction { + PublishingRESTSupportUploadTransaction parent_instance; + PublishingRESTSupportOAuth1UploadTransactionPrivate * priv; + PublishingRESTSupportOAuth1Session* session; +}; + +struct _PublishingRESTSupportOAuth1UploadTransactionClass { + PublishingRESTSupportUploadTransactionClass parent_class; +}; + struct _ShotwellPluginsCommonWebAuthenticationPane { GObject parent_instance; ShotwellPluginsCommonWebAuthenticationPanePrivate * priv; @@ -314,9 +375,10 @@ gpointer publishing_rest_support_value_get_argument (const GValue* value); GType publishing_rest_support_argument_get_type (void) G_GNUC_CONST; 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); +gchar* publishing_rest_support_argument_serialize_list (PublishingRESTSupportArgument** args, int args_length1, gboolean escape, const gchar* separator); gint publishing_rest_support_argument_compare (PublishingRESTSupportArgument* arg1, PublishingRESTSupportArgument* arg2); PublishingRESTSupportArgument** publishing_rest_support_argument_sort (PublishingRESTSupportArgument** inputArray, int inputArray_length1, int* result_length1); -gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self); +gchar* publishing_rest_support_argument_to_string (PublishingRESTSupportArgument* self, gboolean escape); 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); @@ -396,6 +458,34 @@ void publishing_rest_support_google_publisher_stop (PublishingRESTSupportGoogleP GType publishing_rest_support_google_publisher_authenticated_transaction_get_type (void) G_GNUC_CONST; PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_new (PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method); PublishingRESTSupportGooglePublisherAuthenticatedTransaction* publishing_rest_support_google_publisher_authenticated_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, const gchar* endpoint_url, PublishingRESTSupportHttpMethod method); +GType publishing_rest_support_oauth1_session_get_type (void) G_GNUC_CONST; +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); +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); +gchar* publishing_rest_support_oauth1_session_sign_transaction (PublishingRESTSupportOAuth1Session* self, PublishingRESTSupportTransaction* txn, PublishingRESTSupportArgument** extra_arguments, int extra_arguments_length1); +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); +gchar* publishing_rest_support_oauth1_session_get_request_phase_token (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_access_phase_token (PublishingRESTSupportOAuth1Session* self); +gboolean publishing_rest_support_oauth1_session_has_access_phase_token (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_access_phase_token_secret (PublishingRESTSupportOAuth1Session* self); +gchar* publishing_rest_support_oauth1_session_get_username (PublishingRESTSupportOAuth1Session* self); +GType publishing_rest_support_oauth1_transaction_get_type (void) G_GNUC_CONST; +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); +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); +GType publishing_rest_support_oauth1_upload_transaction_get_type (void) G_GNUC_CONST; +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); +void publishing_rest_support_oauth1_upload_transaction_add_authorization_header_field (PublishingRESTSupportOAuth1UploadTransaction* self, const gchar* key, const gchar* value); +gchar* publishing_rest_support_oauth1_upload_transaction_get_authorization_header_string (PublishingRESTSupportOAuth1UploadTransaction* self); +void publishing_rest_support_oauth1_upload_transaction_authorize (PublishingRESTSupportOAuth1UploadTransaction* self); #define RESOURCES_WEBSITE_NAME _ ("Visit the Shotwell home page") #define RESOURCES_WEBSITE_URL "https://wiki.gnome.org/Apps/Shotwell" #define RESOURCES_LICENSE "\n" \ diff --git a/plugins/shotwell-plugin-common.vapi b/plugins/shotwell-plugin-common.vapi index 9fc93eb..f07c2c7 100644 --- a/plugins/shotwell-plugin-common.vapi +++ b/plugins/shotwell-plugin-common.vapi @@ -2,14 +2,50 @@ namespace Publishing { namespace RESTSupport { + namespace OAuth1 { + [CCode (cheader_filename = "shotwell-plugin-common.h")] + public class Session : Publishing.RESTSupport.Session { + public Session (string? endpoint_uri = null); + public void authenticate_from_persistent_credentials (string token, string secret, string username); + public void deauthenticate (); + public string get_access_phase_token (); + public string get_access_phase_token_secret (); + public string get_consumer_key (); + public string get_oauth_nonce (); + public string get_oauth_timestamp (); + public string get_request_phase_token (); + public string get_username (); + public bool has_access_phase_token (); + public override bool is_authenticated (); + public void set_access_phase_credentials (string token, string secret, string username); + public void set_api_credentials (string consumer_key, string consumer_secret); + public void set_request_phase_credentials (string token, string secret); + public string sign_transaction (Publishing.RESTSupport.Transaction txn, Publishing.RESTSupport.Argument[]? extra_arguments = null); + } + [CCode (cheader_filename = "shotwell-plugin-common.h")] + public class Transaction : Publishing.RESTSupport.Transaction { + public Transaction (Publishing.RESTSupport.OAuth1.Session session, Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST); + public override void execute () throws Spit.Publishing.PublishingError; + public Transaction.with_uri (Publishing.RESTSupport.OAuth1.Session session, string uri, Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST); + } + [CCode (cheader_filename = "shotwell-plugin-common.h")] + public class UploadTransaction : Publishing.RESTSupport.UploadTransaction { + protected weak Publishing.RESTSupport.OAuth1.Session session; + public UploadTransaction (Publishing.RESTSupport.OAuth1.Session session, Spit.Publishing.Publishable publishable, string endpoint_uri); + public void add_authorization_header_field (string key, string value); + public void authorize (); + public string get_authorization_header_string (); + } + } [CCode (cheader_filename = "shotwell-plugin-common.h")] public class Argument { public string key; public string value; public Argument (string key, string value); public static int compare (Publishing.RESTSupport.Argument arg1, Publishing.RESTSupport.Argument arg2); + public static string serialize_list (Publishing.RESTSupport.Argument[] args, bool escape = false, string? separator = "&"); public static Publishing.RESTSupport.Argument[] sort (Publishing.RESTSupport.Argument[] inputArray); - public string to_string (); + public string to_string (bool escape = false); } [CCode (cheader_filename = "shotwell-plugin-common.h")] public abstract class BatchUploader { diff --git a/plugins/shotwell-publishing-extras/TumblrPublishing.c b/plugins/shotwell-publishing-extras/TumblrPublishing.c deleted file mode 100644 index 8749112..0000000 --- a/plugins/shotwell-publishing-extras/TumblrPublishing.c +++ /dev/null @@ -1,8447 +0,0 @@ -/* TumblrPublishing.c generated by valac 0.36.6, the Vala compiler - * generated from TumblrPublishing.vala, do not modify */ - -/* Copyright 2012 BJA Electronics - * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include <glib.h> -#include <glib-object.h> -#include <shotwell-plugin-dev-1.0.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <stdlib.h> -#include <string.h> -#include <gio/gio.h> -#include "shotwell-plugin-common.h" -#include <glib/gi18n-lib.h> -#include <gtk/gtk.h> -#include <json-glib/json-glib.h> -#include <gee.h> -#include <float.h> -#include <math.h> -#include <libsoup/soup.h> -#include <glib/gstdio.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_TUMBLR_SERVICE (tumblr_service_get_type ()) -#define TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TUMBLR_SERVICE, TumblrService)) -#define TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) -#define IS_TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TUMBLR_SERVICE)) -#define IS_TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TUMBLR_SERVICE)) -#define TUMBLR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) - -typedef struct _TumblrService TumblrService; -typedef struct _TumblrServiceClass TumblrServiceClass; -typedef struct _TumblrServicePrivate TumblrServicePrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER (publishing_tumblr_tumblr_publisher_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherClass)) -#define PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER)) -#define PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherClass)) - -typedef struct _PublishingTumblrTumblrPublisher PublishingTumblrTumblrPublisher; -typedef struct _PublishingTumblrTumblrPublisherClass PublishingTumblrTumblrPublisherClass; - -#define PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY (publishing_tumblr_blog_entry_get_type ()) -#define PUBLISHING_TUMBLR_BLOG_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntry)) -#define PUBLISHING_TUMBLR_BLOG_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntryClass)) -#define PUBLISHING_TUMBLR_IS_BLOG_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)) -#define PUBLISHING_TUMBLR_IS_BLOG_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)) -#define PUBLISHING_TUMBLR_BLOG_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntryClass)) - -typedef struct _PublishingTumblrBlogEntry PublishingTumblrBlogEntry; -typedef struct _PublishingTumblrBlogEntryClass PublishingTumblrBlogEntryClass; -typedef struct _PublishingTumblrBlogEntryPrivate PublishingTumblrBlogEntryPrivate; -typedef struct _PublishingTumblrParamSpecBlogEntry PublishingTumblrParamSpecBlogEntry; - -#define PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY (publishing_tumblr_size_entry_get_type ()) -#define PUBLISHING_TUMBLR_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntry)) -#define PUBLISHING_TUMBLR_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntryClass)) -#define PUBLISHING_TUMBLR_IS_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)) -#define PUBLISHING_TUMBLR_IS_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)) -#define PUBLISHING_TUMBLR_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntryClass)) - -typedef struct _PublishingTumblrSizeEntry PublishingTumblrSizeEntry; -typedef struct _PublishingTumblrSizeEntryClass PublishingTumblrSizeEntryClass; -typedef struct _PublishingTumblrSizeEntryPrivate PublishingTumblrSizeEntryPrivate; -typedef struct _PublishingTumblrParamSpecSizeEntry PublishingTumblrParamSpecSizeEntry; -typedef struct _PublishingTumblrTumblrPublisherPrivate PublishingTumblrTumblrPublisherPrivate; - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION (publishing_tumblr_tumblr_publisher_session_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSession)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSessionClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSessionClass)) - -typedef struct _PublishingTumblrTumblrPublisherSession PublishingTumblrTumblrPublisherSession; -typedef struct _PublishingTumblrTumblrPublisherSessionClass PublishingTumblrTumblrPublisherSessionClass; - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE (publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPaneClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPaneClass)) - -typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPane PublishingTumblrTumblrPublisherPublishingOptionsPane; -typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPaneClass PublishingTumblrTumblrPublisherPublishingOptionsPaneClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_TYPE_MODE (publishing_tumblr_tumblr_publisher_authentication_pane_mode_get_type ()) - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE (publishing_tumblr_tumblr_publisher_authentication_pane_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPaneClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPaneClass)) - -typedef struct _PublishingTumblrTumblrPublisherAuthenticationPane PublishingTumblrTumblrPublisherAuthenticationPane; -typedef struct _PublishingTumblrTumblrPublisherAuthenticationPaneClass PublishingTumblrTumblrPublisherAuthenticationPaneClass; - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION (publishing_tumblr_tumblr_publisher_transaction_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, PublishingTumblrTumblrPublisherTransaction)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, PublishingTumblrTumblrPublisherTransactionClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, PublishingTumblrTumblrPublisherTransactionClass)) - -typedef struct _PublishingTumblrTumblrPublisherTransaction PublishingTumblrTumblrPublisherTransaction; -typedef struct _PublishingTumblrTumblrPublisherTransactionClass PublishingTumblrTumblrPublisherTransactionClass; - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherAccessTokenFetchTransaction)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass)) - -typedef struct _PublishingTumblrTumblrPublisherAccessTokenFetchTransaction PublishingTumblrTumblrPublisherAccessTokenFetchTransaction; -typedef struct _PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass; -#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION (publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransaction)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_USER_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_USER_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass)) - -typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransaction PublishingTumblrTumblrPublisherUserInfoFetchTransaction; -typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass; -#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) -#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL))) -#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL))) -#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL))) - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER (publishing_tumblr_tumblr_publisher_uploader_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderClass)) - -typedef struct _PublishingTumblrTumblrPublisherUploader PublishingTumblrTumblrPublisherUploader; -typedef struct _PublishingTumblrTumblrPublisherUploaderClass PublishingTumblrTumblrPublisherUploaderClass; -#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) -typedef struct _PublishingTumblrTumblrPublisherAuthenticationPanePrivate PublishingTumblrTumblrPublisherAuthenticationPanePrivate; -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_LOGIN_SIGNAL, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_LAST_SIGNAL -}; -static guint publishing_tumblr_tumblr_publisher_authentication_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_LAST_SIGNAL] = {0}; -typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate; -#define _publishing_tumblr_blog_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_tumblr_blog_entry_unref (var), NULL))) -#define _publishing_tumblr_size_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_tumblr_size_entry_unref (var), NULL))) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LAST_SIGNAL -}; -static guint publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LAST_SIGNAL] = {0}; -typedef struct _PublishingTumblrTumblrPublisherTransactionPrivate PublishingTumblrTumblrPublisherTransactionPrivate; -typedef struct _PublishingTumblrTumblrPublisherAccessTokenFetchTransactionPrivate PublishingTumblrTumblrPublisherAccessTokenFetchTransactionPrivate; -typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate; - -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION (publishing_tumblr_tumblr_publisher_upload_transaction_get_type ()) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransaction)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransactionClass)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION)) -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransactionClass)) - -typedef struct _PublishingTumblrTumblrPublisherUploadTransaction PublishingTumblrTumblrPublisherUploadTransaction; -typedef struct _PublishingTumblrTumblrPublisherUploadTransactionClass PublishingTumblrTumblrPublisherUploadTransactionClass; -typedef struct _PublishingTumblrTumblrPublisherUploadTransactionPrivate PublishingTumblrTumblrPublisherUploadTransactionPrivate; -#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) -typedef struct _PublishingTumblrTumblrPublisherUploaderPrivate PublishingTumblrTumblrPublisherUploaderPrivate; -typedef struct _PublishingTumblrTumblrPublisherSessionPrivate PublishingTumblrTumblrPublisherSessionPrivate; -#define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _TumblrService { - GObject parent_instance; - TumblrServicePrivate * priv; -}; - -struct _TumblrServiceClass { - GObjectClass parent_class; -}; - -struct _PublishingTumblrBlogEntry { - GTypeInstance parent_instance; - volatile int ref_count; - PublishingTumblrBlogEntryPrivate * priv; - gchar* blog; - gchar* url; -}; - -struct _PublishingTumblrBlogEntryClass { - GTypeClass parent_class; - void (*finalize) (PublishingTumblrBlogEntry *self); -}; - -struct _PublishingTumblrParamSpecBlogEntry { - GParamSpec parent_instance; -}; - -struct _PublishingTumblrSizeEntry { - GTypeInstance parent_instance; - volatile int ref_count; - PublishingTumblrSizeEntryPrivate * priv; - gchar* title; - gint size; -}; - -struct _PublishingTumblrSizeEntryClass { - GTypeClass parent_class; - void (*finalize) (PublishingTumblrSizeEntry *self); -}; - -struct _PublishingTumblrParamSpecSizeEntry { - GParamSpec parent_instance; -}; - -struct _PublishingTumblrTumblrPublisher { - GObject parent_instance; - PublishingTumblrTumblrPublisherPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherClass { - GObjectClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherPrivate { - SpitPublishingService* service; - SpitPublishingPluginHost* host; - SpitPublishingProgressCallback progress_reporter; - gpointer progress_reporter_target; - GDestroyNotify progress_reporter_target_destroy_notify; - gboolean running; - gboolean was_started; - PublishingTumblrTumblrPublisherSession* session; - PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_options_pane; - PublishingTumblrSizeEntry** sizes; - gint sizes_length1; - gint _sizes_size_; - PublishingTumblrBlogEntry** blogs; - gint blogs_length1; - gint _blogs_size_; - gchar* username; -}; - -typedef enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_INTRO, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER -} PublishingTumblrTumblrPublisherAuthenticationPaneMode; - -struct _PublishingTumblrTumblrPublisherAuthenticationPane { - GObject parent_instance; - PublishingTumblrTumblrPublisherAuthenticationPanePrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherAuthenticationPaneClass { - GObjectClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherAuthenticationPanePrivate { - GtkBox* pane_widget; - GtkBuilder* builder; - GtkEntry* username_entry; - GtkEntry* password_entry; - GtkButton* login_button; -}; - -struct _PublishingTumblrTumblrPublisherPublishingOptionsPane { - GObject parent_instance; - PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherPublishingOptionsPaneClass { - GObjectClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate { - GtkBuilder* builder; - GtkBox* pane_widget; - GtkLabel* upload_info_label; - GtkLabel* size_label; - GtkLabel* blog_label; - GtkButton* logout_button; - GtkButton* publish_button; - GtkComboBoxText* size_combo; - GtkComboBoxText* blog_combo; - PublishingTumblrSizeEntry** sizes; - gint sizes_length1; - gint _sizes_size_; - PublishingTumblrBlogEntry** blogs; - gint blogs_length1; - gint _blogs_size_; - gchar* username; - PublishingTumblrTumblrPublisher* publisher; - SpitPublishingPublisherMediaType media_type; -}; - -struct _PublishingTumblrTumblrPublisherTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingTumblrTumblrPublisherTransactionPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherAccessTokenFetchTransaction { - PublishingTumblrTumblrPublisherTransaction parent_instance; - PublishingTumblrTumblrPublisherAccessTokenFetchTransactionPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass { - PublishingTumblrTumblrPublisherTransactionClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherUserInfoFetchTransaction { - PublishingTumblrTumblrPublisherTransaction parent_instance; - PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass { - PublishingTumblrTumblrPublisherTransactionClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherUploadTransaction { - PublishingRESTSupportUploadTransaction parent_instance; - PublishingTumblrTumblrPublisherUploadTransactionPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherUploadTransactionClass { - PublishingRESTSupportUploadTransactionClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherUploadTransactionPrivate { - PublishingTumblrTumblrPublisherSession* session; - PublishingRESTSupportArgument** auth_header_fields; - gint auth_header_fields_length1; - gint _auth_header_fields_size_; -}; - -struct _PublishingTumblrTumblrPublisherUploader { - PublishingRESTSupportBatchUploader parent_instance; - PublishingTumblrTumblrPublisherUploaderPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherUploaderClass { - PublishingRESTSupportBatchUploaderClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherUploaderPrivate { - gchar* blog_url; -}; - -struct _PublishingTumblrTumblrPublisherSession { - PublishingRESTSupportSession parent_instance; - PublishingTumblrTumblrPublisherSessionPrivate * priv; -}; - -struct _PublishingTumblrTumblrPublisherSessionClass { - PublishingRESTSupportSessionClass parent_class; -}; - -struct _PublishingTumblrTumblrPublisherSessionPrivate { - gchar* access_phase_token; - gchar* access_phase_token_secret; -}; - - -static gpointer tumblr_service_parent_class = NULL; -static GdkPixbuf** tumblr_service_icon_pixbuf_set; -static gint tumblr_service_icon_pixbuf_set_length1; -static GdkPixbuf** tumblr_service_icon_pixbuf_set = NULL; -static gint tumblr_service_icon_pixbuf_set_length1 = 0; -static gint _tumblr_service_icon_pixbuf_set_size_ = 0; -static SpitPluggableIface * tumblr_service_spit_pluggable_parent_iface = NULL; -static SpitPublishingServiceIface * tumblr_service_spit_publishing_service_parent_iface = NULL; -static gpointer publishing_tumblr_blog_entry_parent_class = NULL; -static gpointer publishing_tumblr_size_entry_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_authentication_pane_parent_class = NULL; -static gchar* publishing_tumblr_tumblr_publisher_authentication_pane_INTRO_MESSAGE; -static gchar* publishing_tumblr_tumblr_publisher_authentication_pane_INTRO_MESSAGE = NULL; -static gchar* publishing_tumblr_tumblr_publisher_authentication_pane_FAILED_RETRY_USER_MESSAGE; -static gchar* publishing_tumblr_tumblr_publisher_authentication_pane_FAILED_RETRY_USER_MESSAGE = NULL; -static SpitPublishingDialogPaneIface * publishing_tumblr_tumblr_publisher_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL; -static gpointer publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class = NULL; -static SpitPublishingDialogPaneIface * publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; -static gpointer publishing_tumblr_tumblr_publisher_transaction_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_upload_transaction_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_uploader_parent_class = NULL; -static gpointer publishing_tumblr_tumblr_publisher_session_parent_class = NULL; -static SpitPublishingPublisherIface * publishing_tumblr_tumblr_publisher_spit_publishing_publisher_parent_iface = NULL; - -GType tumblr_service_get_type (void) G_GNUC_CONST; -enum { - TUMBLR_SERVICE_DUMMY_PROPERTY -}; -#define TUMBLR_SERVICE_ICON_FILENAME "tumblr.png" -TumblrService* tumblr_service_new (GFile* resource_directory); -TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory); -static gint tumblr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); -static const gchar* tumblr_service_real_get_id (SpitPluggable* base); -static const gchar* tumblr_service_real_get_pluggable_name (SpitPluggable* base); -static void tumblr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); -static GdkPixbuf** _vala_array_dup6 (GdkPixbuf** self, int length); -static void tumblr_service_real_activation (SpitPluggable* base, gboolean enabled); -static SpitPublishingPublisher* tumblr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); -PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); -PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); -GType publishing_tumblr_tumblr_publisher_get_type (void) G_GNUC_CONST; -static SpitPublishingPublisherMediaType tumblr_service_real_get_supported_media (SpitPublishingService* base); -static void tumblr_service_finalize (GObject * obj); -#define PUBLISHING_TUMBLR_SERVICE_NAME "Tumblr" -#define PUBLISHING_TUMBLR_ENDPOINT_URL "https://www.tumblr.com/" -#define PUBLISHING_TUMBLR_API_KEY "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k" -#define PUBLISHING_TUMBLR_API_SECRET "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi" -#define PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" -#define PUBLISHING_TUMBLR_ORIGINAL_SIZE -1 -gpointer publishing_tumblr_blog_entry_ref (gpointer instance); -void publishing_tumblr_blog_entry_unref (gpointer instance); -GParamSpec* publishing_tumblr_param_spec_blog_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void publishing_tumblr_value_set_blog_entry (GValue* value, gpointer v_object); -void publishing_tumblr_value_take_blog_entry (GValue* value, gpointer v_object); -gpointer publishing_tumblr_value_get_blog_entry (const GValue* value); -GType publishing_tumblr_blog_entry_get_type (void) G_GNUC_CONST; -enum { - PUBLISHING_TUMBLR_BLOG_ENTRY_DUMMY_PROPERTY -}; -PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_new (const gchar* creator_blog, const gchar* creator_url); -PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_construct (GType object_type, const gchar* creator_blog, const gchar* creator_url); -static void publishing_tumblr_blog_entry_finalize (PublishingTumblrBlogEntry * obj); -gpointer publishing_tumblr_size_entry_ref (gpointer instance); -void publishing_tumblr_size_entry_unref (gpointer instance); -GParamSpec* publishing_tumblr_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void publishing_tumblr_value_set_size_entry (GValue* value, gpointer v_object); -void publishing_tumblr_value_take_size_entry (GValue* value, gpointer v_object); -gpointer publishing_tumblr_value_get_size_entry (const GValue* value); -GType publishing_tumblr_size_entry_get_type (void) G_GNUC_CONST; -enum { - PUBLISHING_TUMBLR_SIZE_ENTRY_DUMMY_PROPERTY -}; -PublishingTumblrSizeEntry* publishing_tumblr_size_entry_new (const gchar* creator_title, gint creator_size); -PublishingTumblrSizeEntry* publishing_tumblr_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size); -static void publishing_tumblr_size_entry_finalize (PublishingTumblrSizeEntry * obj); -GType publishing_tumblr_tumblr_publisher_session_get_type (void) G_GNUC_CONST; -GType publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type (void) G_GNUC_CONST; -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherPrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_DUMMY_PROPERTY -}; -static void publishing_tumblr_tumblr_publisher_on_session_authenticated (PublishingTumblrTumblrPublisher* self); -static void _publishing_tumblr_tumblr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self); -static PublishingTumblrSizeEntry** publishing_tumblr_tumblr_publisher_create_sizes (PublishingTumblrTumblrPublisher* self, int* result_length1); -static void _vala_array_add18 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); -static void _vala_array_add19 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); -static void _vala_array_add20 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); -static PublishingTumblrBlogEntry** publishing_tumblr_tumblr_publisher_create_blogs (PublishingTumblrTumblrPublisher* self, int* result_length1); -PublishingTumblrTumblrPublisherSession* publishing_tumblr_tumblr_publisher_session_new (void); -PublishingTumblrTumblrPublisherSession* publishing_tumblr_tumblr_publisher_session_construct (GType object_type); -static void publishing_tumblr_tumblr_publisher_invalidate_persistent_session (PublishingTumblrTumblrPublisher* self); -static void publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token (PublishingTumblrTumblrPublisher* self, const gchar* token); -static void publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token_secret (PublishingTumblrTumblrPublisher* self, const gchar* token_secret); -static SpitPublishingService* publishing_tumblr_tumblr_publisher_real_get_service (SpitPublishingPublisher* base); -SpitPublishingPluginHost* publishing_tumblr_tumblr_publisher_get_host (PublishingTumblrTumblrPublisher* self); -static gboolean publishing_tumblr_tumblr_publisher_real_is_running (SpitPublishingPublisher* base); -static gboolean publishing_tumblr_tumblr_publisher_is_persistent_session_valid (PublishingTumblrTumblrPublisher* self); -gchar* publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token (PublishingTumblrTumblrPublisher* self); -gchar* publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token_secret (PublishingTumblrTumblrPublisher* self); -gint publishing_tumblr_tumblr_publisher_get_persistent_default_size (PublishingTumblrTumblrPublisher* self); -void publishing_tumblr_tumblr_publisher_set_persistent_default_size (PublishingTumblrTumblrPublisher* self, gint size); -gint publishing_tumblr_tumblr_publisher_get_persistent_default_blog (PublishingTumblrTumblrPublisher* self); -void publishing_tumblr_tumblr_publisher_set_persistent_default_blog (PublishingTumblrTumblrPublisher* self, gint blog); -GType publishing_tumblr_tumblr_publisher_authentication_pane_mode_get_type (void) G_GNUC_CONST; -static void publishing_tumblr_tumblr_publisher_do_show_authentication_pane (PublishingTumblrTumblrPublisher* self, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode); -GType publishing_tumblr_tumblr_publisher_authentication_pane_get_type (void) G_GNUC_CONST; -PublishingTumblrTumblrPublisherAuthenticationPane* publishing_tumblr_tumblr_publisher_authentication_pane_new (PublishingTumblrTumblrPublisher* publisher, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode); -PublishingTumblrTumblrPublisherAuthenticationPane* publishing_tumblr_tumblr_publisher_authentication_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode); -static void publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked (PublishingTumblrTumblrPublisher* self, const gchar* username, const gchar* password); -static void _publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked_publishing_tumblr_tumblr_publisher_authentication_pane_login (PublishingTumblrTumblrPublisherAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self); -GtkWidget* publishing_tumblr_tumblr_publisher_authentication_pane_get_default_widget (PublishingTumblrTumblrPublisherAuthenticationPane* self); -static void publishing_tumblr_tumblr_publisher_do_network_login (PublishingTumblrTumblrPublisher* self, const gchar* username, const gchar* password); -GType publishing_tumblr_tumblr_publisher_transaction_get_type (void) G_GNUC_CONST; -GType publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; -PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_new (PublishingTumblrTumblrPublisherSession* session, const gchar* username, const gchar* password); -PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, const gchar* username, const gchar* password); -static void publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn); -static void _publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_on_auth_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); -static void _publishing_tumblr_tumblr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); -static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_auth_request (PublishingTumblrTumblrPublisher* self, const gchar* response); -void publishing_tumblr_tumblr_publisher_session_set_access_phase_credentials (PublishingTumblrTumblrPublisherSession* self, const gchar* token, const gchar* secret); -gchar* publishing_tumblr_tumblr_publisher_session_get_access_phase_token (PublishingTumblrTumblrPublisherSession* self); -gchar* publishing_tumblr_tumblr_publisher_session_get_access_phase_token_secret (PublishingTumblrTumblrPublisherSession* self); -static void publishing_tumblr_tumblr_publisher_do_get_blogs (PublishingTumblrTumblrPublisher* self); -GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type (void) G_GNUC_CONST; -PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (PublishingTumblrTumblrPublisherSession* session); -PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session); -static void publishing_tumblr_tumblr_publisher_on_info_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn); -static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_on_info_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); -static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); -static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (PublishingTumblrTumblrPublisher* self, const gchar* response); -static void publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (PublishingTumblrTumblrPublisher* self); -static void _vala_array_add21 (PublishingTumblrBlogEntry** * array, int* length, int* size, PublishingTumblrBlogEntry* value); -void publishing_tumblr_tumblr_publisher_session_deauthenticate (PublishingTumblrTumblrPublisherSession* self); -PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_new (PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username); -PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username); -static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish (PublishingTumblrTumblrPublisher* self); -static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout (PublishingTumblrTumblrPublisher* self); -static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_do_publish (PublishingTumblrTumblrPublisher* self); -static void publishing_tumblr_tumblr_publisher_do_logout (PublishingTumblrTumblrPublisher* self); -gint publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b); -static gint _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); -GType publishing_tumblr_tumblr_publisher_uploader_get_type (void) G_GNUC_CONST; -PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_new (PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url); -PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url); -static void publishing_tumblr_tumblr_publisher_on_upload_complete (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); -static void _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); -static void publishing_tumblr_tumblr_publisher_on_upload_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); -static void _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); -static void publishing_tumblr_tumblr_publisher_on_upload_status_updated (PublishingTumblrTumblrPublisher* self, gint file_number, gdouble completed_fraction); -static void _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); -static void publishing_tumblr_tumblr_publisher_do_show_success_pane (PublishingTumblrTumblrPublisher* self); -void publishing_tumblr_tumblr_publisher_attempt_start (PublishingTumblrTumblrPublisher* self); -void publishing_tumblr_tumblr_publisher_session_authenticate_from_persistent_credentials (PublishingTumblrTumblrPublisherSession* self, const gchar* token, const gchar* secret); -static void publishing_tumblr_tumblr_publisher_real_start (SpitPublishingPublisher* base); -static void publishing_tumblr_tumblr_publisher_real_stop (SpitPublishingPublisher* base); -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPanePrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_DUMMY_PROPERTY -}; -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed (PublishingTumblrTumblrPublisherAuthenticationPane* self); -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed (PublishingTumblrTumblrPublisherAuthenticationPane* self); -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked (PublishingTumblrTumblrPublisherAuthenticationPane* self); -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_authentication_pane_update_login_button_sensitivity (PublishingTumblrTumblrPublisherAuthenticationPane* self); -static GtkWidget* publishing_tumblr_tumblr_publisher_authentication_pane_real_get_widget (SpitPublishingDialogPane* base); -static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); -static void publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base); -static void publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); -static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void publishing_tumblr_tumblr_publisher_authentication_pane_finalize (GObject * obj); -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY -}; -static PublishingTumblrSizeEntry** _vala_array_dup7 (PublishingTumblrSizeEntry** self, int length); -static PublishingTumblrBlogEntry** _vala_array_dup8 (PublishingTumblrBlogEntry** self, int length); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); -void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); -static GtkWidget* publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); -static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize (GObject * obj); -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TRANSACTION_DUMMY_PROPERTY -}; -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_new (PublishingTumblrTumblrPublisherSession* session, PublishingRESTSupportHttpMethod method); -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, PublishingRESTSupportHttpMethod method); -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_new_with_uri (PublishingTumblrTumblrPublisherSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_construct_with_uri (GType object_type, PublishingTumblrTumblrPublisherSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -gchar* publishing_tumblr_tumblr_publisher_session_get_oauth_nonce (PublishingTumblrTumblrPublisherSession* self); -gchar* publishing_tumblr_tumblr_publisher_session_get_oauth_timestamp (PublishingTumblrTumblrPublisherSession* self); -static void publishing_tumblr_tumblr_publisher_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); -void publishing_tumblr_tumblr_publisher_session_sign_transaction (PublishingTumblrTumblrPublisherSession* self, PublishingRESTSupportTransaction* txn); -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY -}; -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_DUMMY_PROPERTY -}; -GType publishing_tumblr_tumblr_publisher_upload_transaction_get_type (void) G_GNUC_CONST; -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransactionPrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_DUMMY_PROPERTY -}; -static gchar* publishing_tumblr_tumblr_publisher_upload_transaction_encode (PublishingTumblrTumblrPublisherUploadTransaction* self, guint8* data, int data_length1); -PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_new (PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable* publishable, const gchar* blog_url); -PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable* publishable, const gchar* blog_url); -void publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (PublishingTumblrTumblrPublisherUploadTransaction* self, const gchar* key, const gchar* value); -static void _vala_array_add22 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); -PublishingRESTSupportArgument** publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_fields (PublishingTumblrTumblrPublisherUploadTransaction* self, int* result_length1); -static PublishingRESTSupportArgument** _vala_array_dup9 (PublishingRESTSupportArgument** self, int length); -gchar* publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_string (PublishingTumblrTumblrPublisherUploadTransaction* self); -static void publishing_tumblr_tumblr_publisher_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); -static void publishing_tumblr_tumblr_publisher_upload_transaction_finalize (PublishingRESTSupportTransaction * obj); -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderPrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_DUMMY_PROPERTY -}; -static PublishingRESTSupportTransaction* publishing_tumblr_tumblr_publisher_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); -static void publishing_tumblr_tumblr_publisher_uploader_finalize (PublishingRESTSupportBatchUploader * obj); -#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSessionPrivate)) -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION_DUMMY_PROPERTY -}; -static gboolean publishing_tumblr_tumblr_publisher_session_real_is_authenticated (PublishingRESTSupportSession* base); -static void _vala_array_add23 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); -static void publishing_tumblr_tumblr_publisher_session_finalize (PublishingRESTSupportSession * obj); -static void publishing_tumblr_tumblr_publisher_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - - -TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory) { - TumblrService * self = NULL; - GdkPixbuf** _tmp0_; - gint _tmp0__length1; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (TumblrService*) g_object_new (object_type, NULL); -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = tumblr_service_icon_pixbuf_set; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0__length1 = tumblr_service_icon_pixbuf_set_length1; -#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_ == NULL) { -#line 660 "TumblrPublishing.c" - gint _tmp1_; - GdkPixbuf** _tmp2_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" TUMBLR_SERVICE_ICON_FILENAME, &_tmp1_); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_icon_pixbuf_set = (_vala_array_free (tumblr_service_icon_pixbuf_set, tumblr_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_icon_pixbuf_set = _tmp2_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_icon_pixbuf_set_length1 = _tmp1_; -#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tumblr_service_icon_pixbuf_set_size_ = tumblr_service_icon_pixbuf_set_length1; -#line 673 "TumblrPublishing.c" - } -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 677 "TumblrPublishing.c" -} - - -TumblrService* tumblr_service_new (GFile* resource_directory) { -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return tumblr_service_construct (TYPE_TUMBLR_SERVICE, resource_directory); -#line 684 "TumblrPublishing.c" -} - - -static gint tumblr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { - TumblrService * self; - gint result = 0; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = min_host_interface; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = max_host_interface; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp2_; -#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 706 "TumblrPublishing.c" -} - - -static const gchar* tumblr_service_real_get_id (SpitPluggable* base) { - TumblrService * self; - const gchar* result = NULL; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = "org.yorba.shotwell.publishing.tumblr"; -#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 719 "TumblrPublishing.c" -} - - -static const gchar* tumblr_service_real_get_pluggable_name (SpitPluggable* base) { - TumblrService * self; - const gchar* result = NULL; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = "Tumblr"; -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 732 "TumblrPublishing.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? g_object_ref (self) : NULL; -#line 739 "TumblrPublishing.c" -} - - -static GdkPixbuf** _vala_array_dup6 (GdkPixbuf** self, int length) { - GdkPixbuf** result; - int i; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = g_new0 (GdkPixbuf*, length + 1); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (i = 0; i < length; i++) { -#line 750 "TumblrPublishing.c" - GdkPixbuf* _tmp0_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _g_object_ref0 (self[i]); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result[i] = _tmp0_; -#line 756 "TumblrPublishing.c" - } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 760 "TumblrPublishing.c" -} - - -static void tumblr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { - TumblrService * self; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - GdkPixbuf** _tmp7_; - gint _tmp7__length1; - GdkPixbuf** _tmp8_; - gint _tmp8__length1; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (info != NULL); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup ("Jeroen Arnoldus"); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).authors); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).authors = _tmp0_; -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_ ("Copyright 2012 BJA Electronics")); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).copyright); -#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).copyright = _tmp1_; -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = g_strdup (RESOURCES_TRANSLATORS); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).translators); -#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).translators = _tmp2_; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup (_VERSION); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).version); -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).version = _tmp3_; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = g_strdup (RESOURCES_WEBSITE_NAME); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).website_name); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).website_name = _tmp4_; -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = g_strdup (RESOURCES_WEBSITE_URL); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).website_url); -#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).website_url = _tmp5_; -#line 41 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).is_license_wordwrapped = FALSE; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = g_strdup (RESOURCES_LICENSE); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 ((*info).license); -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).license = _tmp6_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = tumblr_service_icon_pixbuf_set; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7__length1 = tumblr_service_icon_pixbuf_set_length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup6 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8__length1 = _tmp7__length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).icons = _tmp8_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*info).icons_length1 = _tmp8__length1; -#line 839 "TumblrPublishing.c" -} - - -static void tumblr_service_real_activation (SpitPluggable* base, gboolean enabled) { - TumblrService * self; -#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 847 "TumblrPublishing.c" -} - - -static SpitPublishingPublisher* tumblr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { - TumblrService * self; - SpitPublishingPublisher* result = NULL; - SpitPublishingPluginHost* _tmp0_; - PublishingTumblrTumblrPublisher* _tmp1_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = host; -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_tumblr_tumblr_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); -#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 868 "TumblrPublishing.c" -} - - -static SpitPublishingPublisherMediaType tumblr_service_real_get_supported_media (SpitPublishingService* base) { - TumblrService * self; - SpitPublishingPublisherMediaType result = 0; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 881 "TumblrPublishing.c" -} - - -static void tumblr_service_class_init (TumblrServiceClass * klass) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_parent_class = g_type_class_peek_parent (klass); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (klass)->finalize = tumblr_service_finalize; -#line 890 "TumblrPublishing.c" -} - - -static void tumblr_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_pluggable_interface = (gint (*) (SpitPluggable *, gint, gint)) tumblr_service_real_get_pluggable_interface; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_id = (const gchar* (*) (SpitPluggable *)) tumblr_service_real_get_id; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_pluggable_name = (const gchar* (*) (SpitPluggable *)) tumblr_service_real_get_pluggable_name; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_info = (void (*) (SpitPluggable *, SpitPluggableInfo*)) tumblr_service_real_get_info; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->activation = (void (*) (SpitPluggable *, gboolean)) tumblr_service_real_activation; -#line 907 "TumblrPublishing.c" -} - - -static void tumblr_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tumblr_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->create_publisher = (SpitPublishingPublisher* (*) (SpitPublishingService *, SpitPublishingPluginHost*)) tumblr_service_real_create_publisher; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_supported_media = (SpitPublishingPublisherMediaType (*) (SpitPublishingService *)) tumblr_service_real_get_supported_media; -#line 918 "TumblrPublishing.c" -} - - -static void tumblr_service_instance_init (TumblrService * self) { -} - - -static void tumblr_service_finalize (GObject * obj) { - TumblrService * self; -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TUMBLR_SERVICE, TumblrService); -#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (tumblr_service_parent_class)->finalize (obj); -#line 932 "TumblrPublishing.c" -} - - -GType tumblr_service_get_type (void) { - static volatile gsize tumblr_service_type_id__volatile = 0; - if (g_once_init_enter (&tumblr_service_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (TumblrServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tumblr_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TumblrService), 0, (GInstanceInitFunc) tumblr_service_instance_init, NULL }; - static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) tumblr_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) tumblr_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType tumblr_service_type_id; - tumblr_service_type_id = g_type_register_static (G_TYPE_OBJECT, "TumblrService", &g_define_type_info, 0); - g_type_add_interface_static (tumblr_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); - g_type_add_interface_static (tumblr_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); - g_once_init_leave (&tumblr_service_type_id__volatile, tumblr_service_type_id); - } - return tumblr_service_type_id__volatile; -} - - -PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_construct (GType object_type, const gchar* creator_blog, const gchar* creator_url) { - PublishingTumblrBlogEntry* self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (creator_blog != NULL, NULL); -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (creator_url != NULL, NULL); -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrBlogEntry*) g_type_create_instance (object_type); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = creator_blog; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->blog); -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->blog = _tmp1_; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = creator_url; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->url); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->url = _tmp3_; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 982 "TumblrPublishing.c" -} - - -PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_new (const gchar* creator_blog, const gchar* creator_url) { -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_blog_entry_construct (PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, creator_blog, creator_url); -#line 989 "TumblrPublishing.c" -} - - -static void publishing_tumblr_value_blog_entry_init (GValue* value) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 996 "TumblrPublishing.c" -} - - -static void publishing_tumblr_value_blog_entry_free_value (GValue* value) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (value->data[0].v_pointer) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_blog_entry_unref (value->data[0].v_pointer); -#line 1005 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_value_blog_entry_copy_value (const GValue* src_value, GValue* dest_value) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (src_value->data[0].v_pointer) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - dest_value->data[0].v_pointer = publishing_tumblr_blog_entry_ref (src_value->data[0].v_pointer); -#line 1015 "TumblrPublishing.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - dest_value->data[0].v_pointer = NULL; -#line 1019 "TumblrPublishing.c" - } -} - - -static gpointer publishing_tumblr_value_blog_entry_peek_pointer (const GValue* value) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return value->data[0].v_pointer; -#line 1027 "TumblrPublishing.c" -} - - -static gchar* publishing_tumblr_value_blog_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (collect_values[0].v_pointer) { -#line 1034 "TumblrPublishing.c" - PublishingTumblrBlogEntry * object; - object = collect_values[0].v_pointer; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (object->parent_instance.g_class == NULL) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1041 "TumblrPublishing.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1045 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = publishing_tumblr_blog_entry_ref (object); -#line 1049 "TumblrPublishing.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1053 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 1057 "TumblrPublishing.c" -} - - -static gchar* publishing_tumblr_value_blog_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { - PublishingTumblrBlogEntry ** object_p; - object_p = collect_values[0].v_pointer; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!object_p) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1068 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!value->data[0].v_pointer) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = NULL; -#line 1074 "TumblrPublishing.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = value->data[0].v_pointer; -#line 1078 "TumblrPublishing.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = publishing_tumblr_blog_entry_ref (value->data[0].v_pointer); -#line 1082 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 1086 "TumblrPublishing.c" -} - - -GParamSpec* publishing_tumblr_param_spec_blog_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { - PublishingTumblrParamSpecBlogEntry* spec; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY), NULL); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return G_PARAM_SPEC (spec); -#line 1100 "TumblrPublishing.c" -} - - -gpointer publishing_tumblr_value_get_blog_entry (const GValue* value) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY), NULL); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return value->data[0].v_pointer; -#line 1109 "TumblrPublishing.c" -} - - -void publishing_tumblr_value_set_blog_entry (GValue* value, gpointer v_object) { - PublishingTumblrBlogEntry * old; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - old = value->data[0].v_pointer; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (v_object) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = v_object; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_blog_entry_ref (value->data[0].v_pointer); -#line 1129 "TumblrPublishing.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1133 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (old) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_blog_entry_unref (old); -#line 1139 "TumblrPublishing.c" - } -} - - -void publishing_tumblr_value_take_blog_entry (GValue* value, gpointer v_object) { - PublishingTumblrBlogEntry * old; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - old = value->data[0].v_pointer; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (v_object) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = v_object; -#line 1158 "TumblrPublishing.c" - } else { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1162 "TumblrPublishing.c" - } -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (old) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_blog_entry_unref (old); -#line 1168 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_blog_entry_class_init (PublishingTumblrBlogEntryClass * klass) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_blog_entry_parent_class = g_type_class_peek_parent (klass); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingTumblrBlogEntryClass *) klass)->finalize = publishing_tumblr_blog_entry_finalize; -#line 1178 "TumblrPublishing.c" -} - - -static void publishing_tumblr_blog_entry_instance_init (PublishingTumblrBlogEntry * self) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->ref_count = 1; -#line 1185 "TumblrPublishing.c" -} - - -static void publishing_tumblr_blog_entry_finalize (PublishingTumblrBlogEntry * obj) { - PublishingTumblrBlogEntry * self; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntry); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_destroy (self); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->blog); -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->url); -#line 1199 "TumblrPublishing.c" -} - - -GType publishing_tumblr_blog_entry_get_type (void) { - static volatile gsize publishing_tumblr_blog_entry_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_blog_entry_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { publishing_tumblr_value_blog_entry_init, publishing_tumblr_value_blog_entry_free_value, publishing_tumblr_value_blog_entry_copy_value, publishing_tumblr_value_blog_entry_peek_pointer, "p", publishing_tumblr_value_blog_entry_collect_value, "p", publishing_tumblr_value_blog_entry_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrBlogEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_blog_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrBlogEntry), 0, (GInstanceInitFunc) publishing_tumblr_blog_entry_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType publishing_tumblr_blog_entry_type_id; - publishing_tumblr_blog_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingTumblrBlogEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&publishing_tumblr_blog_entry_type_id__volatile, publishing_tumblr_blog_entry_type_id); - } - return publishing_tumblr_blog_entry_type_id__volatile; -} - - -gpointer publishing_tumblr_blog_entry_ref (gpointer instance) { - PublishingTumblrBlogEntry * self; - self = instance; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_atomic_int_inc (&self->ref_count); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return instance; -#line 1224 "TumblrPublishing.c" -} - - -void publishing_tumblr_blog_entry_unref (gpointer instance) { - PublishingTumblrBlogEntry * self; - self = instance; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_TUMBLR_BLOG_ENTRY_GET_CLASS (self)->finalize (self); -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1237 "TumblrPublishing.c" - } -} - - -PublishingTumblrSizeEntry* publishing_tumblr_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size) { - PublishingTumblrSizeEntry* self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - gint _tmp2_; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (creator_title != NULL, NULL); -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrSizeEntry*) g_type_create_instance (object_type); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = creator_title; -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->title); -#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->title = _tmp1_; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = creator_size; -#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->size = _tmp2_; -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 1265 "TumblrPublishing.c" -} - - -PublishingTumblrSizeEntry* publishing_tumblr_size_entry_new (const gchar* creator_title, gint creator_size) { -#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_size_entry_construct (PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, creator_title, creator_size); -#line 1272 "TumblrPublishing.c" -} - - -static void publishing_tumblr_value_size_entry_init (GValue* value) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1279 "TumblrPublishing.c" -} - - -static void publishing_tumblr_value_size_entry_free_value (GValue* value) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (value->data[0].v_pointer) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_size_entry_unref (value->data[0].v_pointer); -#line 1288 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_value_size_entry_copy_value (const GValue* src_value, GValue* dest_value) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (src_value->data[0].v_pointer) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - dest_value->data[0].v_pointer = publishing_tumblr_size_entry_ref (src_value->data[0].v_pointer); -#line 1298 "TumblrPublishing.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - dest_value->data[0].v_pointer = NULL; -#line 1302 "TumblrPublishing.c" - } -} - - -static gpointer publishing_tumblr_value_size_entry_peek_pointer (const GValue* value) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return value->data[0].v_pointer; -#line 1310 "TumblrPublishing.c" -} - - -static gchar* publishing_tumblr_value_size_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (collect_values[0].v_pointer) { -#line 1317 "TumblrPublishing.c" - PublishingTumblrSizeEntry * object; - object = collect_values[0].v_pointer; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (object->parent_instance.g_class == NULL) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1324 "TumblrPublishing.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1328 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = publishing_tumblr_size_entry_ref (object); -#line 1332 "TumblrPublishing.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1336 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 1340 "TumblrPublishing.c" -} - - -static gchar* publishing_tumblr_value_size_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { - PublishingTumblrSizeEntry ** object_p; - object_p = collect_values[0].v_pointer; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!object_p) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1351 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!value->data[0].v_pointer) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = NULL; -#line 1357 "TumblrPublishing.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = value->data[0].v_pointer; -#line 1361 "TumblrPublishing.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *object_p = publishing_tumblr_size_entry_ref (value->data[0].v_pointer); -#line 1365 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 1369 "TumblrPublishing.c" -} - - -GParamSpec* publishing_tumblr_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { - PublishingTumblrParamSpecSizeEntry* spec; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY), NULL); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return G_PARAM_SPEC (spec); -#line 1383 "TumblrPublishing.c" -} - - -gpointer publishing_tumblr_value_get_size_entry (const GValue* value) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY), NULL); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return value->data[0].v_pointer; -#line 1392 "TumblrPublishing.c" -} - - -void publishing_tumblr_value_set_size_entry (GValue* value, gpointer v_object) { - PublishingTumblrSizeEntry * old; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - old = value->data[0].v_pointer; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (v_object) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = v_object; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_size_entry_ref (value->data[0].v_pointer); -#line 1412 "TumblrPublishing.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1416 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (old) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_size_entry_unref (old); -#line 1422 "TumblrPublishing.c" - } -} - - -void publishing_tumblr_value_take_size_entry (GValue* value, gpointer v_object) { - PublishingTumblrSizeEntry * old; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - old = value->data[0].v_pointer; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (v_object) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = v_object; -#line 1441 "TumblrPublishing.c" - } else { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1445 "TumblrPublishing.c" - } -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (old) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_size_entry_unref (old); -#line 1451 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_size_entry_class_init (PublishingTumblrSizeEntryClass * klass) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_size_entry_parent_class = g_type_class_peek_parent (klass); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingTumblrSizeEntryClass *) klass)->finalize = publishing_tumblr_size_entry_finalize; -#line 1461 "TumblrPublishing.c" -} - - -static void publishing_tumblr_size_entry_instance_init (PublishingTumblrSizeEntry * self) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->ref_count = 1; -#line 1468 "TumblrPublishing.c" -} - - -static void publishing_tumblr_size_entry_finalize (PublishingTumblrSizeEntry * obj) { - PublishingTumblrSizeEntry * self; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntry); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_destroy (self); -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->title); -#line 1480 "TumblrPublishing.c" -} - - -GType publishing_tumblr_size_entry_get_type (void) { - static volatile gsize publishing_tumblr_size_entry_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_size_entry_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { publishing_tumblr_value_size_entry_init, publishing_tumblr_value_size_entry_free_value, publishing_tumblr_value_size_entry_copy_value, publishing_tumblr_value_size_entry_peek_pointer, "p", publishing_tumblr_value_size_entry_collect_value, "p", publishing_tumblr_value_size_entry_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrSizeEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_size_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrSizeEntry), 0, (GInstanceInitFunc) publishing_tumblr_size_entry_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType publishing_tumblr_size_entry_type_id; - publishing_tumblr_size_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingTumblrSizeEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&publishing_tumblr_size_entry_type_id__volatile, publishing_tumblr_size_entry_type_id); - } - return publishing_tumblr_size_entry_type_id__volatile; -} - - -gpointer publishing_tumblr_size_entry_ref (gpointer instance) { - PublishingTumblrSizeEntry * self; - self = instance; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_atomic_int_inc (&self->ref_count); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return instance; -#line 1505 "TumblrPublishing.c" -} - - -void publishing_tumblr_size_entry_unref (gpointer instance) { - PublishingTumblrSizeEntry * self; - self = instance; -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_TUMBLR_SIZE_ENTRY_GET_CLASS (self)->finalize (self); -#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1518 "TumblrPublishing.c" - } -} - - -static void _publishing_tumblr_tumblr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self) { -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_session_authenticated ((PublishingTumblrTumblrPublisher*) self); -#line 1526 "TumblrPublishing.c" -} - - -static void _vala_array_add18 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); -#line 1537 "TumblrPublishing.c" - } -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 1543 "TumblrPublishing.c" -} - - -static void _vala_array_add19 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); -#line 1554 "TumblrPublishing.c" - } -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 1560 "TumblrPublishing.c" -} - - -static void _vala_array_add20 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); -#line 1571 "TumblrPublishing.c" - } -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 1577 "TumblrPublishing.c" -} - - -static PublishingTumblrSizeEntry** publishing_tumblr_tumblr_publisher_create_sizes (PublishingTumblrTumblrPublisher* self, int* result_length1) { - PublishingTumblrSizeEntry** result = NULL; - PublishingTumblrSizeEntry** _result_ = NULL; - PublishingTumblrSizeEntry** _tmp0_; - gint _result__length1; - gint __result__size_; - PublishingTumblrSizeEntry** _tmp1_; - gint _tmp1__length1; - PublishingTumblrSizeEntry* _tmp2_; - PublishingTumblrSizeEntry** _tmp3_; - gint _tmp3__length1; - PublishingTumblrSizeEntry* _tmp4_; - PublishingTumblrSizeEntry** _tmp5_; - gint _tmp5__length1; - PublishingTumblrSizeEntry* _tmp6_; - PublishingTumblrSizeEntry** _tmp7_; - gint _tmp7__length1; -#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_new0 (PublishingTumblrSizeEntry*, 0 + 1); -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp0_; -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result__length1 = 0; -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - __result__size_ = _result__length1; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _result_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = _result__length1; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = publishing_tumblr_size_entry_new (_ ("500 × 375 pixels"), 500); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add18 (&_result_, &_result__length1, &__result__size_, _tmp2_); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _result_; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3__length1 = _result__length1; -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = publishing_tumblr_size_entry_new (_ ("1024 × 768 pixels"), 1024); -#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add19 (&_result_, &_result__length1, &__result__size_, _tmp4_); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _result_; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5__length1 = _result__length1; -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = publishing_tumblr_size_entry_new (_ ("1280 × 853 pixels"), 1280); -#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add20 (&_result_, &_result__length1, &__result__size_, _tmp6_); -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = _result_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7__length1 = _result__length1; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (result_length1) { -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *result_length1 = _tmp7__length1; -#line 1640 "TumblrPublishing.c" - } -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp7_; -#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1646 "TumblrPublishing.c" -} - - -static PublishingTumblrBlogEntry** publishing_tumblr_tumblr_publisher_create_blogs (PublishingTumblrTumblrPublisher* self, int* result_length1) { - PublishingTumblrBlogEntry** result = NULL; - PublishingTumblrBlogEntry** _result_ = NULL; - PublishingTumblrBlogEntry** _tmp0_; - gint _result__length1; - gint __result__size_; - PublishingTumblrBlogEntry** _tmp1_; - gint _tmp1__length1; -#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_new0 (PublishingTumblrBlogEntry*, 0 + 1); -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp0_; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result__length1 = 0; -#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - __result__size_ = _result__length1; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _result_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = _result__length1; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (result_length1) { -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *result_length1 = _tmp1__length1; -#line 1676 "TumblrPublishing.c" - } -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1682 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { - PublishingTumblrTumblrPublisher * self = NULL; - SpitPublishingService* _tmp0_; - SpitPublishingService* _tmp1_; - SpitPublishingPluginHost* _tmp2_; - SpitPublishingPluginHost* _tmp3_; - PublishingTumblrTumblrPublisherSession* _tmp4_; - gint _tmp5_; - PublishingTumblrSizeEntry** _tmp6_; - gint _tmp7_; - PublishingTumblrBlogEntry** _tmp8_; - PublishingTumblrTumblrPublisherSession* _tmp9_; -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisher*) g_object_new (object_type, NULL); -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:125: TumblrPublisher instantiated."); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = service; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->service); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->service = _tmp1_; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = host; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->host); -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->host = _tmp3_; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = publishing_tumblr_tumblr_publisher_session_new (); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->session = _tmp4_; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = publishing_tumblr_tumblr_publisher_create_sizes (self, &_tmp5_); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = _tmp6_; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes_length1 = _tmp5_; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = publishing_tumblr_tumblr_publisher_create_blogs (self, &_tmp7_); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = _tmp8_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs_length1 = _tmp7_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_blogs_size_ = self->priv->blogs_length1; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = self->priv->session; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_tumblr_tumblr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0); -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 1754 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { -#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_construct (PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, service, host); -#line 1761 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_invalidate_persistent_session (PublishingTumblrTumblrPublisher* self) { -#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token (self, ""); -#line 140 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token_secret (self, ""); -#line 1772 "TumblrPublishing.c" -} - - -static SpitPublishingService* publishing_tumblr_tumblr_publisher_real_get_service (SpitPublishingPublisher* base) { - PublishingTumblrTumblrPublisher * self; - SpitPublishingService* result = NULL; - SpitPublishingService* _tmp0_; - SpitPublishingService* _tmp1_; -#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->service; -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1791 "TumblrPublishing.c" -} - - -SpitPublishingPluginHost* publishing_tumblr_tumblr_publisher_get_host (PublishingTumblrTumblrPublisher* self) { - SpitPublishingPluginHost* result = NULL; - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1809 "TumblrPublishing.c" -} - - -static gboolean publishing_tumblr_tumblr_publisher_real_is_running (SpitPublishingPublisher* base) { - PublishingTumblrTumblrPublisher * self; - gboolean result = FALSE; - gboolean _tmp0_; -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->running; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp0_; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1825 "TumblrPublishing.c" -} - - -static gboolean publishing_tumblr_tumblr_publisher_is_persistent_session_valid (PublishingTumblrTumblrPublisher* self) { - gboolean result = FALSE; - gchar* access_phase_token = NULL; - gchar* _tmp0_; - gchar* access_phase_token_secret = NULL; - gchar* _tmp1_; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_; - gboolean valid = FALSE; - gboolean _tmp5_; -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), FALSE); -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token (self); -#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - access_phase_token = _tmp0_; -#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token_secret (self); -#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - access_phase_token_secret = _tmp1_; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = access_phase_token; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp3_ != NULL) { -#line 1853 "TumblrPublishing.c" - const gchar* _tmp4_; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = access_phase_token_secret; -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp4_ != NULL; -#line 1859 "TumblrPublishing.c" - } else { -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = FALSE; -#line 1863 "TumblrPublishing.c" - } -#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - valid = _tmp2_; -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = valid; -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp5_) { -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:163: existing Tumblr session found in configurat" \ -"ion database; using it."); -#line 1873 "TumblrPublishing.c" - } else { -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:165: no persisted Tumblr session exists."); -#line 1877 "TumblrPublishing.c" - } -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = valid; -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (access_phase_token_secret); -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (access_phase_token); -#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1887 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token (PublishingTumblrTumblrPublisher* self) { - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "token", NULL); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1905 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token (PublishingTumblrTumblrPublisher* self, const gchar* token) { - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = token; -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "token", _tmp1_); -#line 1920 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token_secret (PublishingTumblrTumblrPublisher* self) { - gchar* result = NULL; - SpitPublishingPluginHost* _tmp0_; - gchar* _tmp1_; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "token_secret", NULL); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1938 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token_secret (PublishingTumblrTumblrPublisher* self, const gchar* token_secret) { - SpitPublishingPluginHost* _tmp0_; - const gchar* _tmp1_; -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = token_secret; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "token_secret", _tmp1_); -#line 1953 "TumblrPublishing.c" -} - - -gint publishing_tumblr_tumblr_publisher_get_persistent_default_size (PublishingTumblrTumblrPublisher* self) { - gint result = 0; - SpitPublishingPluginHost* _tmp0_; - gint _tmp1_; -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), 0); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", 1); -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 190 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 1971 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_set_persistent_default_size (PublishingTumblrTumblrPublisher* self, gint size) { - SpitPublishingPluginHost* _tmp0_; - gint _tmp1_; -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = size; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", _tmp1_); -#line 1986 "TumblrPublishing.c" -} - - -gint publishing_tumblr_tumblr_publisher_get_persistent_default_blog (PublishingTumblrTumblrPublisher* self) { - gint result = 0; - SpitPublishingPluginHost* _tmp0_; - gint _tmp1_; -#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), 0); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_blog", 0); -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 2004 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_set_persistent_default_blog (PublishingTumblrTumblrPublisher* self, gint blog) { - SpitPublishingPluginHost* _tmp0_; - gint _tmp1_; -#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = blog; -#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_blog", _tmp1_); -#line 2019 "TumblrPublishing.c" -} - - -/** - * Action that shows the authentication pane. - * - * This action method shows the authentication pane. It is shown at the - * very beginning of the interaction when no persistent parameters are found - * or after a failed login attempt using persisted parameters. It can be - * given a mode flag to specify whether it should be displayed in initial - * mode or in any of the error modes that it supports. - * - * @param mode the mode for the authentication pane - */ -static void _publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked_publishing_tumblr_tumblr_publisher_authentication_pane_login (PublishingTumblrTumblrPublisherAuthenticationPane* _sender, const gchar* user, const gchar* password, gpointer self) { -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked ((PublishingTumblrTumblrPublisher*) self, user, password); -#line 2037 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_show_authentication_pane (PublishingTumblrTumblrPublisher* self, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode) { - SpitPublishingPluginHost* _tmp0_; - PublishingTumblrTumblrPublisherAuthenticationPane* authentication_pane = NULL; - PublishingTumblrTumblrPublisherAuthenticationPaneMode _tmp1_; - PublishingTumblrTumblrPublisherAuthenticationPane* _tmp2_; - SpitPublishingPluginHost* _tmp3_; - SpitPublishingPluginHost* _tmp4_; - GtkWidget* _tmp5_; - GtkWidget* _tmp6_; -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:219: ACTION: installing authentication pane"); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = mode; -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = publishing_tumblr_tumblr_publisher_authentication_pane_new (self, _tmp1_); -#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - authentication_pane = _tmp2_; -#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (authentication_pane, "login", (GCallback) _publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked_publishing_tumblr_tumblr_publisher_authentication_pane_login, self, 0); -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->host; -#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (authentication_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->host; -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_authentication_pane_get_default_widget (authentication_pane); -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _tmp5_; -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_dialog_default_widget (_tmp4_, _tmp6_); -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (_tmp6_); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (authentication_pane); -#line 2082 "TumblrPublishing.c" -} - - -/** - * Event triggered when the login button in the authentication panel is - * clicked. - * - * This event is triggered when the login button in the authentication - * panel is clicked. It then triggers a network login interaction. - * - * @param username the name of the Tumblr user as entered in the dialog - * @param password the password of the Tumblr as entered in the dialog - */ -static void publishing_tumblr_tumblr_publisher_on_authentication_pane_login_clicked (PublishingTumblrTumblrPublisher* self, const gchar* username, const gchar* password) { - gboolean _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (username != NULL); -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (password != NULL); -#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:240: EVENT: on_authentication_pane_login_clicked"); -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->running; -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp0_) { -#line 242 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2114 "TumblrPublishing.c" - } -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = username; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = password; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_network_login (self, _tmp1_, _tmp2_); -#line 2122 "TumblrPublishing.c" -} - - -/** - * Action to perform a network login to a Tumblr blog. - * - * This action performs a network login a Tumblr blog specified the given user name and password as credentials. - * - * @param username the name of the Tumblr user used to login - * @param password the password of the Tumblr user used to login - */ -static void _publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed ((PublishingTumblrTumblrPublisher*) self, _sender); -#line 2137 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_auth_request_txn_error ((PublishingTumblrTumblrPublisher*) self, _sender, err); -#line 2144 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_network_login (PublishingTumblrTumblrPublisher* self, const gchar* username, const gchar* password) { - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* txn = NULL; - PublishingTumblrTumblrPublisherSession* _tmp2_; - const gchar* _tmp3_; - const gchar* _tmp4_; - PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* _tmp5_; - GError * _inner_error_ = NULL; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (username != NULL); -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (password != NULL); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:256: ACTION: logging in"); -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->host; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_install_login_wait_pane (_tmp1_); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->session; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = username; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = password; -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_new (_tmp2_, _tmp3_, _tmp4_); -#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - txn = _tmp5_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 2187 "TumblrPublishing.c" - { -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2195 "TumblrPublishing.c" - goto __catch32_spit_publishing_publishing_error; - } -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2206 "TumblrPublishing.c" - } - } - goto __finally32; - __catch32_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp6_; - GError* _tmp7_; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - err = _inner_error_; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->host; -#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = err; -#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (err); -#line 2227 "TumblrPublishing.c" - } - __finally32: -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2240 "TumblrPublishing.c" - } -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 2244 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn) { - PublishingRESTSupportTransaction* _tmp0_; - guint _tmp1_; - PublishingRESTSupportTransaction* _tmp2_; - guint _tmp3_; - gboolean _tmp4_; - PublishingRESTSupportTransaction* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - PublishingRESTSupportTransaction* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = txn; -#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = txn; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp4_) { -#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2282 "TumblrPublishing.c" - } -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = txn; -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = _tmp6_; -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:280: EVENT: OAuth authentication request transac" \ -"tion completed; response = '%s'", _tmp7_); -#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp7_); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = txn; -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = publishing_rest_support_transaction_get_response (_tmp8_); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = _tmp9_; -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_parse_token_info_from_auth_request (self, _tmp10_); -#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp10_); -#line 2304 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_auth_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { - PublishingRESTSupportTransaction* _tmp0_; - guint _tmp1_; - PublishingRESTSupportTransaction* _tmp2_; - guint _tmp3_; - gboolean _tmp4_; - SpitPublishingPluginHost* _tmp5_; - GError* _tmp6_; -#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = txn; -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = txn; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp4_) { -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2338 "TumblrPublishing.c" - } -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:294: EVENT: OAuth authentication request transac" \ -"tion caused a network error"); -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = self->priv->host; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = err; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); -#line 2348 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_auth_request (PublishingTumblrTumblrPublisher* self, const gchar* response) { - const gchar* _tmp0_; - gchar* oauth_token = NULL; - gchar* oauth_token_secret = NULL; - gchar** key_value_pairs = NULL; - const gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint key_value_pairs_length1; - gint _key_value_pairs_size_; - gchar** _tmp4_; - gint _tmp4__length1; - gboolean _tmp24_ = FALSE; - const gchar* _tmp25_; - PublishingTumblrTumblrPublisherSession* _tmp31_; - const gchar* _tmp32_; - const gchar* _tmp33_; -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (response != NULL); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = response; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:300: ACTION: parsing authorization request respo" \ -"nse '%s' into token and secret", _tmp0_); -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - oauth_token = NULL; -#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - oauth_token_secret = NULL; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = response; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "&", 0); -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - key_value_pairs = _tmp3_; -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - key_value_pairs_length1 = _vala_array_length (_tmp2_); -#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _key_value_pairs_size_ = key_value_pairs_length1; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = key_value_pairs; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4__length1 = key_value_pairs_length1; -#line 2395 "TumblrPublishing.c" - { - gchar** pair_collection = NULL; - gint pair_collection_length1 = 0; - gint _pair_collection_size_ = 0; - gint pair_it = 0; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - pair_collection = _tmp4_; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - pair_collection_length1 = _tmp4__length1; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (pair_it = 0; pair_it < _tmp4__length1; pair_it = pair_it + 1) { -#line 2407 "TumblrPublishing.c" - gchar* _tmp5_; - gchar* pair = NULL; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = g_strdup (pair_collection[pair_it]); -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - pair = _tmp5_; -#line 2414 "TumblrPublishing.c" - { - gchar** split_pair = NULL; - const gchar* _tmp6_; - gchar** _tmp7_; - gchar** _tmp8_; - gint split_pair_length1; - gint _split_pair_size_; - gchar** _tmp9_; - gint _tmp9__length1; - gchar** _tmp14_; - gint _tmp14__length1; - const gchar* _tmp15_; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = pair; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = _tmp7_ = g_strsplit (_tmp6_, "=", 0); -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - split_pair = _tmp8_; -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - split_pair_length1 = _vala_array_length (_tmp7_); -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _split_pair_size_ = split_pair_length1; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = split_pair; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9__length1 = split_pair_length1; -#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp9__length1 != 2) { -#line 2443 "TumblrPublishing.c" - SpitPublishingPluginHost* _tmp10_; - const gchar* _tmp11_; - GError* _tmp12_; - GError* _tmp13_; -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = self->priv->host; -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = response; -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _ ("“%s” isn’t a valid response to an OAuth authentication request"), _tmp11_); -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = _tmp12_; -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp10_, _tmp13_); -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (_tmp13_); -#line 2460 "TumblrPublishing.c" - } -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = split_pair; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14__length1 = split_pair_length1; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _tmp14_[0]; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (g_strcmp0 (_tmp15_, "oauth_token") == 0) { -#line 2470 "TumblrPublishing.c" - gchar** _tmp16_; - gint _tmp16__length1; - const gchar* _tmp17_; - gchar* _tmp18_; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = split_pair; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16__length1 = split_pair_length1; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = _tmp16_[1]; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = g_strdup (_tmp17_); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (oauth_token); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - oauth_token = _tmp18_; -#line 2487 "TumblrPublishing.c" - } else { - gchar** _tmp19_; - gint _tmp19__length1; - const gchar* _tmp20_; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = split_pair; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19__length1 = split_pair_length1; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = _tmp19_[0]; -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (g_strcmp0 (_tmp20_, "oauth_token_secret") == 0) { -#line 2500 "TumblrPublishing.c" - gchar** _tmp21_; - gint _tmp21__length1; - const gchar* _tmp22_; - gchar* _tmp23_; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = split_pair; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21__length1 = split_pair_length1; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = _tmp21_[1]; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = g_strdup (_tmp22_); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (oauth_token_secret); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - oauth_token_secret = _tmp23_; -#line 2517 "TumblrPublishing.c" - } - } -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - split_pair = (_vala_array_free (split_pair, split_pair_length1, (GDestroyNotify) g_free), NULL); -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (pair); -#line 2524 "TumblrPublishing.c" - } - } - } -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = oauth_token; -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp25_ == NULL) { -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = TRUE; -#line 2534 "TumblrPublishing.c" - } else { - const gchar* _tmp26_; -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = oauth_token_secret; -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = _tmp26_ == NULL; -#line 2541 "TumblrPublishing.c" - } -#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp24_) { -#line 2545 "TumblrPublishing.c" - SpitPublishingPluginHost* _tmp27_; - const gchar* _tmp28_; - GError* _tmp29_; - GError* _tmp30_; -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = self->priv->host; -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = response; -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _ ("“%s” isn’t a valid response to an OAuth authentication request"), _tmp28_); -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = _tmp29_; -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp27_, _tmp30_); -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (_tmp30_); -#line 2562 "TumblrPublishing.c" - } -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = self->priv->session; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = oauth_token; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = oauth_token_secret; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_set_access_phase_credentials (_tmp31_, _tmp32_, _tmp33_); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - key_value_pairs = (_vala_array_free (key_value_pairs, key_value_pairs_length1, (GDestroyNotify) g_free), NULL); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (oauth_token_secret); -#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (oauth_token); -#line 2578 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_session_authenticated (PublishingTumblrTumblrPublisher* self) { - gboolean _tmp0_; - PublishingTumblrTumblrPublisherSession* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - PublishingTumblrTumblrPublisherSession* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp0_) { -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2598 "TumblrPublishing.c" - } -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:332: EVENT: a fully authenticated session has be" \ -"come available"); -#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->session; -#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token (_tmp1_); -#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token (self, _tmp3_); -#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp3_); -#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->session; -#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token_secret (_tmp4_); -#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _tmp5_; -#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_access_phase_token_secret (self, _tmp6_); -#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp6_); -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_get_blogs (self); -#line 2624 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_info_request_txn_completed ((PublishingTumblrTumblrPublisher*) self, _sender); -#line 2631 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_info_request_txn_error ((PublishingTumblrTumblrPublisher*) self, _sender, err); -#line 2638 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_get_blogs (PublishingTumblrTumblrPublisher* self) { - PublishingTumblrTumblrPublisherUserInfoFetchTransaction* txn = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - PublishingTumblrTumblrPublisherUserInfoFetchTransaction* _tmp1_; - GError * _inner_error_ = NULL; -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:340: ACTION: obtain all blogs of the tumblr user"); -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->session; -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (_tmp0_); -#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - txn = _tmp1_; -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 343 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 2661 "TumblrPublishing.c" - { -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2669 "TumblrPublishing.c" - goto __catch33_spit_publishing_publishing_error; - } -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2680 "TumblrPublishing.c" - } - } - goto __finally33; - __catch33_spit_publishing_publishing_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp2_; - GError* _tmp3_; -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - err = _inner_error_; -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->host; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = err; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp2_, _tmp3_); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (err); -#line 2701 "TumblrPublishing.c" - } - __finally33: -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2714 "TumblrPublishing.c" - } -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 2718 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_info_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn) { - PublishingRESTSupportTransaction* _tmp0_; - guint _tmp1_; - PublishingRESTSupportTransaction* _tmp2_; - guint _tmp3_; - gboolean _tmp4_; - PublishingRESTSupportTransaction* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - PublishingRESTSupportTransaction* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = txn; -#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = txn; -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp4_) { -#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 2756 "TumblrPublishing.c" - } -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = txn; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = _tmp6_; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:362: EVENT: user info request transaction comple" \ -"ted; response = '%s'", _tmp7_); -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp7_); -#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = txn; -#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = publishing_rest_support_transaction_get_response (_tmp8_); -#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = _tmp9_; -#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (self, _tmp10_); -#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp10_); -#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (self); -#line 2780 "TumblrPublishing.c" -} - - -static gpointer _json_object_ref0 (gpointer self) { -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? json_object_ref (self) : NULL; -#line 2787 "TumblrPublishing.c" -} - - -static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { - gchar* result = NULL; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - GError * _inner_error_ = NULL; -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (old != NULL, NULL); -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (replacement != NULL, NULL); -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if ((*((gchar*) self)) == '\0') { -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 2806 "TumblrPublishing.c" - } else { - const gchar* _tmp2_; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = old; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = (*((gchar*) _tmp2_)) == '\0'; -#line 2813 "TumblrPublishing.c" - } -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = TRUE; -#line 2819 "TumblrPublishing.c" - } else { - const gchar* _tmp3_; - const gchar* _tmp4_; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = old; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = replacement; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0; -#line 2829 "TumblrPublishing.c" - } -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 2833 "TumblrPublishing.c" - gchar* _tmp5_; -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = g_strdup (self); -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp5_; -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 2841 "TumblrPublishing.c" - } - { - GRegex* regex = NULL; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - GRegex* _tmp9_; - GRegex* _tmp10_; - gchar* _tmp11_ = NULL; - GRegex* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = old; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = g_regex_escape_string (_tmp6_, -1); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = _tmp9_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_free0 (_tmp8_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - regex = _tmp10_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 2873 "TumblrPublishing.c" - goto __catch35_g_regex_error; - } -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return NULL; -#line 2882 "TumblrPublishing.c" - } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = regex; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = replacement; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp14_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 2898 "TumblrPublishing.c" - goto __catch35_g_regex_error; - } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return NULL; -#line 2909 "TumblrPublishing.c" - } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = _tmp11_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = NULL; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp15_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_free0 (_tmp11_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 2923 "TumblrPublishing.c" - } - goto __finally35; - __catch35_g_regex_error: - { - GError* e = NULL; -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - e = _inner_error_; -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _inner_error_ = NULL; -#line 1415 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_assert_not_reached (); -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_error_free0 (e); -#line 2937 "TumblrPublishing.c" - } - __finally35: -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return NULL; -#line 2948 "TumblrPublishing.c" - } -} - - -static void _vala_array_add21 (PublishingTumblrBlogEntry** * array, int* length, int* size, PublishingTumblrBlogEntry* value) { -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingTumblrBlogEntry*, *array, (*size) + 1); -#line 2960 "TumblrPublishing.c" - } -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 2966 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (PublishingTumblrTumblrPublisher* self, const gchar* response) { - const gchar* _tmp0_; - GError * _inner_error_ = NULL; -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (response != NULL); -#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = response; -#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:370: ACTION: parsing info request response '%s' " \ -"into list of available blogs", _tmp0_); -#line 2981 "TumblrPublishing.c" - { - JsonParser* parser = NULL; - JsonParser* _tmp1_; - const gchar* _tmp2_; - JsonObject* root_object = NULL; - JsonNode* _tmp3_; - JsonObject* _tmp4_; - JsonObject* _tmp5_; - JsonObject* _tmp6_; - JsonObject* _tmp7_; - JsonObject* _tmp8_; - const gchar* _tmp9_; - gchar* _tmp10_; - const gchar* _tmp11_; - JsonObject* _tmp12_; - JsonObject* _tmp13_; - JsonObject* _tmp14_; - JsonArray* _tmp15_; - GList* _tmp16_; -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = json_parser_new (); -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - parser = _tmp1_; -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = response; -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - json_parser_load_from_data (parser, _tmp2_, (gssize) -1, &_inner_error_); -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (parser); -#line 3013 "TumblrPublishing.c" - goto __catch34_g_error; - } -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = json_parser_get_root (parser); -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = json_node_get_object (_tmp3_); -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _json_object_ref0 (_tmp4_); -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - root_object = _tmp5_; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = root_object; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = json_object_get_object_member (_tmp6_, "response"); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = json_object_get_object_member (_tmp7_, "user"); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = json_object_get_string_member (_tmp8_, "name"); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = g_strdup (_tmp9_); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->username); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->username = _tmp10_; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = self->priv->username; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:376: Got user name: %s", _tmp11_); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = root_object; -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = json_object_get_object_member (_tmp12_, "response"); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = json_object_get_object_member (_tmp13_, "user"); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = json_object_get_array_member (_tmp14_, "blogs"); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = json_array_get_elements (_tmp15_); -#line 3052 "TumblrPublishing.c" - { - GList* blognode_collection = NULL; - GList* blognode_it = NULL; -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - blognode_collection = _tmp16_; -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (blognode_it = blognode_collection; blognode_it != NULL; blognode_it = blognode_it->next) { -#line 3060 "TumblrPublishing.c" - JsonNode* blognode = NULL; -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - blognode = (JsonNode*) blognode_it->data; -#line 3064 "TumblrPublishing.c" - { - JsonObject* blog = NULL; - JsonNode* _tmp17_; - JsonObject* _tmp18_; - JsonObject* _tmp19_; - gchar* name = NULL; - JsonObject* _tmp20_; - const gchar* _tmp21_; - gchar* _tmp22_; - gchar* url = NULL; - JsonObject* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - const gchar* _tmp30_; - PublishingTumblrBlogEntry** _tmp31_; - gint _tmp31__length1; - const gchar* _tmp32_; - const gchar* _tmp33_; - PublishingTumblrBlogEntry* _tmp34_; -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = blognode; -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = json_node_get_object (_tmp17_); -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = _json_object_ref0 (_tmp18_); -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - blog = _tmp19_; -#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = blog; -#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = json_object_get_string_member (_tmp20_, "name"); -#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = g_strdup (_tmp21_); -#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - name = _tmp22_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = blog; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = json_object_get_string_member (_tmp23_, "url"); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = string_replace (_tmp24_, "http://", ""); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = _tmp25_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = string_replace (_tmp26_, "/", ""); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = _tmp27_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp26_); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - url = _tmp28_; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = name; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = url; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:381: Got blog name: %s and url: %s", _tmp29_, _tmp30_); -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = self->priv->blogs; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31__length1 = self->priv->blogs_length1; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = name; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = url; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = publishing_tumblr_blog_entry_new (_tmp32_, _tmp33_); -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add21 (&self->priv->blogs, &self->priv->blogs_length1, &self->priv->_blogs_size_, _tmp34_); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (url); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (name); -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _json_object_unref0 (blog); -#line 3144 "TumblrPublishing.c" - } - } -#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_list_free0 (blognode_collection); -#line 3149 "TumblrPublishing.c" - } -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _json_object_unref0 (root_object); -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (parser); -#line 3155 "TumblrPublishing.c" - } - goto __finally34; - __catch34_g_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp35_; - GError* _tmp36_; -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - err = _inner_error_; -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 385 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp35_ = self->priv->host; -#line 385 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp36_ = err; -#line 385 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp35_, _tmp36_); -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (err); -#line 3175 "TumblrPublishing.c" - } - __finally34: -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3186 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_tumblr_publisher_on_info_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { - PublishingRESTSupportTransaction* _tmp0_; - guint _tmp1_; - PublishingRESTSupportTransaction* _tmp2_; - guint _tmp3_; - gboolean _tmp4_; - PublishingTumblrTumblrPublisherSession* _tmp5_; - SpitPublishingPluginHost* _tmp6_; - GError* _tmp7_; -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 391 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = txn; -#line 391 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 391 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self); -#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = txn; -#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self); -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp4_) { -#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3222 "TumblrPublishing.c" - } -#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = self->priv->session; -#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_deauthenticate (_tmp5_); -#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_invalidate_persistent_session (self); -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:399: EVENT: user info request transaction caused" \ -" a network error"); -#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->host; -#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = err; -#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_); -#line 3238 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { -#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish ((PublishingTumblrTumblrPublisher*) self); -#line 3245 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout ((PublishingTumblrTumblrPublisher*) self); -#line 3252 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (PublishingTumblrTumblrPublisher* self) { - SpitPublishingPluginHost* _tmp0_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_options_pane = NULL; - SpitPublishingPluginHost* _tmp1_; - SpitPublishingPublisherMediaType _tmp2_; - PublishingTumblrSizeEntry** _tmp3_; - gint _tmp3__length1; - PublishingTumblrBlogEntry** _tmp4_; - gint _tmp4__length1; - const gchar* _tmp5_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp6_; - SpitPublishingPluginHost* _tmp7_; -#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:404: ACTION: displaying publishing options pane"); -#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->host; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = spit_publishing_plugin_host_get_publishable_media_type (_tmp1_); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->sizes; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3__length1 = self->priv->sizes_length1; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->blogs; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4__length1 = self->priv->blogs_length1; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = self->priv->username; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = publishing_tumblr_tumblr_publisher_publishing_options_pane_new (self, _tmp2_, _tmp3_, _tmp3__length1, _tmp4_, _tmp4__length1, _tmp5_); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_options_pane = _tmp6_; -#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (publishing_options_pane, "publish", (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self, 0); -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (publishing_options_pane, "logout", (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self, 0); -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->host; -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (publishing_options_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (publishing_options_pane); -#line 3304 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish (PublishingTumblrTumblrPublisher* self) { - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; - gboolean _tmp5_; -#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->publishing_options_pane; -#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_ != NULL) { -#line 3317 "TumblrPublishing.c" - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp1_; - guint _tmp2_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp3_; - guint _tmp4_; -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->publishing_options_pane; -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp2_, NULL, FALSE); -#line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->publishing_options_pane; -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp4_, NULL, FALSE); -#line 418 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); -#line 3334 "TumblrPublishing.c" - } -#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp5_) { -#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3342 "TumblrPublishing.c" - } -#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:424: EVENT: user clicked the 'Publish' button in" \ -" the publishing options pane"); -#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_publish (self); -#line 3348 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout (PublishingTumblrTumblrPublisher* self) { - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; - gboolean _tmp5_; -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->publishing_options_pane; -#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_ != NULL) { -#line 3361 "TumblrPublishing.c" - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp1_; - guint _tmp2_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp3_; - guint _tmp4_; -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->publishing_options_pane; -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp2_, NULL, FALSE); -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); -#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->publishing_options_pane; -#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp4_, NULL, FALSE); -#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); -#line 3378 "TumblrPublishing.c" - } -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp5_) { -#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3386 "TumblrPublishing.c" - } -#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:437: EVENT: user clicked the 'Logout' button in " \ -"the publishing options pane"); -#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_logout (self); -#line 3392 "TumblrPublishing.c" -} - - -gint publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b) { - gint result = 0; - SpitPublishingPublishable* _tmp0_; - GDateTime* _tmp1_; - GDateTime* _tmp2_; - SpitPublishingPublishable* _tmp3_; - GDateTime* _tmp4_; - GDateTime* _tmp5_; - gint _tmp6_; - gint _tmp7_; -#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (a), 0); -#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (b), 0); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = a; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = spit_publishing_publishable_get_exposure_date_time (_tmp0_); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp1_; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = b; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = spit_publishing_publishable_get_exposure_date_time (_tmp3_); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = g_date_time_compare (_tmp2_, _tmp5_); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = _tmp6_; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_date_time_unref0 (_tmp5_); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_date_time_unref0 (_tmp2_); -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp7_; -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 3434 "TumblrPublishing.c" -} - - -static gint _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { - gint result; - result = publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func ((SpitPublishingPublishable*) a, (SpitPublishingPublishable*) b); -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 3443 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_upload_complete ((PublishingTumblrTumblrPublisher*) self, _sender, num_photos_published); -#line 3450 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_upload_error ((PublishingTumblrTumblrPublisher*) self, _sender, err); -#line 3457 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_on_upload_status_updated ((PublishingTumblrTumblrPublisher*) self, file_number, fraction_complete); -#line 3464 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_publish (PublishingTumblrTumblrPublisher* self) { - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingTumblrSizeEntry** _tmp2_; - gint _tmp2__length1; - gint _tmp3_; - PublishingTumblrSizeEntry* _tmp4_; - gint _tmp5_; - void* _tmp6_; - GDestroyNotify _tmp7_; - SpitPublishingProgressCallback _tmp8_; - gboolean _tmp9_; - SpitPublishingPublishable** publishables = NULL; - SpitPublishingPluginHost* _tmp10_; - gint _tmp11_; - SpitPublishingPublishable** _tmp12_; - gint publishables_length1; - gint _publishables_size_; - GeeArrayList* sorted_list = NULL; - GeeArrayList* _tmp13_; - SpitPublishingPublishable** _tmp14_; - gint _tmp14__length1; - GeeArrayList* _tmp18_; - gchar* blog_url = NULL; - PublishingTumblrBlogEntry** _tmp19_; - gint _tmp19__length1; - gint _tmp20_; - PublishingTumblrBlogEntry* _tmp21_; - const gchar* _tmp22_; - gchar* _tmp23_; - PublishingTumblrTumblrPublisherUploader* uploader = NULL; - PublishingTumblrTumblrPublisherSession* _tmp24_; - GeeArrayList* _tmp25_; - gint _tmp26_; - gpointer* _tmp27_; - SpitPublishingPublishable** _tmp28_; - gint _tmp28__length1; - const gchar* _tmp29_; - PublishingTumblrTumblrPublisherUploader* _tmp30_; - PublishingTumblrTumblrPublisherUploader* _tmp31_; - PublishingTumblrTumblrPublisherUploader* _tmp32_; - PublishingTumblrTumblrPublisherUploader* _tmp33_; - PublishingTumblrTumblrPublisherUploader* _tmp34_; -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:448: ACTION: uploading media items to remote ser" \ -"ver."); -#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->host; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->sizes; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2__length1 = self->priv->sizes_length1; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = publishing_tumblr_tumblr_publisher_get_persistent_default_size (self); -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = _tmp2_[_tmp3_]; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_->size; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = spit_publishing_plugin_host_serialize_publishables (_tmp1_, _tmp5_, FALSE, &_tmp6_, &_tmp7_); -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter = NULL; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target = NULL; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target_destroy_notify = NULL; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter = _tmp8_; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target = _tmp6_; -#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target_destroy_notify = _tmp7_; -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp9_) { -#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3553 "TumblrPublishing.c" - } -#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = self->priv->host; -#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = spit_publishing_plugin_host_get_publishables (_tmp10_, &_tmp11_); -#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishables = _tmp12_; -#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishables_length1 = _tmp11_; -#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishables_size_ = publishables_length1; -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = gee_array_list_new (SPIT_PUBLISHING_TYPE_PUBLISHABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - sorted_list = _tmp13_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = publishables; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14__length1 = publishables_length1; -#line 3573 "TumblrPublishing.c" - { - SpitPublishingPublishable** p_collection = NULL; - gint p_collection_length1 = 0; - gint _p_collection_size_ = 0; - gint p_it = 0; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - p_collection = _tmp14_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - p_collection_length1 = _tmp14__length1; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (p_it = 0; p_it < _tmp14__length1; p_it = p_it + 1) { -#line 3585 "TumblrPublishing.c" - SpitPublishingPublishable* _tmp15_; - SpitPublishingPublishable* p = NULL; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _g_object_ref0 (p_collection[p_it]); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - p = _tmp15_; -#line 3592 "TumblrPublishing.c" - { - GeeArrayList* _tmp16_; - SpitPublishingPublishable* _tmp17_; -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:466: ACTION: add publishable"); -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = sorted_list; -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = p; -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (p); -#line 3606 "TumblrPublishing.c" - } - } - } -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = sorted_list; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gee_list_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_LIST, GeeList), _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func, NULL, NULL); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = self->priv->blogs; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19__length1 = self->priv->blogs_length1; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = publishing_tumblr_tumblr_publisher_get_persistent_default_blog (self); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = _tmp19_[_tmp20_]; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = _tmp21_->url; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = g_strdup (_tmp22_); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - blog_url = _tmp23_; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = self->priv->session; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = sorted_list; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp26_); -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = _tmp27_; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28__length1 = _tmp26_; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = blog_url; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = publishing_tumblr_tumblr_publisher_uploader_new (_tmp24_, _tmp28_, _tmp26_, _tmp29_); -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = _tmp30_; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = (_vala_array_free (_tmp28_, _tmp28__length1, (GDestroyNotify) g_object_unref), NULL); -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - uploader = _tmp31_; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = uploader; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = uploader; -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = uploader; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_batch_uploader_unref0 (uploader); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (blog_url); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (sorted_list); -#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); -#line 3668 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_show_success_pane (PublishingTumblrTumblrPublisher* self) { - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; -#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:479: ACTION: showing success pane."); -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->host; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->host; -#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_install_success_pane (_tmp1_); -#line 3687 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_upload_status_updated (PublishingTumblrTumblrPublisher* self, gint file_number, gdouble completed_fraction) { - gboolean _tmp0_; - gdouble _tmp1_; - SpitPublishingProgressCallback _tmp2_; - void* _tmp2__target; - SpitPublishingProgressCallback _tmp3_; - void* _tmp3__target; - gint _tmp4_; - gdouble _tmp5_; -#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp0_) { -#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3708 "TumblrPublishing.c" - } -#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = completed_fraction; -#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:490: EVENT: uploader reports upload %.2f percent" \ -" complete.", 100.0 * _tmp1_); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->progress_reporter; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2__target = self->priv->progress_reporter_target; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->progress_reporter; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3__target = self->priv->progress_reporter_target; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = file_number; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = completed_fraction; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); -#line 3730 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_upload_complete (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { - gboolean _tmp0_; - gint _tmp1_; - PublishingRESTSupportBatchUploader* _tmp2_; - guint _tmp3_; - PublishingRESTSupportBatchUploader* _tmp4_; - guint _tmp5_; -#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); -#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp0_) { -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3751 "TumblrPublishing.c" - } -#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = num_published; -#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:502: EVENT: uploader reports upload complete; %d" \ -" items published.", _tmp1_); -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = uploader; -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); -#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); -#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = uploader; -#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp5_, NULL, FALSE); -#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); -#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_show_success_pane (self); -#line 3771 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_on_upload_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { - gboolean _tmp0_; - GError* _tmp1_; - const gchar* _tmp2_; - PublishingRESTSupportBatchUploader* _tmp3_; - guint _tmp4_; - PublishingRESTSupportBatchUploader* _tmp5_; - guint _tmp6_; - SpitPublishingPluginHost* _tmp7_; - GError* _tmp8_; -#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); -#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp0_) { -#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3795 "TumblrPublishing.c" - } -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = err; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp1_->message; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:515: EVENT: uploader reports upload error = '%s'" \ -".", _tmp2_); -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = uploader; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp4_, NULL, FALSE); -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = uploader; -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp6_, NULL, FALSE); -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->host; -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = err; -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); -#line 3821 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_do_logout (PublishingTumblrTumblrPublisher* self) { - PublishingTumblrTumblrPublisherSession* _tmp0_; -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:525: ACTION: logging user out, deauthenticating " \ -"session, and erasing stored credentials"); -#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->session; -#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_deauthenticate (_tmp0_); -#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_invalidate_persistent_session (self); -#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->running = FALSE; -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_attempt_start (self); -#line 3841 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_attempt_start (PublishingTumblrTumblrPublisher* self) { - gboolean _tmp0_; - gboolean _tmp1_; -#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_) { -#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3856 "TumblrPublishing.c" - } -#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:539: TumblrPublisher: starting interaction."); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->running = TRUE; -#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_tumblr_tumblr_publisher_is_persistent_session_valid (self); -#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp1_) { -#line 3866 "TumblrPublishing.c" - PublishingTumblrTumblrPublisherSession* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:543: attempt start: a persistent session is avai" \ -"lable; using it"); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->session; -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token (self); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = _tmp3_; -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_get_persistent_access_phase_token_secret (self); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _tmp5_; -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_authenticate_from_persistent_credentials (_tmp2_, _tmp4_, _tmp6_); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp6_); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp4_); -#line 3890 "TumblrPublishing.c" - } else { -#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:548: attempt start: no persistent session availa" \ -"ble; showing login welcome pane"); -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_show_authentication_pane (self, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_INTRO); -#line 3896 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_tumblr_publisher_real_start (SpitPublishingPublisher* base) { - PublishingTumblrTumblrPublisher * self; - gboolean _tmp0_; - gboolean _tmp1_; -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_) { -#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 3913 "TumblrPublishing.c" - } -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->was_started; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp1_) { -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_error ("TumblrPublishing.vala:559: %s", _ ("TumblrPublisher: start( ): can’t start; this publisher is not restarta" \ -"ble.")); -#line 3921 "TumblrPublishing.c" - } -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:561: TumblrPublisher: starting interaction."); -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_attempt_start (self); -#line 3927 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_real_stop (SpitPublishingPublisher* base) { - PublishingTumblrTumblrPublisher * self; -#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); -#line 567 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:567: TumblrPublisher: stop( ) invoked."); -#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->running = FALSE; -#line 3939 "TumblrPublishing.c" -} - - -GType publishing_tumblr_tumblr_publisher_authentication_pane_mode_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id__volatile)) { - static const GEnumValue values[] = {{PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_INTRO, "PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_INTRO", "intro"}, {PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER, "PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER", "failed-retry-user"}, {0, NULL, NULL}}; - GType publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id; - publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id = g_enum_register_static ("PublishingTumblrTumblrPublisherAuthenticationPaneMode", values); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id__volatile, publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id); - } - return publishing_tumblr_tumblr_publisher_authentication_pane_mode_type_id__volatile; -} - - -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { -#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed ((PublishingTumblrTumblrPublisherAuthenticationPane*) self); -#line 3958 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { -#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed ((PublishingTumblrTumblrPublisherAuthenticationPane*) self); -#line 3965 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked ((PublishingTumblrTumblrPublisherAuthenticationPane*) self); -#line 3972 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherAuthenticationPane* publishing_tumblr_tumblr_publisher_authentication_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode) { - PublishingTumblrTumblrPublisherAuthenticationPane * self = NULL; - GtkBox* _tmp0_; - GError * _inner_error_ = NULL; -#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (publisher), NULL); -#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherAuthenticationPane*) g_object_new (object_type, NULL); -#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_object_ref_sink (_tmp0_); -#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->pane_widget = _tmp0_; -#line 3992 "TumblrPublishing.c" - { - GtkBuilder* _tmp1_; - GtkBuilder* _tmp2_; - GtkBuilder* _tmp3_; - GtkWidget* content = NULL; - GtkBuilder* _tmp4_; - GObject* _tmp5_; - GtkWidget* _tmp6_; - GtkLabel* message_label = NULL; - GtkBuilder* _tmp7_; - GObject* _tmp8_; - GtkLabel* _tmp9_; - PublishingTumblrTumblrPublisherAuthenticationPaneMode _tmp10_; - GtkBuilder* _tmp17_; - GObject* _tmp18_; - GtkEntry* _tmp19_; - GtkBuilder* _tmp20_; - GObject* _tmp21_; - GtkEntry* _tmp22_; - GtkBuilder* _tmp23_; - GObject* _tmp24_; - GtkButton* _tmp25_; - GtkEntry* _tmp26_; - GtkEntry* _tmp27_; - GtkButton* _tmp28_; - GtkWidget* _tmp29_; - GtkContainer* _tmp30_; - GtkContainer* _tmp31_; - GtkWidget* _tmp32_; - GtkBox* _tmp33_; - GtkWidget* _tmp34_; - PublishingTumblrTumblrPublisher* _tmp35_; - SpitPublishingPluginHost* _tmp36_; - SpitPublishingPluginHost* _tmp37_; - GtkButton* _tmp38_; -#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = gtk_builder_new (); -#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->builder); -#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->builder = _tmp1_; -#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->builder; -#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/tumblr_authentication_pane.ui", &_inner_error_); -#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4040 "TumblrPublishing.c" - goto __catch36_g_error; - } -#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->builder; -#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_builder_connect_signals (_tmp3_, NULL); -#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->builder; -#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = gtk_builder_get_object (_tmp4_, "content"); -#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp5_) : NULL); -#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - content = _tmp6_; -#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->builder; -#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = gtk_builder_get_object (_tmp7_, "message_label"); -#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); -#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - message_label = _tmp9_; -#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = mode; -#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - switch (_tmp10_) { -#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - case PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_INTRO: -#line 4069 "TumblrPublishing.c" - { - GtkLabel* _tmp11_; - const gchar* _tmp12_; -#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = message_label; -#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = publishing_tumblr_tumblr_publisher_authentication_pane_INTRO_MESSAGE; -#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_label_set_text (_tmp11_, _tmp12_); -#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 4081 "TumblrPublishing.c" - } -#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - case PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER: -#line 4085 "TumblrPublishing.c" - { - GtkLabel* _tmp13_; - const gchar* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = message_label; -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = publishing_tumblr_tumblr_publisher_authentication_pane_FAILED_RETRY_USER_MESSAGE; -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = g_strdup_printf ("<b>%s</b>\n\n%s", _ ("Invalid User Name or Password"), _tmp14_); -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = _tmp15_; -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_label_set_markup (_tmp13_, _tmp16_); -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp16_); -#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 4105 "TumblrPublishing.c" - } - default: -#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 4110 "TumblrPublishing.c" - } -#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = self->priv->builder; -#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = gtk_builder_get_object (_tmp17_, "username_entry"); -#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp18_) : NULL); -#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->username_entry); -#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->username_entry = _tmp19_; -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = self->priv->builder; -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = gtk_builder_get_object (_tmp20_, "password_entry"); -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp21_) : NULL); -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->password_entry); -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->password_entry = _tmp22_; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = self->priv->builder; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = gtk_builder_get_object (_tmp23_, "login_button"); -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_button_get_type ()) ? ((GtkButton*) _tmp24_) : NULL); -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->login_button); -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->login_button = _tmp25_; -#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = self->priv->username_entry; -#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed_gtk_editable_changed, self, 0); -#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = self->priv->password_entry; -#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed_gtk_editable_changed, self, 0); -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = self->priv->login_button; -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (_tmp28_, "clicked", (GCallback) _publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked_gtk_button_clicked, self, 0); -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = content; -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = gtk_widget_get_parent (_tmp29_); -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = _tmp30_; -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = content; -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_container_remove (_tmp31_, _tmp32_); -#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = self->priv->pane_widget; -#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = content; -#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_container_get_type (), GtkContainer), _tmp34_); -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp35_ = publisher; -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp36_ = publishing_tumblr_tumblr_publisher_get_host (_tmp35_); -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp37_ = _tmp36_; -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp38_ = self->priv->login_button; -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - spit_publishing_plugin_host_set_dialog_default_widget (_tmp37_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget)); -#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (_tmp37_); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (message_label); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (content); -#line 4186 "TumblrPublishing.c" - } - goto __finally36; - __catch36_g_error: - { - GError* e = NULL; - GError* _tmp39_; - const gchar* _tmp40_; -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e = _inner_error_; -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp39_ = e; -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp40_ = _tmp39_->message; -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_warning (_ ("Could not load UI: %s"), _tmp40_); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (e); -#line 4206 "TumblrPublishing.c" - } - __finally36: -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 4217 "TumblrPublishing.c" - } -#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 4221 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherAuthenticationPane* publishing_tumblr_tumblr_publisher_authentication_pane_new (PublishingTumblrTumblrPublisher* publisher, PublishingTumblrTumblrPublisherAuthenticationPaneMode mode) { -#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_authentication_pane_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, publisher, mode); -#line 4228 "TumblrPublishing.c" -} - - -GtkWidget* publishing_tumblr_tumblr_publisher_authentication_pane_get_default_widget (PublishingTumblrTumblrPublisherAuthenticationPane* self) { - GtkWidget* result = NULL; - GtkButton* _tmp0_; - GtkWidget* _tmp1_; -#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE (self), NULL); -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->login_button; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 4246 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_login_button_clicked (PublishingTumblrTumblrPublisherAuthenticationPane* self) { - GtkEntry* _tmp0_; - const gchar* _tmp1_; - GtkEntry* _tmp2_; - const gchar* _tmp3_; -#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE (self)); -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->username_entry; -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = gtk_entry_get_text (_tmp0_); -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->password_entry; -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = gtk_entry_get_text (_tmp2_); -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit (self, publishing_tumblr_tumblr_publisher_authentication_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_LOGIN_SIGNAL], 0, _tmp1_, _tmp3_); -#line 4267 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_user_changed (PublishingTumblrTumblrPublisherAuthenticationPane* self) { -#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE (self)); -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_update_login_button_sensitivity (self); -#line 4276 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_on_password_changed (PublishingTumblrTumblrPublisherAuthenticationPane* self) { -#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE (self)); -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_update_login_button_sensitivity (self); -#line 4285 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_update_login_button_sensitivity (PublishingTumblrTumblrPublisherAuthenticationPane* self) { - gboolean _tmp0_ = FALSE; - GtkEntry* _tmp1_; - guint _tmp2_; - guint _tmp3_; - GtkButton* _tmp7_; -#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_AUTHENTICATION_PANE (self)); -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->username_entry; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = gtk_entry_get_text_length (_tmp1_); -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp3_ > ((guint) 0)) { -#line 4305 "TumblrPublishing.c" - GtkEntry* _tmp4_; - guint _tmp5_; - guint _tmp6_; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->password_entry; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = gtk_entry_get_text_length (_tmp4_); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _tmp5_; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _tmp6_ > ((guint) 0); -#line 4317 "TumblrPublishing.c" - } else { -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = FALSE; -#line 4321 "TumblrPublishing.c" - } -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->login_button; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), _tmp0_); -#line 4327 "TumblrPublishing.c" -} - - -static GtkWidget* publishing_tumblr_tumblr_publisher_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherAuthenticationPane * self; - GtkWidget* result = NULL; - GtkBox* _tmp0_; - GtkWidget* _tmp1_; -#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane); -#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->pane_widget; -#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 4346 "TumblrPublishing.c" -} - - -static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherAuthenticationPane * self; - SpitPublishingDialogPaneGeometryOptions result = 0; -#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane); -#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; -#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 4359 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherAuthenticationPane * self; - GtkEntry* _tmp0_; - GtkEntry* _tmp1_; - GtkButton* _tmp2_; -#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane); -#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->username_entry; -#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->password_entry; -#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_entry_set_activates_default (_tmp1_, TRUE); -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->login_button; -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE); -#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_update_login_button_sensitivity (self); -#line 4384 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherAuthenticationPane * self; -#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane); -#line 4392 "TumblrPublishing.c" -} - - -static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2); - register GMarshalFunc_VOID__STRING_STRING callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (n_param_values == 3); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - data1 = closure->data; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - data2 = param_values->data[0].v_pointer; -#line 4411 "TumblrPublishing.c" - } else { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - data1 = param_values->data[0].v_pointer; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - data2 = closure->data; -#line 4417 "TumblrPublishing.c" - } -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2); -#line 4423 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_class_init (PublishingTumblrTumblrPublisherAuthenticationPaneClass * klass) { - gchar* _tmp0_; - gchar* _tmp1_; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_parent_class = g_type_class_peek_parent (klass); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherAuthenticationPanePrivate)); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_tumblr_tumblr_publisher_authentication_pane_finalize; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_LOGIN_SIGNAL] = g_signal_new ("login", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup (_ ("Enter the username and password associated with your Tumblr account.")); -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_INTRO_MESSAGE = _tmp0_; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_ ("Username and/or password invalid. Please try again")); -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_FAILED_RETRY_USER_MESSAGE = _tmp1_; -#line 4446 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_authentication_pane_real_get_widget; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_authentication_pane_real_get_preferred_geometry; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_installed; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_authentication_pane_real_on_pane_uninstalled; -#line 4461 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_instance_init (PublishingTumblrTumblrPublisherAuthenticationPane * self) { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_AUTHENTICATION_PANE_GET_PRIVATE (self); -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->pane_widget = NULL; -#line 4470 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_authentication_pane_finalize (GObject * obj) { - PublishingTumblrTumblrPublisherAuthenticationPane * self; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_AUTHENTICATION_PANE, PublishingTumblrTumblrPublisherAuthenticationPane); -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->builder); -#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->username_entry); -#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->password_entry); -#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->login_button); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (publishing_tumblr_tumblr_publisher_authentication_pane_parent_class)->finalize (obj); -#line 4490 "TumblrPublishing.c" -} - - -/** - * The authentication pane used when asking service URL, user name and password - * from the user. - */ -GType publishing_tumblr_tumblr_publisher_authentication_pane_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_authentication_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_authentication_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherAuthenticationPane), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_authentication_pane_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_tumblr_tumblr_publisher_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_tumblr_tumblr_publisher_authentication_pane_type_id; - publishing_tumblr_tumblr_publisher_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingTumblrTumblrPublisherAuthenticationPane", &g_define_type_info, 0); - g_type_add_interface_static (publishing_tumblr_tumblr_publisher_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_authentication_pane_type_id__volatile, publishing_tumblr_tumblr_publisher_authentication_pane_type_id); - } - return publishing_tumblr_tumblr_publisher_authentication_pane_type_id__volatile; -} - - -static gpointer _publishing_tumblr_size_entry_ref0 (gpointer self) { -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? publishing_tumblr_size_entry_ref (self) : NULL; -#line 4515 "TumblrPublishing.c" -} - - -static PublishingTumblrSizeEntry** _vala_array_dup7 (PublishingTumblrSizeEntry** self, int length) { - PublishingTumblrSizeEntry** result; - int i; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = g_new0 (PublishingTumblrSizeEntry*, length + 1); -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (i = 0; i < length; i++) { -#line 4526 "TumblrPublishing.c" - PublishingTumblrSizeEntry* _tmp0_; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _publishing_tumblr_size_entry_ref0 (self[i]); -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result[i] = _tmp0_; -#line 4532 "TumblrPublishing.c" - } -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 4536 "TumblrPublishing.c" -} - - -static gpointer _publishing_tumblr_blog_entry_ref0 (gpointer self) { -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? publishing_tumblr_blog_entry_ref (self) : NULL; -#line 4543 "TumblrPublishing.c" -} - - -static PublishingTumblrBlogEntry** _vala_array_dup8 (PublishingTumblrBlogEntry** self, int length) { - PublishingTumblrBlogEntry** result; - int i; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = g_new0 (PublishingTumblrBlogEntry*, length + 1); -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (i = 0; i < length; i++) { -#line 4554 "TumblrPublishing.c" - PublishingTumblrBlogEntry* _tmp0_; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _publishing_tumblr_blog_entry_ref0 (self[i]); -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result[i] = _tmp0_; -#line 4560 "TumblrPublishing.c" - } -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 4564 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 4571 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 4578 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 4585 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 4592 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self = NULL; - GtkBox* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; - PublishingTumblrTumblrPublisher* _tmp3_; - PublishingTumblrTumblrPublisher* _tmp4_; - SpitPublishingPublisherMediaType _tmp5_; - PublishingTumblrSizeEntry** _tmp6_; - gint _tmp6__length1; - PublishingTumblrSizeEntry** _tmp7_; - gint _tmp7__length1; - PublishingTumblrBlogEntry** _tmp8_; - gint _tmp8__length1; - PublishingTumblrBlogEntry** _tmp9_; - gint _tmp9__length1; - GError * _inner_error_ = NULL; -#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (publisher), NULL); -#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (username != NULL, NULL); -#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherPublishingOptionsPane*) g_object_new (object_type, NULL); -#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_object_ref_sink (_tmp0_); -#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->pane_widget = _tmp0_; -#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = username; -#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->username); -#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->username = _tmp2_; -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = publisher; -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = _g_object_ref0 (_tmp3_); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->publisher); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->publisher = _tmp4_; -#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = media_type; -#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->media_type = _tmp5_; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = sizes; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6__length1 = sizes_length1; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = (_tmp6_ != NULL) ? _vala_array_dup7 (_tmp6_, _tmp6__length1) : ((gpointer) _tmp6_); -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7__length1 = _tmp6__length1; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = _tmp7_; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes_length1 = _tmp7__length1; -#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = blogs; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8__length1 = blogs_length1; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup8 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9__length1 = _tmp8__length1; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = _tmp9_; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs_length1 = _tmp9__length1; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_blogs_size_ = self->priv->blogs_length1; -#line 4679 "TumblrPublishing.c" - { - GtkBuilder* _tmp10_; - GtkBuilder* _tmp11_; - GtkBuilder* _tmp12_; - GtkBuilder* _tmp13_; - GObject* _tmp14_; - GtkBox* _tmp15_; - GtkBuilder* _tmp16_; - GObject* _tmp17_; - GtkLabel* _tmp18_; - GtkBuilder* _tmp19_; - GObject* _tmp20_; - GtkButton* _tmp21_; - GtkBuilder* _tmp22_; - GObject* _tmp23_; - GtkButton* _tmp24_; - GtkBuilder* _tmp25_; - GObject* _tmp26_; - GtkComboBoxText* _tmp27_; - GtkBuilder* _tmp28_; - GObject* _tmp29_; - GtkLabel* _tmp30_; - GtkBuilder* _tmp31_; - GObject* _tmp32_; - GtkComboBoxText* _tmp33_; - GtkBuilder* _tmp34_; - GObject* _tmp35_; - GtkLabel* _tmp36_; - gchar* upload_label_text = NULL; - const gchar* _tmp37_; - gchar* _tmp38_; - GtkLabel* _tmp39_; - const gchar* _tmp40_; - GtkComboBoxText* _tmp41_; - SpitPublishingPublisherMediaType _tmp42_; - GtkButton* _tmp46_; - GtkButton* _tmp47_; -#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = gtk_builder_new (); -#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->builder); -#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->builder = _tmp10_; -#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = self->priv->builder; -#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_builder_add_from_resource (_tmp11_, PLUGIN_RESOURCE_PATH "/tumblr_publishing_options_pane.ui", &_inner_error_); -#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4729 "TumblrPublishing.c" - goto __catch37_g_error; - } -#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = self->priv->builder; -#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_builder_connect_signals (_tmp12_, NULL); -#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = self->priv->builder; -#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = gtk_builder_get_object (_tmp13_, "tumblr_pane"); -#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_box_get_type (), GtkBox)); -#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->pane_widget = _tmp15_; -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = self->priv->builder; -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = gtk_builder_get_object (_tmp16_, "upload_info_label"); -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_label_get_type (), GtkLabel)); -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->upload_info_label); -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->upload_info_label = _tmp18_; -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = self->priv->builder; -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = gtk_builder_get_object (_tmp19_, "logout_button"); -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_button_get_type (), GtkButton)); -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->logout_button); -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->logout_button = _tmp21_; -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = self->priv->builder; -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = gtk_builder_get_object (_tmp22_, "publish_button"); -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_button_get_type (), GtkButton)); -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->publish_button); -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->publish_button = _tmp24_; -#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = self->priv->builder; -#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = gtk_builder_get_object (_tmp25_, "size_combo"); -#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_text_get_type (), GtkComboBoxText)); -#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->size_combo); -#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->size_combo = _tmp27_; -#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = self->priv->builder; -#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = gtk_builder_get_object (_tmp28_, "size_label"); -#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_label_get_type (), GtkLabel)); -#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->size_label); -#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->size_label = _tmp30_; -#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = self->priv->builder; -#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = gtk_builder_get_object (_tmp31_, "blog_combo"); -#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_combo_box_text_get_type (), GtkComboBoxText)); -#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->blog_combo); -#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_combo = _tmp33_; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = self->priv->builder; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp35_ = gtk_builder_get_object (_tmp34_, "blog_label"); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp36_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_label_get_type (), GtkLabel)); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->blog_label); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_label = _tmp36_; -#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp37_ = self->priv->username; -#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp38_ = g_strdup_printf (_ ("You are logged into Tumblr as %s.\n\n"), _tmp37_); -#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - upload_label_text = _tmp38_; -#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp39_ = self->priv->upload_info_label; -#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp40_ = upload_label_text; -#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_label_set_label (_tmp39_, _tmp40_); -#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (self); -#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp41_ = self->priv->blog_combo; -#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed, self, 0); -#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp42_ = media_type; -#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp42_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { -#line 4838 "TumblrPublishing.c" - GtkComboBoxText* _tmp43_; -#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (self); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp43_ = self->priv->size_combo; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed, self, 0); -#line 4846 "TumblrPublishing.c" - } else { - GtkComboBoxText* _tmp44_; - GtkLabel* _tmp45_; -#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp44_ = self->priv->size_combo; -#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp45_ = self->priv->size_label; -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 4858 "TumblrPublishing.c" - } -#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp46_ = self->priv->logout_button; -#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (_tmp46_, "clicked", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); -#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp47_ = self->priv->publish_button; -#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (_tmp47_, "clicked", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (upload_label_text); -#line 4870 "TumblrPublishing.c" - } - goto __finally37; - __catch37_g_error: - { - GError* e = NULL; - GError* _tmp48_; - const gchar* _tmp49_; -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e = _inner_error_; -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp48_ = e; -#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp49_ = _tmp48_->message; -#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_warning (_ ("Could not load UI: %s"), _tmp49_); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (e); -#line 4890 "TumblrPublishing.c" - } - __finally37: -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return NULL; -#line 4901 "TumblrPublishing.c" - } -#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 4905 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_new (PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username) { -#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, publisher, media_type, sizes, sizes_length1, blogs, blogs_length1, username); -#line 4912 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { -#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); -#line 4921 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { -#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0); -#line 4930 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { - PublishingTumblrBlogEntry** _tmp0_; - gint _tmp0__length1; -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->blogs; -#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0__length1 = self->priv->blogs_length1; -#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_ != NULL) { -#line 4945 "TumblrPublishing.c" - PublishingTumblrBlogEntry** _tmp1_; - gint _tmp1__length1; - GtkComboBoxText* _tmp6_; - PublishingTumblrTumblrPublisher* _tmp7_; - gint _tmp8_; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->blogs; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = self->priv->blogs_length1; -#line 4955 "TumblrPublishing.c" - { - PublishingTumblrBlogEntry** b_collection = NULL; - gint b_collection_length1 = 0; - gint _b_collection_size_ = 0; - gint b_it = 0; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - b_collection = _tmp1_; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - b_collection_length1 = _tmp1__length1; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (b_it = 0; b_it < _tmp1__length1; b_it = b_it + 1) { -#line 4967 "TumblrPublishing.c" - PublishingTumblrBlogEntry* _tmp2_; - PublishingTumblrBlogEntry* b = NULL; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _publishing_tumblr_blog_entry_ref0 (b_collection[b_it]); -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - b = _tmp2_; -#line 4974 "TumblrPublishing.c" - { - GtkComboBoxText* _tmp3_; - PublishingTumblrBlogEntry* _tmp4_; - const gchar* _tmp5_; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->blog_combo; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = b; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_->blog; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_combo_box_text_append_text (_tmp3_, _tmp5_); -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_tumblr_blog_entry_unref0 (b); -#line 4989 "TumblrPublishing.c" - } - } - } -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->blog_combo; -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->publisher; -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = publishing_tumblr_tumblr_publisher_get_persistent_default_blog (_tmp7_); -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), _tmp8_); -#line 5001 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { - PublishingTumblrTumblrPublisher* _tmp0_; - GtkComboBoxText* _tmp1_; - gint _tmp2_; -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->publisher; -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->blog_combo; -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_default_blog (_tmp0_, _tmp2_); -#line 5020 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { - PublishingTumblrSizeEntry** _tmp0_; - gint _tmp0__length1; -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->sizes; -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0__length1 = self->priv->sizes_length1; -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp0_ != NULL) { -#line 5035 "TumblrPublishing.c" - PublishingTumblrSizeEntry** _tmp1_; - gint _tmp1__length1; - GtkComboBoxText* _tmp6_; - PublishingTumblrTumblrPublisher* _tmp7_; - gint _tmp8_; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->sizes; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = self->priv->sizes_length1; -#line 5045 "TumblrPublishing.c" - { - PublishingTumblrSizeEntry** e_collection = NULL; - gint e_collection_length1 = 0; - gint _e_collection_size_ = 0; - gint e_it = 0; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e_collection = _tmp1_; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e_collection_length1 = _tmp1__length1; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (e_it = 0; e_it < _tmp1__length1; e_it = e_it + 1) { -#line 5057 "TumblrPublishing.c" - PublishingTumblrSizeEntry* _tmp2_; - PublishingTumblrSizeEntry* e = NULL; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _publishing_tumblr_size_entry_ref0 (e_collection[e_it]); -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e = _tmp2_; -#line 5064 "TumblrPublishing.c" - { - GtkComboBoxText* _tmp3_; - PublishingTumblrSizeEntry* _tmp4_; - const gchar* _tmp5_; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->size_combo; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = e; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_->title; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_combo_box_text_append_text (_tmp3_, _tmp5_); -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_tumblr_size_entry_unref0 (e); -#line 5079 "TumblrPublishing.c" - } - } - } -#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->size_combo; -#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = self->priv->publisher; -#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = publishing_tumblr_tumblr_publisher_get_persistent_default_size (_tmp7_); -#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), _tmp8_); -#line 5091 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { - PublishingTumblrTumblrPublisher* _tmp0_; - GtkComboBoxText* _tmp1_; - gint _tmp2_; -#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->publisher; -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->size_combo; -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_set_persistent_default_size (_tmp0_, _tmp2_); -#line 5110 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0); -#line 5119 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { -#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); -#line 5128 "TumblrPublishing.c" -} - - -static GtkWidget* publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self; - GtkWidget* result = NULL; - GtkBox* _tmp0_; - GtkWidget* _tmp1_; -#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); -#line 806 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->pane_widget; -#line 806 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 806 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 806 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 5147 "TumblrPublishing.c" -} - - -static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self; - SpitPublishingDialogPaneGeometryOptions result = 0; -#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); -#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; -#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 5160 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { -#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 5167 "TumblrPublishing.c" -} - - -static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { -#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); -#line 5174 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self; -#line 813 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); -#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (self, "publish", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self, 0); -#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_connect_object (self, "logout", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self, 0); -#line 5186 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self; - guint _tmp0_; - guint _tmp1_; -#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); -#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp0_, NULL, FALSE); -#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); -#line 820 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); -#line 820 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); -#line 5204 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_class_init (PublishingTumblrTumblrPublisherPublishingOptionsPaneClass * klass) { -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate)); -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL] = g_signal_new ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL] = g_signal_new ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 5219 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled; -#line 5234 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_instance_init (PublishingTumblrTumblrPublisherPublishingOptionsPane * self) { - gchar* _tmp0_; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); -#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->pane_widget = NULL; -#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->upload_info_label = NULL; -#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->size_label = NULL; -#line 695 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_label = NULL; -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->logout_button = NULL; -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->publish_button = NULL; -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->size_combo = NULL; -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_combo = NULL; -#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = NULL; -#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes_length1 = 0; -#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = NULL; -#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs_length1 = 0; -#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_blogs_size_ = self->priv->blogs_length1; -#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup (""); -#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->username = _tmp0_; -#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->publisher = NULL; -#line 5276 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize (GObject * obj) { - PublishingTumblrTumblrPublisherPublishingOptionsPane * self; -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); -#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->builder); -#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->pane_widget); -#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->upload_info_label); -#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->size_label); -#line 695 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->blog_label); -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->logout_button); -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->publish_button); -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->size_combo); -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->blog_combo); -#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); -#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); -#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->username); -#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->publisher); -#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class)->finalize (obj); -#line 5312 "TumblrPublishing.c" -} - - -/** - * The publishing options pane. - */ -GType publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id; - publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingTumblrTumblrPublisherPublishingOptionsPane", &g_define_type_info, 0); - g_type_add_interface_static (publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile, publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id); - } - return publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile; -} - - -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, PublishingRESTSupportHttpMethod method) { - PublishingTumblrTumblrPublisherTransaction* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; -#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 829 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 829 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = method; -#line 829 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_); -#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 5347 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_new (PublishingTumblrTumblrPublisherSession* session, PublishingRESTSupportHttpMethod method) { -#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, session, method); -#line 5354 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_construct_with_uri (GType object_type, PublishingTumblrTumblrPublisherSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { - PublishingTumblrTumblrPublisherTransaction* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - const gchar* _tmp1_; - PublishingRESTSupportHttpMethod _tmp2_; - PublishingTumblrTumblrPublisherSession* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - PublishingTumblrTumblrPublisherSession* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - PublishingTumblrTumblrPublisherSession* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gboolean _tmp12_; -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (uri != NULL, NULL); -#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = uri; -#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = method; -#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = session; -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = publishing_tumblr_tumblr_publisher_session_get_oauth_nonce (_tmp3_); -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_; -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp5_); -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp5_); -#line 838 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); -#line 839 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); -#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = session; -#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = publishing_tumblr_tumblr_publisher_session_get_oauth_timestamp (_tmp6_); -#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = _tmp7_; -#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp8_); -#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp8_); -#line 841 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", PUBLISHING_TUMBLR_API_KEY); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = session; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token (_tmp9_); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = _tmp10_; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = _tmp11_ != NULL; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp11_); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp12_) { -#line 5423 "TumblrPublishing.c" - PublishingTumblrTumblrPublisherSession* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = session; -#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token (_tmp13_); -#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _tmp14_; -#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp15_); -#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp15_); -#line 5437 "TumblrPublishing.c" - } -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 5441 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherTransaction* publishing_tumblr_tumblr_publisher_transaction_new_with_uri (PublishingTumblrTumblrPublisherSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_transaction_construct_with_uri (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, session, uri, method); -#line 5448 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { - PublishingTumblrTumblrPublisherTransaction * self; - PublishingRESTSupportSession* _tmp0_; - PublishingTumblrTumblrPublisherSession* _tmp1_; - GError * _inner_error_ = NULL; -#line 847 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, PublishingTumblrTumblrPublisherTransaction); -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSession); -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (_tmp1_); -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_tumblr_tumblr_publisher_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_propagate_error (error, _inner_error_); -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 5477 "TumblrPublishing.c" - } else { -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 5485 "TumblrPublishing.c" - } - } -} - - -static void publishing_tumblr_tumblr_publisher_transaction_class_init (PublishingTumblrTumblrPublisherTransactionClass * klass) { -#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_transaction_parent_class = g_type_class_peek_parent (klass); -#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_tumblr_tumblr_publisher_transaction_real_execute; -#line 5496 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_transaction_instance_init (PublishingTumblrTumblrPublisherTransaction * self) { -} - - -GType publishing_tumblr_tumblr_publisher_transaction_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_transaction_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_transaction_type_id; - publishing_tumblr_tumblr_publisher_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingTumblrTumblrPublisherTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_transaction_type_id); - } - return publishing_tumblr_tumblr_publisher_transaction_type_id__volatile; -} - - -PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, const gchar* username, const gchar* password) { - PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (username != NULL, NULL); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (password != NULL, NULL); -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherAccessTokenFetchTransaction*) publishing_tumblr_tumblr_publisher_transaction_construct_with_uri (object_type, _tmp0_, "https://www.tumblr.com/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = username; -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = soup_uri_encode (_tmp1_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_username", _tmp3_); -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp3_); -#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = password; -#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_password", _tmp4_); -#line 862 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "x_auth_mode", "client_auth"); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 5551 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherAccessTokenFetchTransaction* publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_new (PublishingTumblrTumblrPublisherSession* session, const gchar* username, const gchar* password) { -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, username, password); -#line 5558 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_class_init (PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass * klass) { -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 5565 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_instance_init (PublishingTumblrTumblrPublisherAccessTokenFetchTransaction * self) { -} - - -GType publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id; - publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, "PublishingTumblrTumblrPublisherAccessTokenFetchTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id); - } - return publishing_tumblr_tumblr_publisher_access_token_fetch_transaction_type_id__volatile; -} - - -PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session) { - PublishingTumblrTumblrPublisherUserInfoFetchTransaction* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherUserInfoFetchTransaction*) publishing_tumblr_tumblr_publisher_transaction_construct_with_uri (object_type, _tmp0_, "https://api.tumblr.com/v2/user/info", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 5596 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (PublishingTumblrTumblrPublisherSession* session) { -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, session); -#line 5603 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_class_init (PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass * klass) { -#line 866 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 5610 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_instance_init (PublishingTumblrTumblrPublisherUserInfoFetchTransaction * self) { -} - - -GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUserInfoFetchTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id; - publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id = g_type_register_static (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_TRANSACTION, "PublishingTumblrTumblrPublisherUserInfoFetchTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id); - } - return publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile; -} - - -static gchar* publishing_tumblr_tumblr_publisher_upload_transaction_encode (PublishingTumblrTumblrPublisherUploadTransaction* self, guint8* data, int data_length1) { - gchar* result = NULL; - GString* s = NULL; - GString* _tmp0_; - gchar* bytes = NULL; - gchar* _tmp1_; - gint bytes_length1; - gint _bytes_size_; - gchar* _tmp2_; - gint _tmp2__length1; - gchar _tmp3_; - guint8* _tmp4_; - gint _tmp4__length1; - GString* _tmp14_; - const gchar* _tmp15_; - gchar* _tmp16_; -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION (self), NULL); -#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_string_new (""); -#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - s = _tmp0_; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_new0 (gchar, 2); -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - bytes = _tmp1_; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - bytes_length1 = 2; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _bytes_size_ = bytes_length1; -#line 883 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = bytes; -#line 883 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2__length1 = bytes_length1; -#line 883 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_[1] = (gchar) 0; -#line 883 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_[1]; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = data; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4__length1 = data_length1; -#line 5672 "TumblrPublishing.c" - { - guint8* byte_collection = NULL; - gint byte_collection_length1 = 0; - gint _byte_collection_size_ = 0; - gint byte_it = 0; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - byte_collection = _tmp4_; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - byte_collection_length1 = _tmp4__length1; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (byte_it = 0; byte_it < _tmp4__length1; byte_it = byte_it + 1) { -#line 5684 "TumblrPublishing.c" - guint8 byte = 0U; -#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - byte = byte_collection[byte_it]; -#line 5688 "TumblrPublishing.c" - { - guint8 _tmp5_; -#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = byte; -#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (((gint) _tmp5_) == 0) { -#line 5695 "TumblrPublishing.c" - GString* _tmp6_; -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = s; -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_string_append (_tmp6_, "%00"); -#line 5701 "TumblrPublishing.c" - } else { - gchar* _tmp7_; - gint _tmp7__length1; - guint8 _tmp8_; - gchar _tmp9_; - GString* _tmp10_; - gchar* _tmp11_; - gint _tmp11__length1; - gchar* _tmp12_; - gchar* _tmp13_; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = bytes; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7__length1 = bytes_length1; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = byte; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_[0] = (gchar) _tmp8_; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = _tmp7_[0]; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = s; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = bytes; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11__length1 = bytes_length1; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = soup_uri_encode ((const gchar*) _tmp11_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = _tmp12_; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_string_append (_tmp10_, _tmp13_); -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp13_); -#line 5736 "TumblrPublishing.c" - } - } - } - } -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = s; -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _tmp14_->str; -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp16_; -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - bytes = (g_free (bytes), NULL); -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_string_free0 (s); -#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 5755 "TumblrPublishing.c" -} - - -static gpointer _publishing_rest_support_session_ref0 (gpointer self) { -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? publishing_rest_support_session_ref (self) : NULL; -#line 5762 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable* publishable, const gchar* blog_url) { - PublishingTumblrTumblrPublisherUploadTransaction* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - SpitPublishingPublishable* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - PublishingTumblrTumblrPublisherSession* _tmp5_; - PublishingTumblrTumblrPublisherSession* _tmp6_; -#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (blog_url != NULL, NULL); -#line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:898: Init upload transaction"); -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishable; -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = blog_url; -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup_printf ("https://api.tumblr.com/v2/blog/%s/post", _tmp2_); -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = _tmp3_; -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherUploadTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp4_); -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp4_); -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = session; -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = _publishing_rest_support_session_ref0 (_tmp5_); -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->session = _tmp6_; -#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 5807 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_new (PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable* publishable, const gchar* blog_url) { -#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_upload_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, session, publishable, blog_url); -#line 5814 "TumblrPublishing.c" -} - - -static void _vala_array_add22 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 5825 "TumblrPublishing.c" - } -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 5831 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (PublishingTumblrTumblrPublisherUploadTransaction* self, const gchar* key, const gchar* value) { - PublishingRESTSupportArgument** _tmp0_; - gint _tmp0__length1; - const gchar* _tmp1_; - const gchar* _tmp2_; - PublishingRESTSupportArgument* _tmp3_; -#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION (self)); -#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (key != NULL); -#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (value != NULL); -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->auth_header_fields; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0__length1 = self->priv->auth_header_fields_length1; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = key; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = value; -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = publishing_rest_support_argument_new (_tmp1_, _tmp2_); -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add22 (&self->priv->auth_header_fields, &self->priv->auth_header_fields_length1, &self->priv->_auth_header_fields_size_, _tmp3_); -#line 5859 "TumblrPublishing.c" -} - - -static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? publishing_rest_support_argument_ref (self) : NULL; -#line 5866 "TumblrPublishing.c" -} - - -static PublishingRESTSupportArgument** _vala_array_dup9 (PublishingRESTSupportArgument** self, int length) { - PublishingRESTSupportArgument** result; - int i; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = g_new0 (PublishingRESTSupportArgument*, length + 1); -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (i = 0; i < length; i++) { -#line 5877 "TumblrPublishing.c" - PublishingRESTSupportArgument* _tmp0_; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _publishing_rest_support_argument_ref0 (self[i]); -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result[i] = _tmp0_; -#line 5883 "TumblrPublishing.c" - } -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 5887 "TumblrPublishing.c" -} - - -PublishingRESTSupportArgument** publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_fields (PublishingTumblrTumblrPublisherUploadTransaction* self, int* result_length1) { - PublishingRESTSupportArgument** result = NULL; - PublishingRESTSupportArgument** _tmp0_; - gint _tmp0__length1; - PublishingRESTSupportArgument** _tmp1_; - gint _tmp1__length1; - PublishingRESTSupportArgument** _tmp2_; - gint _tmp2__length1; -#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION (self), NULL); -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->auth_header_fields; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0__length1 = self->priv->auth_header_fields_length1; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup9 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = _tmp0__length1; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp1_; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2__length1 = _tmp1__length1; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (result_length1) { -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *result_length1 = _tmp2__length1; -#line 5917 "TumblrPublishing.c" - } -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp2_; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 5923 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_string (PublishingTumblrTumblrPublisherUploadTransaction* self) { - gchar* result = NULL; - gchar* _result_ = NULL; - gchar* _tmp0_; -#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION (self), NULL); -#line 915 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup ("OAuth "); -#line 915 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp0_; -#line 5937 "TumblrPublishing.c" - { - gint i = 0; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = 0; -#line 5942 "TumblrPublishing.c" - { - gboolean _tmp1_ = FALSE; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = TRUE; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - while (TRUE) { -#line 5949 "TumblrPublishing.c" - gint _tmp3_; - PublishingRESTSupportArgument** _tmp4_; - gint _tmp4__length1; - const gchar* _tmp5_; - PublishingRESTSupportArgument** _tmp6_; - gint _tmp6__length1; - gint _tmp7_; - PublishingRESTSupportArgument* _tmp8_; - const gchar* _tmp9_; - gchar* _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - const gchar* _tmp13_; - PublishingRESTSupportArgument** _tmp14_; - gint _tmp14__length1; - gint _tmp15_; - PublishingRESTSupportArgument* _tmp16_; - const gchar* _tmp17_; - gchar* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - gint _tmp23_; - PublishingRESTSupportArgument** _tmp24_; - gint _tmp24__length1; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp1_) { -#line 5978 "TumblrPublishing.c" - gint _tmp2_; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = i; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = _tmp2_ + 1; -#line 5984 "TumblrPublishing.c" - } -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = FALSE; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = i; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->auth_header_fields; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4__length1 = self->priv->auth_header_fields_length1; -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 5998 "TumblrPublishing.c" - } -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _result_; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->auth_header_fields; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6__length1 = self->priv->auth_header_fields_length1; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = i; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = _tmp6_[_tmp7_]; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = _tmp8_->key; -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = g_strconcat (_tmp5_, _tmp9_, NULL); -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_result_); -#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp10_; -#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = _result_; -#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = g_strconcat (_tmp11_, "=", NULL); -#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_result_); -#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp12_; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = _result_; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = self->priv->auth_header_fields; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14__length1 = self->priv->auth_header_fields_length1; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = i; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = _tmp14_[_tmp15_]; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = _tmp16_->value; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = g_strconcat ("\"", _tmp17_, NULL); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = _tmp18_; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = g_strconcat (_tmp19_, "\"", NULL); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = _tmp20_; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = g_strconcat (_tmp13_, _tmp21_, NULL); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_result_); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp22_; -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp21_); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp19_); -#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = i; -#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = self->priv->auth_header_fields; -#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24__length1 = self->priv->auth_header_fields_length1; -#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp23_ < (_tmp24__length1 - 1)) { -#line 6064 "TumblrPublishing.c" - const gchar* _tmp25_; - gchar* _tmp26_; -#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = _result_; -#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = g_strconcat (_tmp25_, ", ", NULL); -#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_result_); -#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _result_ = _tmp26_; -#line 6075 "TumblrPublishing.c" - } - } - } - } -#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _result_; -#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 6084 "TumblrPublishing.c" -} - - -static guint8* string_get_data (const gchar* self, int* result_length1) { - guint8* result; - guint8* res = NULL; - gint res_length1; - gint _res_size_; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; - guint8* _tmp3_; - gint _tmp3__length1; - guint8* _tmp4_; - gint _tmp4__length1; -#line 1428 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = (guint8*) self; -#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res_length1 = -1; -#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _res_size_ = res_length1; -#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = strlen (self); -#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res_length1 = (gint) _tmp1_; -#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = res_length1; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = res; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = res_length1; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4__length1 = _tmp3__length1; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (result_length1) { -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - *result_length1 = _tmp4__length1; -#line 6128 "TumblrPublishing.c" - } -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 6134 "TumblrPublishing.c" -} - - -static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { - gchar* result = NULL; - const gchar* _tmp0_; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - gchar** _tmp3_; - gint _tmp3__length1; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = separator; -#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_ == NULL) { -#line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - separator = ""; -#line 6151 "TumblrPublishing.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = TRUE; -#line 6161 "TumblrPublishing.c" - } else { - gchar** _tmp4_; - gint _tmp4__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = _tmp4__length1 > 0; -#line 6171 "TumblrPublishing.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp2_) { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 6177 "TumblrPublishing.c" - } else { - gboolean _tmp5_ = FALSE; - gchar** _tmp6_; - gint _tmp6__length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp6__length1 == -1) { -#line 6188 "TumblrPublishing.c" - gchar** _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = str_array; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7__length1 = str_array_length1; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_[0]; -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = _tmp8_ != NULL; -#line 6200 "TumblrPublishing.c" - } else { -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = FALSE; -#line 6204 "TumblrPublishing.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = _tmp5_; -#line 6208 "TumblrPublishing.c" - } -#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 6212 "TumblrPublishing.c" - gint i = 0; - gsize len = 0UL; - gint _tmp31_; - gint _tmp33_; - gint _tmp34_; - gsize _tmp35_; - const gchar* _tmp36_; - gint _tmp37_; - gint _tmp38_; - gint _tmp39_; - const gchar* res = NULL; - gsize _tmp40_; - void* _tmp41_; - void* ptr = NULL; - const gchar* _tmp42_; - gchar** _tmp43_; - gint _tmp43__length1; - const gchar* _tmp44_; - void* _tmp45_; - const gchar* _tmp62_; -#line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 6235 "TumblrPublishing.c" - { - gboolean _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 0; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = TRUE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 6244 "TumblrPublishing.c" - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gchar** _tmp13_; - gint _tmp13__length1; - gint _tmp21_ = 0; - gchar** _tmp22_; - gint _tmp22__length1; - gint _tmp23_; - const gchar* _tmp24_; - gsize _tmp30_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp9_) { -#line 6257 "TumblrPublishing.c" - gint _tmp10_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp10_ + 1; -#line 6263 "TumblrPublishing.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp13__length1 != -1) { -#line 6273 "TumblrPublishing.c" - gint _tmp14_; - gchar** _tmp15_; - gint _tmp15__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ < _tmp15__length1; -#line 6285 "TumblrPublishing.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 6289 "TumblrPublishing.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp12_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = TRUE; -#line 6295 "TumblrPublishing.c" - } else { - gboolean _tmp16_ = FALSE; - gchar** _tmp17_; - gint _tmp17__length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp17__length1 == -1) { -#line 6306 "TumblrPublishing.c" - gchar** _tmp18_; - gint _tmp18__length1; - gint _tmp19_; - const gchar* _tmp20_; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = str_array; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18__length1 = str_array_length1; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = i; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = _tmp18_[_tmp19_]; -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = _tmp20_ != NULL; -#line 6321 "TumblrPublishing.c" - } else { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp16_ = FALSE; -#line 6325 "TumblrPublishing.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp16_; -#line 6329 "TumblrPublishing.c" - } -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp11_) { -#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 6335 "TumblrPublishing.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp23_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp24_ = _tmp22_[_tmp23_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp24_ != NULL) { -#line 6347 "TumblrPublishing.c" - gchar** _tmp25_; - gint _tmp25__length1; - gint _tmp26_; - const gchar* _tmp27_; - gint _tmp28_; - gint _tmp29_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25_ = str_array; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp25__length1 = str_array_length1; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp26_ = i; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp27_ = _tmp25_[_tmp26_]; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp28_ = strlen ((const gchar*) _tmp27_); -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp29_ = _tmp28_; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = _tmp29_; -#line 6368 "TumblrPublishing.c" - } else { -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = 0; -#line 6372 "TumblrPublishing.c" - } -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp30_ = len; -#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp30_ + _tmp21_; -#line 6378 "TumblrPublishing.c" - } - } -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp31_ = i; -#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp31_ == 0) { -#line 6385 "TumblrPublishing.c" - gchar* _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp32_ = g_strdup (""); -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp32_; -#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 6393 "TumblrPublishing.c" - } -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp33_ = i; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - str_array_length1 = _tmp33_; -#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp34_ = str_array_length1; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp35_ = len; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp36_ = separator; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp37_ = strlen ((const gchar*) _tmp36_); -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp38_ = _tmp37_; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp40_ = len; -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp41_ = g_malloc (_tmp40_); -#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = _tmp41_; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp42_ = res; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43_ = str_array; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp43__length1 = str_array_length1; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp44_ = _tmp43_[0]; -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); -#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp45_; -#line 6431 "TumblrPublishing.c" - { - gboolean _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = 1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = TRUE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - while (TRUE) { -#line 6440 "TumblrPublishing.c" - gint _tmp48_; - gchar** _tmp49_; - gint _tmp49__length1; - void* _tmp50_; - const gchar* _tmp51_; - void* _tmp52_; - const gchar* _tmp53_ = NULL; - gchar** _tmp54_; - gint _tmp54__length1; - gint _tmp55_; - const gchar* _tmp56_; - void* _tmp60_; - void* _tmp61_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!_tmp46_) { -#line 6456 "TumblrPublishing.c" - gint _tmp47_; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp47_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - i = _tmp47_ + 1; -#line 6462 "TumblrPublishing.c" - } -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp46_ = FALSE; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp48_ = i; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49_ = str_array; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp49__length1 = str_array_length1; -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (!(_tmp48_ < _tmp49__length1)) { -#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - break; -#line 6476 "TumblrPublishing.c" - } -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp50_ = ptr; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp51_ = separator; -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); -#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp52_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp54__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp55_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp56_ = _tmp54_[_tmp55_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp56_ != NULL) { -#line 6496 "TumblrPublishing.c" - gchar** _tmp57_; - gint _tmp57__length1; - gint _tmp58_; - const gchar* _tmp59_; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57_ = str_array; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp57__length1 = str_array_length1; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp58_ = i; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp59_ = _tmp57_[_tmp58_]; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = (const gchar*) _tmp59_; -#line 6511 "TumblrPublishing.c" - } else { -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp53_ = ""; -#line 6515 "TumblrPublishing.c" - } -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp60_ = ptr; -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); -#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - ptr = _tmp61_; -#line 6523 "TumblrPublishing.c" - } - } -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp62_ = res; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - res = NULL; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (gchar*) _tmp62_; -#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 6534 "TumblrPublishing.c" - } else { - gchar* _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp63_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp63_; -#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 6543 "TumblrPublishing.c" - } -} - - -static void publishing_tumblr_tumblr_publisher_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { - PublishingTumblrTumblrPublisherUploadTransaction * self; - PublishingTumblrTumblrPublisherSession* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - PublishingTumblrTumblrPublisherSession* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - PublishingTumblrTumblrPublisherSession* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* payload = NULL; - gsize payload_length = 0UL; - PublishingTumblrTumblrPublisherSession* _tmp33_; - gchar* authorization_header = NULL; - gchar* _tmp34_; - const gchar* _tmp35_; - const gchar* _tmp36_; - PublishingRESTSupportArgument** request_arguments = NULL; - gint _tmp37_; - PublishingRESTSupportArgument** _tmp38_; - gint request_arguments_length1; - gint _request_arguments_size_; - PublishingRESTSupportArgument** _tmp39_; - gint _tmp39__length1; - gchar* request_data = NULL; - gchar* _tmp40_; - SoupMessage* outbound_message = NULL; - gchar* _tmp63_; - gchar* _tmp64_; - SoupMessage* _tmp65_; - SoupMessage* _tmp66_; - SoupMessage* _tmp67_; - const gchar* _tmp68_; - guint8* _tmp69_; - gint _tmp69__length1; - guint8* _tmp70_; - gint _tmp70__length1; - GeeMapIterator* i = NULL; - GeeHashMap* _tmp71_; - GeeMapIterator* _tmp72_; - gboolean cont = FALSE; - GeeMapIterator* _tmp73_; - gboolean _tmp74_; - SoupMessage* _tmp86_; - GError * _inner_error_ = NULL; -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransaction); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->session; -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_tumblr_tumblr_publisher_session_get_oauth_nonce (_tmp0_); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp1_; -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp2_); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp2_); -#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_signature_method", "HMAC-SHA1"); -#line 932 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_version", "1.0"); -#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = self->priv->session; -#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = publishing_tumblr_tumblr_publisher_session_get_oauth_timestamp (_tmp3_); -#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_; -#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp5_); -#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp5_); -#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_consumer_key", PUBLISHING_TUMBLR_API_KEY); -#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->session; -#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token (_tmp6_); -#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = _tmp7_; -#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp8_); -#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp8_); -#line 6632 "TumblrPublishing.c" - { - SpitPublishingPublishable* _tmp9_; - GFile* _tmp10_; - GFile* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_ = NULL; - gsize _tmp15_ = 0UL; - gchar* reqdata = NULL; - const gchar* _tmp16_; - guint8* _tmp17_; - gint _tmp17__length1; - guint8* _tmp18_; - gint _tmp18__length1; - gsize _tmp19_; - gchar* _tmp20_; - const gchar* _tmp21_; - gchar** keywords = NULL; - SpitPublishingPublishable* _tmp22_; - gint _tmp23_; - gchar** _tmp24_; - gint keywords_length1; - gint _keywords_size_; - gchar* tags = NULL; - gchar* _tmp25_; - gchar** _tmp26_; - gint _tmp26__length1; - const gchar* _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->publishable; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = spit_publishing_publishable_get_serialized_file (_tmp9_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = _tmp10_; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp12_ = g_file_get_path (_tmp11_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = _tmp12_; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_file_get_contents (_tmp13_, &_tmp14_, &_tmp15_, &_inner_error_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - payload = _tmp14_; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - payload_length = _tmp15_; -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp13_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (_tmp11_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == G_FILE_ERROR) { -#line 6689 "TumblrPublishing.c" - goto __catch38_g_file_error; - } -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 6700 "TumblrPublishing.c" - } -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = payload; -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = string_get_data (_tmp16_, &_tmp17__length1); -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18_ = _tmp17_; -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp18__length1 = _tmp17__length1; -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = payload_length; -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = publishing_tumblr_tumblr_publisher_upload_transaction_encode (self, _tmp18_ + 0, ((gint) _tmp19_) - 0); -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - reqdata = _tmp20_; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = reqdata; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "data[0]", _tmp21_); -#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "type", "photo"); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->publishable; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = spit_publishing_publishable_get_publishing_keywords (_tmp22_, &_tmp23_); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - keywords = _tmp24_; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - keywords_length1 = _tmp23_; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _keywords_size_ = keywords_length1; -#line 951 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = g_strdup (""); -#line 951 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tags = _tmp25_; -#line 952 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26_ = keywords; -#line 952 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp26__length1 = keywords_length1; -#line 952 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp26_ != NULL) { -#line 6742 "TumblrPublishing.c" - gchar** _tmp27_; - gint _tmp27__length1; - gchar* _tmp28_; -#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = keywords; -#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27__length1 = keywords_length1; -#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = _vala_g_strjoinv (",", _tmp27_, _tmp27__length1); -#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (tags); -#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - tags = _tmp28_; -#line 6756 "TumblrPublishing.c" - } -#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = tags; -#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = soup_uri_encode (_tmp29_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = _tmp30_; -#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "tags", _tmp31_); -#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp31_); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (tags); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (reqdata); -#line 6774 "TumblrPublishing.c" - } - goto __finally38; - __catch38_g_file_error: - { - GError* e = NULL; - GError* _tmp32_; -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - e = _inner_error_; -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = NULL; -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A temporary file needed for publishing is unavailable")); -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _inner_error_ = _tmp32_; -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_error_free0 (e); -#line 6791 "TumblrPublishing.c" - goto __finally38; - } - __finally38: -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_propagate_error (error, _inner_error_); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 6805 "TumblrPublishing.c" - } else { -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 940 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 6815 "TumblrPublishing.c" - } - } -#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = self->priv->session; -#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_sign_transaction (_tmp33_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_string (self); -#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - authorization_header = _tmp34_; -#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp35_ = authorization_header; -#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:968: executing upload transaction: authorization" \ -" header string = '%s'", _tmp35_); -#line 970 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp36_ = authorization_header; -#line 970 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", _tmp36_); -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp38_ = publishing_rest_support_transaction_get_arguments (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_tmp37_); -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_arguments = _tmp38_; -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_arguments_length1 = _tmp37_; -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _request_arguments_size_ = request_arguments_length1; -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp39_ = request_arguments; -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp39__length1 = request_arguments_length1; -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_assert (_tmp39__length1 > 0, "request_arguments.length > 0"); -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp40_ = g_strdup (""); -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_data = _tmp40_; -#line 6852 "TumblrPublishing.c" - { - gint i = 0; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = 0; -#line 6857 "TumblrPublishing.c" - { - gboolean _tmp41_ = FALSE; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp41_ = TRUE; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - while (TRUE) { -#line 6864 "TumblrPublishing.c" - gint _tmp43_; - PublishingRESTSupportArgument** _tmp44_; - gint _tmp44__length1; - const gchar* _tmp45_; - PublishingRESTSupportArgument** _tmp46_; - gint _tmp46__length1; - gint _tmp47_; - PublishingRESTSupportArgument* _tmp48_; - const gchar* _tmp49_; - gchar* _tmp50_; - gchar* _tmp51_; - PublishingRESTSupportArgument** _tmp52_; - gint _tmp52__length1; - gint _tmp53_; - PublishingRESTSupportArgument* _tmp54_; - const gchar* _tmp55_; - gchar* _tmp56_; - gchar* _tmp57_; - gchar* _tmp58_; - gint _tmp59_; - PublishingRESTSupportArgument** _tmp60_; - gint _tmp60__length1; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp41_) { -#line 6889 "TumblrPublishing.c" - gint _tmp42_; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp42_ = i; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = _tmp42_ + 1; -#line 6895 "TumblrPublishing.c" - } -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp41_ = FALSE; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp43_ = i; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp44_ = request_arguments; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp44__length1 = request_arguments_length1; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!(_tmp43_ < _tmp44__length1)) { -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 6909 "TumblrPublishing.c" - } -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp45_ = request_data; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp46_ = request_arguments; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp46__length1 = request_arguments_length1; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp47_ = i; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp48_ = _tmp46_[_tmp47_]; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp49_ = _tmp48_->key; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp50_ = g_strconcat (_tmp49_, "=", NULL); -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp51_ = _tmp50_; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp52_ = request_arguments; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp52__length1 = request_arguments_length1; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp53_ = i; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp54_ = _tmp52_[_tmp53_]; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp55_ = _tmp54_->value; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp56_ = g_strconcat (_tmp51_, _tmp55_, NULL); -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp57_ = _tmp56_; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp58_ = g_strconcat (_tmp45_, _tmp57_, NULL); -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (request_data); -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_data = _tmp58_; -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp57_); -#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp51_); -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp59_ = i; -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp60_ = request_arguments; -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp60__length1 = request_arguments_length1; -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp59_ < (_tmp60__length1 - 1)) { -#line 6959 "TumblrPublishing.c" - const gchar* _tmp61_; - gchar* _tmp62_; -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp61_ = request_data; -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp62_ = g_strconcat (_tmp61_, "&", NULL); -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (request_data); -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_data = _tmp62_; -#line 6970 "TumblrPublishing.c" - } - } - } - } -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp63_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp64_ = _tmp63_; -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp65_ = soup_message_new ("POST", _tmp64_); -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp66_ = _tmp65_; -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp64_); -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - outbound_message = _tmp66_; -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp67_ = outbound_message; -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp68_ = request_data; -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp69_ = string_get_data (_tmp68_, &_tmp69__length1); -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp70_ = _tmp69_; -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp70__length1 = _tmp69__length1; -#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - soup_message_set_request (_tmp67_, "application/x-www-form-urlencoded", SOUP_MEMORY_COPY, _tmp70_, (gsize) _tmp70__length1); -#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp71_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->message_headers; -#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp72_ = gee_abstract_map_map_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = _tmp72_; -#line 986 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp73_ = i; -#line 986 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp74_ = gee_map_iterator_next (_tmp73_); -#line 986 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - cont = _tmp74_; -#line 987 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - while (TRUE) { -#line 7013 "TumblrPublishing.c" - gboolean _tmp75_; - SoupMessage* _tmp76_; - SoupMessageHeaders* _tmp77_; - GeeMapIterator* _tmp78_; - gpointer _tmp79_; - gchar* _tmp80_; - GeeMapIterator* _tmp81_; - gpointer _tmp82_; - gchar* _tmp83_; - GeeMapIterator* _tmp84_; - gboolean _tmp85_; -#line 987 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp75_ = cont; -#line 987 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp75_) { -#line 987 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 7031 "TumblrPublishing.c" - } -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp76_ = outbound_message; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp77_ = _tmp76_->request_headers; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp78_ = i; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp79_ = gee_map_iterator_get_key (_tmp78_); -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp80_ = (gchar*) _tmp79_; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp81_ = i; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp82_ = gee_map_iterator_get_value (_tmp81_); -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp83_ = (gchar*) _tmp82_; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - soup_message_headers_append (_tmp77_, _tmp80_, _tmp83_); -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp83_); -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp80_); -#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp84_ = i; -#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp85_ = gee_map_iterator_next (_tmp84_); -#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - cont = _tmp85_; -#line 7061 "TumblrPublishing.c" - } -#line 991 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp86_ = outbound_message; -#line 991 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp86_); -#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_propagate_error (error, _inner_error_); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (i); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (outbound_message); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (request_data); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (authorization_header); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 7091 "TumblrPublishing.c" - } else { -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (i); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (outbound_message); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (request_data); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (authorization_header); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_clear_error (&_inner_error_); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return; -#line 7111 "TumblrPublishing.c" - } - } -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (i); -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (outbound_message); -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (request_data); -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (authorization_header); -#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (payload); -#line 7126 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_upload_transaction_class_init (PublishingTumblrTumblrPublisherUploadTransactionClass * klass) { -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_parent_class = g_type_class_peek_parent (klass); -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_tumblr_tumblr_publisher_upload_transaction_finalize; -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherUploadTransactionPrivate)); -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_tumblr_tumblr_publisher_upload_transaction_real_execute; -#line 7139 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_upload_transaction_instance_init (PublishingTumblrTumblrPublisherUploadTransaction * self) { -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_GET_PRIVATE (self); -#line 7146 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_upload_transaction_finalize (PublishingRESTSupportTransaction * obj) { - PublishingTumblrTumblrPublisherUploadTransaction * self; -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransaction); -#line 875 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.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 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_tumblr_tumblr_publisher_upload_transaction_parent_class)->finalize (obj); -#line 7160 "TumblrPublishing.c" -} - - -GType publishing_tumblr_tumblr_publisher_upload_transaction_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUploadTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_upload_transaction_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_upload_transaction_type_id; - publishing_tumblr_tumblr_publisher_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, "PublishingTumblrTumblrPublisherUploadTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_upload_transaction_type_id); - } - return publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile; -} - - -PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_construct (GType object_type, PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url) { - PublishingTumblrTumblrPublisherUploader* self = NULL; - PublishingTumblrTumblrPublisherSession* _tmp0_; - SpitPublishingPublishable** _tmp1_; - gint _tmp1__length1; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (session), NULL); -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (blog_url != NULL, NULL); -#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = session; -#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishables; -#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1__length1 = publishables_length1; -#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); -#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = blog_url; -#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->blog_url); -#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_url = _tmp3_; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 7205 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_new (PublishingTumblrTumblrPublisherSession* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url) { -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_uploader_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, session, publishables, publishables_length1, blog_url); -#line 7212 "TumblrPublishing.c" -} - - -static PublishingRESTSupportTransaction* publishing_tumblr_tumblr_publisher_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { - PublishingTumblrTumblrPublisherUploader * self; - PublishingRESTSupportTransaction* result = NULL; - PublishingRESTSupportSession* _tmp0_; - PublishingTumblrTumblrPublisherSession* _tmp1_; - SpitPublishingPublishable* _tmp2_; - SpitPublishingPublishable* _tmp3_; - const gchar* _tmp4_; - PublishingTumblrTumblrPublisherUploadTransaction* _tmp5_; - PublishingRESTSupportTransaction* _tmp6_; -#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader); -#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1012: Create upload transaction"); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSession); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = self->priv->blog_url; -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_upload_transaction_new (_tmp1_, _tmp3_, _tmp4_); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (_tmp3_); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (_tmp1_); -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp6_; -#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 7254 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_uploader_class_init (PublishingTumblrTumblrPublisherUploaderClass * klass) { -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_uploader_parent_class = g_type_class_peek_parent (klass); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_tumblr_tumblr_publisher_uploader_finalize; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherUploaderPrivate)); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = (PublishingRESTSupportTransaction* (*) (PublishingRESTSupportBatchUploader *, SpitPublishingPublishable*)) publishing_tumblr_tumblr_publisher_uploader_real_create_transaction; -#line 7267 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_uploader_instance_init (PublishingTumblrTumblrPublisherUploader * self) { - gchar* _tmp0_; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_PRIVATE (self); -#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup (""); -#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blog_url = _tmp0_; -#line 7279 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_uploader_finalize (PublishingRESTSupportBatchUploader * obj) { - PublishingTumblrTumblrPublisherUploader * self; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader); -#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->blog_url); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_tumblr_tumblr_publisher_uploader_parent_class)->finalize (obj); -#line 7291 "TumblrPublishing.c" -} - - -GType publishing_tumblr_tumblr_publisher_uploader_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_uploader_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_uploader_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUploader), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_uploader_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_uploader_type_id; - publishing_tumblr_tumblr_publisher_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingTumblrTumblrPublisherUploader", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_uploader_type_id__volatile, publishing_tumblr_tumblr_publisher_uploader_type_id); - } - return publishing_tumblr_tumblr_publisher_uploader_type_id__volatile; -} - - -PublishingTumblrTumblrPublisherSession* publishing_tumblr_tumblr_publisher_session_construct (GType object_type) { - PublishingTumblrTumblrPublisherSession* self = NULL; -#line 1028 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherSession*) publishing_rest_support_session_construct (object_type, PUBLISHING_TUMBLR_ENDPOINT_URL); -#line 1027 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self; -#line 7313 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherSession* publishing_tumblr_tumblr_publisher_session_new (void) { -#line 1027 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return publishing_tumblr_tumblr_publisher_session_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION); -#line 7320 "TumblrPublishing.c" -} - - -static gboolean publishing_tumblr_tumblr_publisher_session_real_is_authenticated (PublishingRESTSupportSession* base) { - PublishingTumblrTumblrPublisherSession * self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; -#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSession); -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = self->priv->access_phase_token; -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp1_ != NULL) { -#line 7335 "TumblrPublishing.c" - const gchar* _tmp2_; -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = self->priv->access_phase_token_secret; -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = _tmp2_ != NULL; -#line 7341 "TumblrPublishing.c" - } else { -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = FALSE; -#line 7345 "TumblrPublishing.c" - } -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp0_; -#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 7351 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_session_authenticate_from_persistent_credentials (PublishingTumblrTumblrPublisherSession* self, const gchar* token, const gchar* secret) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self)); -#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (token != NULL); -#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (secret != NULL); -#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = token; -#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token = _tmp1_; -#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = secret; -#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token_secret = _tmp3_; -#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 7384 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_session_deauthenticate (PublishingTumblrTumblrPublisherSession* self) { -#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self)); -#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token = NULL; -#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token_secret = NULL; -#line 7399 "TumblrPublishing.c" -} - - -static gpointer _publishing_rest_support_transaction_ref0 (gpointer self) { -#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return self ? publishing_rest_support_transaction_ref (self) : NULL; -#line 7406 "TumblrPublishing.c" -} - - -static void _vala_array_add23 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if ((*length) == (*size)) { -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 7417 "TumblrPublishing.c" - } -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[(*length)++] = value; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (*array)[*length] = NULL; -#line 7423 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_session_sign_transaction (PublishingTumblrTumblrPublisherSession* self, PublishingRESTSupportTransaction* txn) { - gchar* http_method = NULL; - PublishingRESTSupportTransaction* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; - gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* signing_key = NULL; - const gchar* _tmp6_; - PublishingRESTSupportArgument** base_string_arguments = NULL; - PublishingRESTSupportTransaction* _tmp11_; - gint _tmp12_; - PublishingRESTSupportArgument** _tmp13_; - gint base_string_arguments_length1; - gint _base_string_arguments_size_; - PublishingTumblrTumblrPublisherUploadTransaction* upload_txn = NULL; - PublishingRESTSupportTransaction* _tmp14_; - PublishingTumblrTumblrPublisherUploadTransaction* _tmp15_; - PublishingTumblrTumblrPublisherUploadTransaction* _tmp16_; - PublishingRESTSupportArgument** sorted_args = NULL; - PublishingRESTSupportArgument** _tmp25_; - gint _tmp25__length1; - gint _tmp26_; - PublishingRESTSupportArgument** _tmp27_; - gint sorted_args_length1; - gint _sorted_args_size_; - gchar* arguments_string = NULL; - gchar* _tmp28_; - gchar* signature_base_string = NULL; - const gchar* _tmp51_; - gchar* _tmp52_; - gchar* _tmp53_; - PublishingRESTSupportTransaction* _tmp54_; - gchar* _tmp55_; - gchar* _tmp56_; - gchar* _tmp57_; - gchar* _tmp58_; - gchar* _tmp59_; - gchar* _tmp60_; - gchar* _tmp61_; - gchar* _tmp62_; - const gchar* _tmp63_; - gchar* _tmp64_; - gchar* _tmp65_; - gchar* _tmp66_; - gchar* _tmp67_; - const gchar* _tmp68_; - const gchar* _tmp69_; - gchar* signature = NULL; - const gchar* _tmp70_; - const gchar* _tmp71_; - gchar* _tmp72_; - const gchar* _tmp73_; - const gchar* _tmp74_; - gchar* _tmp75_; - const gchar* _tmp76_; - PublishingTumblrTumblrPublisherUploadTransaction* _tmp77_; -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self)); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = txn; -#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_); -#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); -#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - http_method = _tmp2_; -#line 1051 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1051: signing transaction with parameters:"); -#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = http_method; -#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); -#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_; -#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1052: %s", _tmp5_); -#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp5_); -#line 1053 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signing_key = NULL; -#line 1054 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = self->priv->access_phase_token_secret; -#line 1054 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp6_ != NULL) { -#line 7515 "TumblrPublishing.c" - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; -#line 1055 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1055: access phase token secret available; using" \ -" it as signing key"); -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = publishing_tumblr_tumblr_publisher_session_get_access_phase_token_secret (self); -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = _tmp7_; -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = g_strconcat (PUBLISHING_TUMBLR_API_SECRET "&", _tmp8_, NULL); -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signing_key); -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signing_key = _tmp9_; -#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp8_); -#line 7533 "TumblrPublishing.c" - } else { - gchar* _tmp10_; -#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1059: %s", "Access phase token secret not available; using API " "key as signing key"); -#line 1062 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = g_strdup (PUBLISHING_TUMBLR_API_SECRET "&"); -#line 1062 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signing_key); -#line 1062 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signing_key = _tmp10_; -#line 7544 "TumblrPublishing.c" - } -#line 1066 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = txn; -#line 1066 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp13_ = publishing_rest_support_transaction_get_arguments (_tmp11_, &_tmp12_); -#line 1066 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - base_string_arguments = _tmp13_; -#line 1066 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - base_string_arguments_length1 = _tmp12_; -#line 1066 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _base_string_arguments_size_ = base_string_arguments_length1; -#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp14_ = txn; -#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp15_ = _publishing_rest_support_transaction_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION) ? ((PublishingTumblrTumblrPublisherUploadTransaction*) _tmp14_) : NULL); -#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - upload_txn = _tmp15_; -#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp16_ = upload_txn; -#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp16_ != NULL) { -#line 7566 "TumblrPublishing.c" - PublishingRESTSupportArgument** auth_header_args = NULL; - PublishingTumblrTumblrPublisherUploadTransaction* _tmp17_; - gint _tmp18_; - PublishingRESTSupportArgument** _tmp19_; - gint auth_header_args_length1; - gint _auth_header_args_size_; - PublishingRESTSupportArgument** _tmp20_; - gint _tmp20__length1; -#line 1070 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1070: %s", "this transaction is an UploadTransaction; including Authorization head" \ -"er " "fields in signature base string"); -#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp17_ = upload_txn; -#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp19_ = publishing_tumblr_tumblr_publisher_upload_transaction_get_authorization_header_fields (_tmp17_, &_tmp18_); -#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - auth_header_args = _tmp19_; -#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - auth_header_args_length1 = _tmp18_; -#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _auth_header_args_size_ = auth_header_args_length1; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20_ = auth_header_args; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp20__length1 = auth_header_args_length1; -#line 7591 "TumblrPublishing.c" - { - PublishingRESTSupportArgument** arg_collection = NULL; - gint arg_collection_length1 = 0; - gint _arg_collection_size_ = 0; - gint arg_it = 0; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arg_collection = _tmp20_; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arg_collection_length1 = _tmp20__length1; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - for (arg_it = 0; arg_it < _tmp20__length1; arg_it = arg_it + 1) { -#line 7603 "TumblrPublishing.c" - PublishingRESTSupportArgument* _tmp21_; - PublishingRESTSupportArgument* arg = NULL; -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp21_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arg = _tmp21_; -#line 7610 "TumblrPublishing.c" - { - PublishingRESTSupportArgument** _tmp22_; - gint _tmp22__length1; - PublishingRESTSupportArgument* _tmp23_; - PublishingRESTSupportArgument* _tmp24_; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22_ = base_string_arguments; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp22__length1 = base_string_arguments_length1; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp23_ = arg; -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp24_ = _publishing_rest_support_argument_ref0 (_tmp23_); -#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _vala_array_add23 (&base_string_arguments, &base_string_arguments_length1, &_base_string_arguments_size_, _tmp24_); -#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_argument_unref0 (arg); -#line 7628 "TumblrPublishing.c" - } - } - } -#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - auth_header_args = (_vala_array_free (auth_header_args, auth_header_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 7634 "TumblrPublishing.c" - } -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25_ = base_string_arguments; -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp25__length1 = base_string_arguments_length1; -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp27_ = publishing_rest_support_argument_sort (_tmp25_, _tmp25__length1, &_tmp26_); -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - sorted_args = _tmp27_; -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - sorted_args_length1 = _tmp26_; -#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _sorted_args_size_ = sorted_args_length1; -#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp28_ = g_strdup (""); -#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arguments_string = _tmp28_; -#line 7652 "TumblrPublishing.c" - { - gint i = 0; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = 0; -#line 7657 "TumblrPublishing.c" - { - gboolean _tmp29_ = FALSE; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = TRUE; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - while (TRUE) { -#line 7664 "TumblrPublishing.c" - gint _tmp31_; - PublishingRESTSupportArgument** _tmp32_; - gint _tmp32__length1; - const gchar* _tmp33_; - PublishingRESTSupportArgument** _tmp34_; - gint _tmp34__length1; - gint _tmp35_; - PublishingRESTSupportArgument* _tmp36_; - const gchar* _tmp37_; - gchar* _tmp38_; - gchar* _tmp39_; - PublishingRESTSupportArgument** _tmp40_; - gint _tmp40__length1; - gint _tmp41_; - PublishingRESTSupportArgument* _tmp42_; - const gchar* _tmp43_; - gchar* _tmp44_; - gchar* _tmp45_; - gchar* _tmp46_; - gint _tmp47_; - PublishingRESTSupportArgument** _tmp48_; - gint _tmp48__length1; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!_tmp29_) { -#line 7689 "TumblrPublishing.c" - gint _tmp30_; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp30_ = i; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - i = _tmp30_ + 1; -#line 7695 "TumblrPublishing.c" - } -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp29_ = FALSE; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp31_ = i; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32_ = sorted_args; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp32__length1 = sorted_args_length1; -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (!(_tmp31_ < _tmp32__length1)) { -#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - break; -#line 7709 "TumblrPublishing.c" - } -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp33_ = arguments_string; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34_ = sorted_args; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp34__length1 = sorted_args_length1; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp35_ = i; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp36_ = _tmp34_[_tmp35_]; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp37_ = _tmp36_->key; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp38_ = g_strconcat (_tmp37_, "=", NULL); -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp39_ = _tmp38_; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp40_ = sorted_args; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp40__length1 = sorted_args_length1; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp41_ = i; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp42_ = _tmp40_[_tmp41_]; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp43_ = _tmp42_->value; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp44_ = g_strconcat (_tmp39_, _tmp43_, NULL); -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp45_ = _tmp44_; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp46_ = g_strconcat (_tmp33_, _tmp45_, NULL); -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (arguments_string); -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arguments_string = _tmp46_; -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp45_); -#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp39_); -#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp47_ = i; -#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp48_ = sorted_args; -#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp48__length1 = sorted_args_length1; -#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp47_ < (_tmp48__length1 - 1)) { -#line 7759 "TumblrPublishing.c" - const gchar* _tmp49_; - gchar* _tmp50_; -#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp49_ = arguments_string; -#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp50_ = g_strconcat (_tmp49_, "&", NULL); -#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (arguments_string); -#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - arguments_string = _tmp50_; -#line 7770 "TumblrPublishing.c" - } - } - } - } -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp51_ = http_method; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp52_ = g_strconcat (_tmp51_, "&", NULL); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp53_ = _tmp52_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp54_ = txn; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp55_ = publishing_rest_support_transaction_get_endpoint_url (_tmp54_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp56_ = _tmp55_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp57_ = soup_uri_encode (_tmp56_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp58_ = _tmp57_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp59_ = g_strconcat (_tmp53_, _tmp58_, NULL); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp60_ = _tmp59_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp61_ = g_strconcat (_tmp60_, "&", NULL); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp62_ = _tmp61_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp63_ = arguments_string; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp64_ = soup_uri_encode (_tmp63_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp65_ = _tmp64_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp66_ = g_strconcat (_tmp62_, _tmp65_, NULL); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp67_ = _tmp66_; -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp65_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp62_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp60_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp58_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp56_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp53_); -#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signature_base_string = _tmp67_; -#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp68_ = signature_base_string; -#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1095: signature base string = '%s'", _tmp68_); -#line 1096 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp69_ = signing_key; -#line 1096 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1096: signing key = '%s'", _tmp69_); -#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp70_ = signing_key; -#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp71_ = signature_base_string; -#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp72_ = publishing_rest_support_hmac_sha1 (_tmp70_, _tmp71_); -#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signature = _tmp72_; -#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp73_ = signature; -#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1100: signature = '%s'", _tmp73_); -#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp74_ = signature; -#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp75_ = soup_uri_encode (_tmp74_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signature); -#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - signature = _tmp75_; -#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp76_ = signature; -#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:1103: signature after RFC encode = '%s'", _tmp76_); -#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp77_ = upload_txn; -#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - if (_tmp77_ != NULL) { -#line 7859 "TumblrPublishing.c" - PublishingTumblrTumblrPublisherUploadTransaction* _tmp78_; - const gchar* _tmp79_; -#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp78_ = upload_txn; -#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp79_ = signature; -#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_upload_transaction_add_authorization_header_field (_tmp78_, "oauth_signature", _tmp79_); -#line 7868 "TumblrPublishing.c" - } else { - PublishingRESTSupportTransaction* _tmp80_; - const gchar* _tmp81_; -#line 1108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp80_ = txn; -#line 1108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp81_ = signature; -#line 1108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_rest_support_transaction_add_argument (_tmp80_, "oauth_signature", _tmp81_); -#line 7878 "TumblrPublishing.c" - } -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signature); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signature_base_string); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (arguments_string); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (upload_txn); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (signing_key); -#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (http_method); -#line 7896 "TumblrPublishing.c" -} - - -void publishing_tumblr_tumblr_publisher_session_set_access_phase_credentials (PublishingTumblrTumblrPublisherSession* self, const gchar* token, const gchar* secret) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self)); -#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (token != NULL); -#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_if_fail (secret != NULL); -#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = token; -#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token = _tmp1_; -#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = secret; -#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token_secret = _tmp3_; -#line 1118 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 7929 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_session_get_access_phase_token (PublishingTumblrTumblrPublisherSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 1121 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self), NULL); -#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->access_phase_token; -#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 7947 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_session_get_access_phase_token_secret (PublishingTumblrTumblrPublisherSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self), NULL); -#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->access_phase_token_secret; -#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp1_; -#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 7965 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_session_get_oauth_nonce (PublishingTumblrTumblrPublisherSession* self) { - gchar* result = NULL; - GTimeVal currtime = {0}; - GTimeVal _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - GTimeVal _tmp4_; - glong _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self), NULL); -#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_get_current_time (&currtime); -#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_get_current_time (&currtime); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = currtime; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = _tmp0_.tv_sec; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = g_strdup_printf ("%li", _tmp1_); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = currtime; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp5_ = _tmp4_.tv_usec; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp6_ = g_strdup_printf ("%li", _tmp5_); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp7_ = _tmp6_; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp9_ = _tmp8_; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp11_ = _tmp10_; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp9_); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp7_); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp3_); -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp11_; -#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 8024 "TumblrPublishing.c" -} - - -static glong string_strnlen (gchar* str, glong maxlen) { - glong result = 0L; - gchar* end = NULL; - gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 8047 "TumblrPublishing.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 8055 "TumblrPublishing.c" - } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 8067 "TumblrPublishing.c" - } -} - - -static gchar* string_substring (const gchar* self, glong offset, glong len) { - gchar* result = NULL; - glong string_length = 0L; - gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 8091 "TumblrPublishing.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 8097 "TumblrPublishing.c" - } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 8101 "TumblrPublishing.c" - } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 8105 "TumblrPublishing.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 8117 "TumblrPublishing.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 8127 "TumblrPublishing.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 8133 "TumblrPublishing.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 8147 "TumblrPublishing.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 8157 "TumblrPublishing.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 8163 "TumblrPublishing.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 8172 "TumblrPublishing.c" - } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 8192 "TumblrPublishing.c" -} - - -gchar* publishing_tumblr_tumblr_publisher_session_get_oauth_timestamp (PublishingTumblrTumblrPublisherSession* self) { - gchar* result = NULL; - gint64 _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_SESSION (self), NULL); -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_get_real_time (); -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_); -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp2_ = _tmp1_; -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp4_ = _tmp3_; -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (_tmp2_); -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - result = _tmp4_; -#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - return result; -#line 8221 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_session_class_init (PublishingTumblrTumblrPublisherSessionClass * klass) { -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_session_parent_class = g_type_class_peek_parent (klass); -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_tumblr_tumblr_publisher_session_finalize; -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherSessionPrivate)); -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_tumblr_tumblr_publisher_session_real_is_authenticated; -#line 8234 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_session_instance_init (PublishingTumblrTumblrPublisherSession * self) { -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_SESSION_GET_PRIVATE (self); -#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token = NULL; -#line 1024 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->access_phase_token_secret = NULL; -#line 8245 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_session_finalize (PublishingRESTSupportSession * obj) { - PublishingTumblrTumblrPublisherSession * self; -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_SESSION, PublishingTumblrTumblrPublisherSession); -#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 1024 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_tumblr_tumblr_publisher_session_parent_class)->finalize (obj); -#line 8259 "TumblrPublishing.c" -} - - -/** - * Session class that keeps track of the authentication status and of the - * user token tumblr. - */ -GType publishing_tumblr_tumblr_publisher_session_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_session_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_session_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherSession), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_session_instance_init, NULL }; - GType publishing_tumblr_tumblr_publisher_session_type_id; - publishing_tumblr_tumblr_publisher_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingTumblrTumblrPublisherSession", &g_define_type_info, 0); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_session_type_id__volatile, publishing_tumblr_tumblr_publisher_session_type_id); - } - return publishing_tumblr_tumblr_publisher_session_type_id__volatile; -} - - -static void publishing_tumblr_tumblr_publisher_class_init (PublishingTumblrTumblrPublisherClass * klass) { -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_parent_class = g_type_class_peek_parent (klass); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherPrivate)); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (klass)->finalize = publishing_tumblr_tumblr_publisher_finalize; -#line 8286 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->get_service = (SpitPublishingService* (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_get_service; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->is_running = (gboolean (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_is_running; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->start = (void (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_start; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - iface->stop = (void (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_stop; -#line 8301 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_instance_init (PublishingTumblrTumblrPublisher * self) { - gchar* _tmp0_; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_PRIVATE (self); -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter = NULL; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target = self; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target_destroy_notify = NULL; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->running = FALSE; -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->was_started = FALSE; -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->session = NULL; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->publishing_options_pane = NULL; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = NULL; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes_length1 = 0; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = NULL; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs_length1 = 0; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->_blogs_size_ = self->priv->blogs_length1; -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = g_strdup (""); -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->username = _tmp0_; -#line 8339 "TumblrPublishing.c" -} - - -static void publishing_tumblr_tumblr_publisher_finalize (GObject * obj) { - PublishingTumblrTumblrPublisher * self; - PublishingTumblrTumblrPublisherSession* _tmp0_; - guint _tmp1_; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _tmp0_ = self->priv->session; -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE); -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated, self); -#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->service); -#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->host); -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter = NULL; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target = NULL; -#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->progress_reporter_target_destroy_notify = NULL; -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_object_unref0 (self->priv->publishing_options_pane); -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - _g_free0 (self->priv->username); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/TumblrPublishing.vala" - G_OBJECT_CLASS (publishing_tumblr_tumblr_publisher_parent_class)->finalize (obj); -#line 8379 "TumblrPublishing.c" -} - - -GType publishing_tumblr_tumblr_publisher_get_type (void) { - static volatile gsize publishing_tumblr_tumblr_publisher_type_id__volatile = 0; - if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisher), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_instance_init, NULL }; - static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_tumblr_tumblr_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType publishing_tumblr_tumblr_publisher_type_id; - publishing_tumblr_tumblr_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingTumblrTumblrPublisher", &g_define_type_info, 0); - g_type_add_interface_static (publishing_tumblr_tumblr_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info); - g_once_init_leave (&publishing_tumblr_tumblr_publisher_type_id__volatile, publishing_tumblr_tumblr_publisher_type_id); - } - return publishing_tumblr_tumblr_publisher_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - diff --git a/plugins/shotwell-publishing-extras/TumblrPublishing.vala b/plugins/shotwell-publishing-extras/TumblrPublishing.vala deleted file mode 100644 index 12b4ade..0000000 --- a/plugins/shotwell-publishing-extras/TumblrPublishing.vala +++ /dev/null @@ -1,1148 +0,0 @@ -/* Copyright 2012 BJA Electronics - * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -public class TumblrService : Object, Spit.Pluggable, Spit.Publishing.Service { - private const string ICON_FILENAME = "tumblr.png"; - - private static Gdk.Pixbuf[] icon_pixbuf_set = null; - - public TumblrService(GLib.File resource_directory) { - if (icon_pixbuf_set == null) - icon_pixbuf_set = - Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + - ICON_FILENAME); - } - - public int get_pluggable_interface(int min_host_interface, int max_host_interface) { - return Spit.negotiate_interfaces(min_host_interface, max_host_interface, - Spit.Publishing.CURRENT_INTERFACE); - } - - public unowned string get_id() { - return "org.yorba.shotwell.publishing.tumblr"; - } - - public unowned string get_pluggable_name() { - return "Tumblr"; - } - - public void get_info(ref Spit.PluggableInfo info) { - info.authors = "Jeroen Arnoldus"; - info.copyright = _("Copyright 2012 BJA Electronics"); - info.translators = Resources.TRANSLATORS; - info.version = _VERSION; - info.website_name = Resources.WEBSITE_NAME; - info.website_url = Resources.WEBSITE_URL; - info.is_license_wordwrapped = false; - info.license = Resources.LICENSE; - info.icons = icon_pixbuf_set; - } - - public void activation(bool enabled) { - } - - public Spit.Publishing.Publisher create_publisher(Spit.Publishing.PluginHost host) { - return new Publishing.Tumblr.TumblrPublisher(this, host); - } - - public Spit.Publishing.Publisher.MediaType get_supported_media() { - return (Spit.Publishing.Publisher.MediaType.PHOTO | - Spit.Publishing.Publisher.MediaType.VIDEO); - } -} - -namespace Publishing.Tumblr { - -internal const string SERVICE_NAME = "Tumblr"; -internal const string ENDPOINT_URL = "https://www.tumblr.com/"; -internal const string API_KEY = "NdXvXQuKVccOsCOj0H4k9HUJcbcjDBYSo2AkaHzXFECHGNuP9k"; -internal const string API_SECRET = "BN0Uoig0MwbeD27OgA0IwYlp3Uvonyfsrl9pf1cnnMj1QoEUvi"; -internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; -internal const int ORIGINAL_SIZE = -1; - - - -private class BlogEntry { - public string blog; - public string url; - public BlogEntry(string creator_blog, string creator_url) { - blog = creator_blog; - url = creator_url; - } -} - -private class SizeEntry { - public string title; - public int size; - - public SizeEntry(string creator_title, int creator_size) { - title = creator_title; - size = creator_size; - } -} - -public class TumblrPublisher : Spit.Publishing.Publisher, GLib.Object { - private Spit.Publishing.Service service; - private Spit.Publishing.PluginHost host; - private Spit.Publishing.ProgressCallback progress_reporter = null; - private bool running = false; - private bool was_started = false; - private Session session = null; - private PublishingOptionsPane publishing_options_pane = null; - private SizeEntry[] sizes = null; - private BlogEntry[] blogs = null; - private string username = ""; - - - private SizeEntry[] create_sizes() { - SizeEntry[] result = new SizeEntry[0]; - - result += new SizeEntry(_("500 × 375 pixels"), 500); - result += new SizeEntry(_("1024 × 768 pixels"), 1024); - result += new SizeEntry(_("1280 × 853 pixels"), 1280); -//Larger images make no sense for Tumblr -// result += new SizeEntry(_("2048 × 1536 pixels"), 2048); -// result += new SizeEntry(_("4096 × 3072 pixels"), 4096); -// result += new SizeEntry(_("Original size"), ORIGINAL_SIZE); - - return result; - } - - private BlogEntry[] create_blogs() { - BlogEntry[] result = new BlogEntry[0]; - - - return result; - } - - public TumblrPublisher(Spit.Publishing.Service service, - Spit.Publishing.PluginHost host) { - debug("TumblrPublisher instantiated."); - this.service = service; - this.host = host; - this.session = new Session(); - this.sizes = this.create_sizes(); - this.blogs = this.create_blogs(); - session.authenticated.connect(on_session_authenticated); - } - - ~TumblrPublisher() { - session.authenticated.disconnect(on_session_authenticated); - } - - private void invalidate_persistent_session() { - set_persistent_access_phase_token(""); - set_persistent_access_phase_token_secret(""); - } - // Publisher interface implementation - - public Spit.Publishing.Service get_service() { - return service; - } - - public Spit.Publishing.PluginHost get_host() { - return host; - } - - public bool is_running() { - return running; - } - - private bool is_persistent_session_valid() { - string? access_phase_token = get_persistent_access_phase_token(); - string? access_phase_token_secret = get_persistent_access_phase_token_secret(); - - bool valid = ((access_phase_token != null) && (access_phase_token_secret != null)); - - if (valid) - debug("existing Tumblr session found in configuration database; using it."); - else - debug("no persisted Tumblr session exists."); - - return valid; - } - - - - - public string? get_persistent_access_phase_token() { - return host.get_config_string("token", null); - } - - private void set_persistent_access_phase_token(string? token) { - host.set_config_string("token", token); - } - - public string? get_persistent_access_phase_token_secret() { - return host.get_config_string("token_secret", null); - } - - private void set_persistent_access_phase_token_secret(string? token_secret) { - host.set_config_string("token_secret", token_secret); - } - - internal int get_persistent_default_size() { - return host.get_config_int("default_size", 1); - } - - internal void set_persistent_default_size(int size) { - host.set_config_int("default_size", size); - } - - internal int get_persistent_default_blog() { - return host.get_config_int("default_blog", 0); - } - - internal void set_persistent_default_blog(int blog) { - host.set_config_int("default_blog", blog); - } - - // Actions and events implementation - - /** - * Action that shows the authentication pane. - * - * This action method shows the authentication pane. It is shown at the - * very beginning of the interaction when no persistent parameters are found - * or after a failed login attempt using persisted parameters. It can be - * given a mode flag to specify whether it should be displayed in initial - * mode or in any of the error modes that it supports. - * - * @param mode the mode for the authentication pane - */ - private void do_show_authentication_pane(AuthenticationPane.Mode mode = AuthenticationPane.Mode.INTRO) { - debug("ACTION: installing authentication pane"); - - host.set_service_locked(false); - AuthenticationPane authentication_pane = - new AuthenticationPane(this, mode); - authentication_pane.login.connect(on_authentication_pane_login_clicked); - host.install_dialog_pane(authentication_pane, Spit.Publishing.PluginHost.ButtonMode.CLOSE); - host.set_dialog_default_widget(authentication_pane.get_default_widget()); - } - - /** - * Event triggered when the login button in the authentication panel is - * clicked. - * - * This event is triggered when the login button in the authentication - * panel is clicked. It then triggers a network login interaction. - * - * @param username the name of the Tumblr user as entered in the dialog - * @param password the password of the Tumblr as entered in the dialog - */ - private void on_authentication_pane_login_clicked( string username, string password ) { - debug("EVENT: on_authentication_pane_login_clicked"); - if (!running) - return; - - do_network_login(username, password); - } - - /** - * Action to perform a network login to a Tumblr blog. - * - * This action performs a network login a Tumblr blog specified the given user name and password as credentials. - * - * @param username the name of the Tumblr user used to login - * @param password the password of the Tumblr user used to login - */ - private void do_network_login(string username, string password) { - debug("ACTION: logging in"); - host.set_service_locked(true); - host.install_login_wait_pane(); - - - AccessTokenFetchTransaction txn = new AccessTokenFetchTransaction(session,username,password); - txn.completed.connect(on_auth_request_txn_completed); - txn.network_error.connect(on_auth_request_txn_error); - - try { - txn.execute(); - } catch (Spit.Publishing.PublishingError err) { - host.post_error(err); - } - } - - - private void on_auth_request_txn_completed(Publishing.RESTSupport.Transaction txn) { - txn.completed.disconnect(on_auth_request_txn_completed); - txn.network_error.disconnect(on_auth_request_txn_error); - - if (!is_running()) - return; - - debug("EVENT: OAuth authentication request transaction completed; response = '%s'", - txn.get_response()); - - do_parse_token_info_from_auth_request(txn.get_response()); - } - - private void on_auth_request_txn_error(Publishing.RESTSupport.Transaction txn, - Spit.Publishing.PublishingError err) { - txn.completed.disconnect(on_auth_request_txn_completed); - txn.network_error.disconnect(on_auth_request_txn_error); - - if (!is_running()) - return; - - debug("EVENT: OAuth authentication request transaction caused a network error"); - host.post_error(err); - } - - - private void do_parse_token_info_from_auth_request(string response) { - debug("ACTION: parsing authorization request response '%s' into token and secret", response); - - string? oauth_token = null; - string? oauth_token_secret = null; - - string[] key_value_pairs = response.split("&"); - foreach (string pair in key_value_pairs) { - string[] split_pair = pair.split("="); - - if (split_pair.length != 2) - host.post_error(new Spit.Publishing.PublishingError.MALFORMED_RESPONSE( - _("“%s” isn’t a valid response to an OAuth authentication request"), response)); - - if (split_pair[0] == "oauth_token") - oauth_token = split_pair[1]; - else if (split_pair[0] == "oauth_token_secret") - oauth_token_secret = split_pair[1]; - } - - if (oauth_token == null || oauth_token_secret == null) - host.post_error(new Spit.Publishing.PublishingError.MALFORMED_RESPONSE( - _("“%s” isn’t a valid response to an OAuth authentication request"), response)); - - session.set_access_phase_credentials(oauth_token, oauth_token_secret); - } - - - - private void on_session_authenticated() { - if (!is_running()) - return; - - debug("EVENT: a fully authenticated session has become available"); - set_persistent_access_phase_token(session.get_access_phase_token()); - set_persistent_access_phase_token_secret(session.get_access_phase_token_secret()); - do_get_blogs(); - -} - - private void do_get_blogs() { - debug("ACTION: obtain all blogs of the tumblr user"); - UserInfoFetchTransaction txn = new UserInfoFetchTransaction(session); - txn.completed.connect(on_info_request_txn_completed); - txn.network_error.connect(on_info_request_txn_error); - - try { - txn.execute(); - } catch (Spit.Publishing.PublishingError err) { - host.post_error(err); - } - - - } - - - private void on_info_request_txn_completed(Publishing.RESTSupport.Transaction txn) { - txn.completed.disconnect(on_info_request_txn_completed); - txn.network_error.disconnect(on_info_request_txn_error); - - if (!is_running()) - return; - - debug("EVENT: user info request transaction completed; response = '%s'", - txn.get_response()); - do_parse_token_info_from_user_request(txn.get_response()); - do_show_publishing_options_pane(); - } - - - private void do_parse_token_info_from_user_request(string response) { - debug("ACTION: parsing info request response '%s' into list of available blogs", response); - try { - var parser = new Json.Parser(); - parser.load_from_data (response, -1); - var root_object = parser.get_root().get_object(); - this.username = root_object.get_object_member("response").get_object_member("user").get_string_member ("name"); - debug("Got user name: %s",username); - foreach (var blognode in root_object.get_object_member("response").get_object_member("user").get_array_member("blogs").get_elements ()) { - var blog = blognode.get_object (); - string name = blog.get_string_member ("name"); - string url = blog.get_string_member ("url").replace("http://","").replace("/",""); - debug("Got blog name: %s and url: %s", name, url); - this.blogs += new BlogEntry(name,url); - } - } catch (Error err) { - host.post_error(err); - } - } - - private void on_info_request_txn_error(Publishing.RESTSupport.Transaction txn, - Spit.Publishing.PublishingError err) { - txn.completed.disconnect(on_info_request_txn_completed); - txn.network_error.disconnect(on_info_request_txn_error); - - if (!is_running()) - return; - - session.deauthenticate(); - invalidate_persistent_session(); - debug("EVENT: user info request transaction caused a network error"); - host.post_error(err); - } - - private void do_show_publishing_options_pane() { - debug("ACTION: displaying publishing options pane"); - host.set_service_locked(false); - PublishingOptionsPane publishing_options_pane = - new PublishingOptionsPane(this, host.get_publishable_media_type(), this.sizes, this.blogs, this.username); - publishing_options_pane.publish.connect(on_publishing_options_pane_publish); - publishing_options_pane.logout.connect(on_publishing_options_pane_logout); - host.install_dialog_pane(publishing_options_pane); - } - - - - private void on_publishing_options_pane_publish() { - if (publishing_options_pane != null) { - publishing_options_pane.publish.disconnect(on_publishing_options_pane_publish); - publishing_options_pane.logout.disconnect(on_publishing_options_pane_logout); - } - - if (!is_running()) - return; - - debug("EVENT: user clicked the 'Publish' button in the publishing options pane"); - do_publish(); - } - - private void on_publishing_options_pane_logout() { - if (publishing_options_pane != null) { - publishing_options_pane.publish.disconnect(on_publishing_options_pane_publish); - publishing_options_pane.logout.disconnect(on_publishing_options_pane_logout); - } - - if (!is_running()) - return; - - debug("EVENT: user clicked the 'Logout' button in the publishing options pane"); - - do_logout(); - } - - public static int tumblr_date_time_compare_func(Spit.Publishing.Publishable a, - Spit.Publishing.Publishable b) { - return a.get_exposure_date_time().compare(b.get_exposure_date_time()); - } - - private void do_publish() { - debug("ACTION: uploading media items to remote server."); - - host.set_service_locked(true); - - progress_reporter = host.serialize_publishables(sizes[get_persistent_default_size()].size); - - // Serialization is a long and potentially cancellable operation, so before we use - // the publishables, make sure that the publishing interaction is still running. If it - // isn't the publishing environment may be partially torn down so do a short-circuit - // return - if (!is_running()) - return; - - // Sort publishables in reverse-chronological order. - Spit.Publishing.Publishable[] publishables = host.get_publishables(); - Gee.ArrayList<Spit.Publishing.Publishable> sorted_list = - new Gee.ArrayList<Spit.Publishing.Publishable>(); - foreach (Spit.Publishing.Publishable p in publishables) { - debug("ACTION: add publishable"); - sorted_list.add(p); - } - sorted_list.sort(tumblr_date_time_compare_func); - string blog_url = this.blogs[get_persistent_default_blog()].url; - - Uploader uploader = new Uploader(session, sorted_list.to_array(),blog_url); - uploader.upload_complete.connect(on_upload_complete); - uploader.upload_error.connect(on_upload_error); - uploader.upload(on_upload_status_updated); - } - - private void do_show_success_pane() { - debug("ACTION: showing success pane."); - - host.set_service_locked(false); - host.install_success_pane(); - } - - - private void on_upload_status_updated(int file_number, double completed_fraction) { - if (!is_running()) - return; - - debug("EVENT: uploader reports upload %.2f percent complete.", 100.0 * completed_fraction); - - assert(progress_reporter != null); - - progress_reporter(file_number, completed_fraction); - } - - private void on_upload_complete(Publishing.RESTSupport.BatchUploader uploader, - int num_published) { - if (!is_running()) - return; - - debug("EVENT: uploader reports upload complete; %d items published.", num_published); - - uploader.upload_complete.disconnect(on_upload_complete); - uploader.upload_error.disconnect(on_upload_error); - - do_show_success_pane(); - } - - private void on_upload_error(Publishing.RESTSupport.BatchUploader uploader, - Spit.Publishing.PublishingError err) { - if (!is_running()) - return; - - debug("EVENT: uploader reports upload error = '%s'.", err.message); - - uploader.upload_complete.disconnect(on_upload_complete); - uploader.upload_error.disconnect(on_upload_error); - - host.post_error(err); - } - - - private void do_logout() { - debug("ACTION: logging user out, deauthenticating session, and erasing stored credentials"); - - session.deauthenticate(); - invalidate_persistent_session(); - - running = false; - - attempt_start(); - } - - public void attempt_start() { - if (is_running()) - return; - - debug("TumblrPublisher: starting interaction."); - - running = true; - if (is_persistent_session_valid()) { - debug("attempt start: a persistent session is available; using it"); - - session.authenticate_from_persistent_credentials(get_persistent_access_phase_token(), - get_persistent_access_phase_token_secret()); - } else { - debug("attempt start: no persistent session available; showing login welcome pane"); - - do_show_authentication_pane(); - } - } - - public void start() { - if (is_running()) - return; - - if (was_started) - error(_("TumblrPublisher: start( ): can’t start; this publisher is not restartable.")); - - debug("TumblrPublisher: starting interaction."); - - attempt_start(); - } - - public void stop() { - debug("TumblrPublisher: stop( ) invoked."); - -// if (session != null) -// session.stop_transactions(); - - running = false; - } - - -// UI elements - -/** - * The authentication pane used when asking service URL, user name and password - * from the user. - */ -internal class AuthenticationPane : Spit.Publishing.DialogPane, Object { - public enum Mode { - INTRO, - FAILED_RETRY_USER - } - private static string INTRO_MESSAGE = _("Enter the username and password associated with your Tumblr account."); - private static string FAILED_RETRY_USER_MESSAGE = _("Username and/or password invalid. Please try again"); - - private Gtk.Box pane_widget = null; - private Gtk.Builder builder; - private Gtk.Entry username_entry; - private Gtk.Entry password_entry; - private Gtk.Button login_button; - - public signal void login(string user, string password); - - public AuthenticationPane(TumblrPublisher publisher, Mode mode = Mode.INTRO) { - this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - try { - builder = new Gtk.Builder(); - builder.add_from_resource (Resources.RESOURCE_PATH + "/tumblr_authentication_pane.ui"); - builder.connect_signals(null); - var content = builder.get_object ("content") as Gtk.Widget; - - Gtk.Label message_label = builder.get_object("message_label") as Gtk.Label; - switch (mode) { - case Mode.INTRO: - message_label.set_text(INTRO_MESSAGE); - break; - - case Mode.FAILED_RETRY_USER: - message_label.set_markup("<b>%s</b>\n\n%s".printf(_( - "Invalid User Name or Password"), FAILED_RETRY_USER_MESSAGE)); - break; - } - - username_entry = builder.get_object ("username_entry") as Gtk.Entry; - - password_entry = builder.get_object ("password_entry") as Gtk.Entry; - - - - login_button = builder.get_object("login_button") as Gtk.Button; - - username_entry.changed.connect(on_user_changed); - password_entry.changed.connect(on_password_changed); - login_button.clicked.connect(on_login_button_clicked); - - content.parent.remove (content); - pane_widget.add (content); - publisher.get_host().set_dialog_default_widget(login_button); - } catch (Error e) { - warning(_("Could not load UI: %s"), e.message); - } - } - - public Gtk.Widget get_default_widget() { - return login_button; - } - - private void on_login_button_clicked() { - login(username_entry.get_text(), - password_entry.get_text()); - } - - - private void on_user_changed() { - update_login_button_sensitivity(); - } - - private void on_password_changed() { - update_login_button_sensitivity(); - } - - private void update_login_button_sensitivity() { - login_button.set_sensitive(username_entry.text_length > 0 && - password_entry.text_length > 0); - } - - public Gtk.Widget get_widget() { - return pane_widget; - } - - public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() { - return Spit.Publishing.DialogPane.GeometryOptions.NONE; - } - - public void on_pane_installed() { - username_entry.grab_focus(); - password_entry.set_activates_default(true); - login_button.can_default = true; - update_login_button_sensitivity(); - } - - public void on_pane_uninstalled() { - } -} - - -/** - * The publishing options pane. - */ - - -internal class PublishingOptionsPane : Spit.Publishing.DialogPane, GLib.Object { - - - - private Gtk.Builder builder; - private Gtk.Box pane_widget = null; - private Gtk.Label upload_info_label = null; - private Gtk.Label size_label = null; - private Gtk.Label blog_label = null; - private Gtk.Button logout_button = null; - private Gtk.Button publish_button = null; - private Gtk.ComboBoxText size_combo = null; - private Gtk.ComboBoxText blog_combo = null; - private SizeEntry[] sizes = null; - private BlogEntry[] blogs = null; - private string username = ""; - private TumblrPublisher publisher = null; - private Spit.Publishing.Publisher.MediaType media_type; - - public signal void publish(); - public signal void logout(); - - public PublishingOptionsPane(TumblrPublisher publisher, Spit.Publishing.Publisher.MediaType media_type, SizeEntry[] sizes, BlogEntry[] blogs, string username) { - - this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - this.username = username; - this.publisher = publisher; - this.media_type = media_type; - this.sizes = sizes; - this.blogs=blogs; - - try { - builder = new Gtk.Builder(); - builder.add_from_resource (Resources.RESOURCE_PATH + - "/tumblr_publishing_options_pane.ui"); - builder.connect_signals(null); - - // pull in the necessary widgets from the glade file - pane_widget = (Gtk.Box) this.builder.get_object("tumblr_pane"); - upload_info_label = (Gtk.Label) this.builder.get_object("upload_info_label"); - logout_button = (Gtk.Button) this.builder.get_object("logout_button"); - publish_button = (Gtk.Button) this.builder.get_object("publish_button"); - size_combo = (Gtk.ComboBoxText) this.builder.get_object("size_combo"); - size_label = (Gtk.Label) this.builder.get_object("size_label"); - blog_combo = (Gtk.ComboBoxText) this.builder.get_object("blog_combo"); - blog_label = (Gtk.Label) this.builder.get_object("blog_label"); - - - string upload_label_text = _("You are logged into Tumblr as %s.\n\n").printf(this.username); - upload_info_label.set_label(upload_label_text); - - populate_blog_combo(); - blog_combo.changed.connect(on_blog_changed); - - if ((media_type != Spit.Publishing.Publisher.MediaType.VIDEO)) { - populate_size_combo(); - size_combo.changed.connect(on_size_changed); - } else { - // publishing -only- video - don't let the user manipulate the photo size choices. - size_combo.set_sensitive(false); - size_label.set_sensitive(false); - } - - logout_button.clicked.connect(on_logout_clicked); - publish_button.clicked.connect(on_publish_clicked); - } catch (Error e) { - warning(_("Could not load UI: %s"), e.message); - } - } - - - - - - private void on_logout_clicked() { - logout(); - } - - private void on_publish_clicked() { - - - publish(); - } - - - private void populate_blog_combo() { - if (blogs != null) { - foreach (BlogEntry b in blogs) - blog_combo.append_text(b.blog); - blog_combo.set_active(publisher.get_persistent_default_blog()); - } - } - - private void on_blog_changed() { - publisher.set_persistent_default_blog(blog_combo.get_active()); - } - - private void populate_size_combo() { - if (sizes != null) { - foreach (SizeEntry e in sizes) - size_combo.append_text(e.title); - size_combo.set_active(publisher.get_persistent_default_size()); - } - } - - private void on_size_changed() { - publisher.set_persistent_default_size(size_combo.get_active()); - } - - - protected void notify_publish() { - publish(); - } - - protected void notify_logout() { - logout(); - } - - public Gtk.Widget get_widget() { - return pane_widget; - } - - public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() { - return Spit.Publishing.DialogPane.GeometryOptions.NONE; - } - - public void on_pane_installed() { - publish.connect(notify_publish); - logout.connect(notify_logout); - } - - public void on_pane_uninstalled() { - publish.disconnect(notify_publish); - logout.disconnect(notify_logout); - } -} - - -// REST support classes -internal class Transaction : Publishing.RESTSupport.Transaction { - public Transaction(Session session, Publishing.RESTSupport.HttpMethod method = - Publishing.RESTSupport.HttpMethod.POST) { - base(session, method); - - } - - public Transaction.with_uri(Session session, string uri, - Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST) { - base.with_endpoint_url(session, uri, method); - - add_argument("oauth_nonce", session.get_oauth_nonce()); - add_argument("oauth_signature_method", "HMAC-SHA1"); - add_argument("oauth_version", "1.0"); - add_argument("oauth_timestamp", session.get_oauth_timestamp()); - add_argument("oauth_consumer_key", API_KEY); - if (session.get_access_phase_token() != null) { - add_argument("oauth_token", session.get_access_phase_token()); - } - } - - public override void execute() throws Spit.Publishing.PublishingError { - ((Session) get_parent_session()).sign_transaction(this); - - base.execute(); - } - -} - - -internal class AccessTokenFetchTransaction : Transaction { - public AccessTokenFetchTransaction(Session session, string username, string password) { - base.with_uri(session, "https://www.tumblr.com/oauth/access_token", - Publishing.RESTSupport.HttpMethod.POST); - add_argument("x_auth_username", Soup.URI.encode(username, ENCODE_RFC_3986_EXTRA)); - add_argument("x_auth_password", password); - add_argument("x_auth_mode", "client_auth"); - } -} - -internal class UserInfoFetchTransaction : Transaction { - public UserInfoFetchTransaction(Session session) { - base.with_uri(session, "https://api.tumblr.com/v2/user/info", - Publishing.RESTSupport.HttpMethod.POST); - } -} - - -internal class UploadTransaction : Publishing.RESTSupport.UploadTransaction { - private Session session; - private Publishing.RESTSupport.Argument[] auth_header_fields; - - -//Workaround for Soup.URI.encode() to support binary data (i.e. string with \0) - private string encode( uint8[] data ){ - var s = new StringBuilder(); - char[] bytes = new char[2]; - bytes[1] = 0; - foreach( var byte in data ) - { - if(byte == 0) { - s.append( "%00" ); - } else { - bytes[0] = (char)byte; - s.append( Soup.URI.encode((string) bytes, ENCODE_RFC_3986_EXTRA) ); - } - } - return s.str; - } - - - public UploadTransaction(Session session,Spit.Publishing.Publishable publishable, string blog_url) { - debug("Init upload transaction"); - base.with_endpoint_url(session, publishable,"https://api.tumblr.com/v2/blog/%s/post".printf(blog_url) ); - this.session = session; - - } - - - - public void add_authorization_header_field(string key, string value) { - auth_header_fields += new Publishing.RESTSupport.Argument(key, value); - } - - public Publishing.RESTSupport.Argument[] get_authorization_header_fields() { - return auth_header_fields; - } - - public string get_authorization_header_string() { - string result = "OAuth "; - - for (int i = 0; i < auth_header_fields.length; i++) { - result += auth_header_fields[i].key; - result += "="; - result += ("\"" + auth_header_fields[i].value + "\""); - - if (i < auth_header_fields.length - 1) - result += ", "; - } - - return result; - } - - public override void execute() throws Spit.Publishing.PublishingError { - add_authorization_header_field("oauth_nonce", session.get_oauth_nonce()); - add_authorization_header_field("oauth_signature_method", "HMAC-SHA1"); - add_authorization_header_field("oauth_version", "1.0"); - add_authorization_header_field("oauth_timestamp", session.get_oauth_timestamp()); - add_authorization_header_field("oauth_consumer_key", API_KEY); - add_authorization_header_field("oauth_token", session.get_access_phase_token()); - - - string payload; - size_t payload_length; - try { - FileUtils.get_contents(base.publishable.get_serialized_file().get_path(), out payload, - out payload_length); - - string reqdata = this.encode(payload.data[0:payload_length]); - - - - add_argument("data[0]", reqdata); - add_argument("type", "photo"); - string[] keywords = base.publishable.get_publishing_keywords(); - string tags = ""; - if (keywords != null) { - tags = string.joinv (",", keywords); - } - add_argument("tags", Soup.URI.encode(tags, ENCODE_RFC_3986_EXTRA)); - - } catch (FileError e) { - throw new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR( - _("A temporary file needed for publishing is unavailable")); - - } - - - session.sign_transaction(this); - - string authorization_header = get_authorization_header_string(); - - debug("executing upload transaction: authorization header string = '%s'", - authorization_header); - add_header("Authorization", authorization_header); - - Publishing.RESTSupport.Argument[] request_arguments = get_arguments(); - assert(request_arguments.length > 0); - - string request_data = ""; - for (int i = 0; i < request_arguments.length; i++) { - request_data += (request_arguments[i].key + "=" + request_arguments[i].value); - if (i < request_arguments.length - 1) - request_data += "&"; - } - Soup.Message outbound_message = new Soup.Message( "POST", get_endpoint_url()); - outbound_message.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, request_data.data); - - // TODO: there must be a better way to iterate over a map - Gee.MapIterator<string, string> i = base.message_headers.map_iterator(); - bool cont = i.next(); - while(cont) { - outbound_message.request_headers.append(i.get_key(), i.get_value()); - cont = i.next(); - } - set_message(outbound_message); - - set_is_executed(true); - - send(); - } -} - - - -internal class Uploader : Publishing.RESTSupport.BatchUploader { - private string blog_url = ""; - public Uploader(Session session, Spit.Publishing.Publishable[] publishables, string blog_url) { - base(session, publishables); - this.blog_url=blog_url; - - } - - - protected override Publishing.RESTSupport.Transaction create_transaction( - Spit.Publishing.Publishable publishable) { - debug("Create upload transaction"); - return new UploadTransaction((Session) get_session(), get_current_publishable(), this.blog_url); - - } -} - -/** - * Session class that keeps track of the authentication status and of the - * user token tumblr. - */ -internal class Session : Publishing.RESTSupport.Session { - private string? access_phase_token = null; - private string? access_phase_token_secret = null; - - - public Session() { - base(ENDPOINT_URL); - } - - public override bool is_authenticated() { - return (access_phase_token != null && access_phase_token_secret != null); - } - - public void authenticate_from_persistent_credentials(string token, string secret) { - this.access_phase_token = token; - this.access_phase_token_secret = secret; - - - authenticated(); - } - - public void deauthenticate() { - access_phase_token = null; - access_phase_token_secret = null; - } - - public void sign_transaction(Publishing.RESTSupport.Transaction txn) { - string http_method = txn.get_method().to_string(); - - debug("signing transaction with parameters:"); - debug("HTTP method = " + http_method); - string? signing_key = null; - if (access_phase_token_secret != null) { - debug("access phase token secret available; using it as signing key"); - - signing_key = API_SECRET + "&" + this.get_access_phase_token_secret(); - } else { - debug("Access phase token secret not available; using API " + - "key as signing key"); - - signing_key = API_SECRET + "&"; - } - - - Publishing.RESTSupport.Argument[] base_string_arguments = txn.get_arguments(); - - UploadTransaction? upload_txn = txn as UploadTransaction; - if (upload_txn != null) { - debug("this transaction is an UploadTransaction; including Authorization header " + - "fields in signature base string"); - - Publishing.RESTSupport.Argument[] auth_header_args = - upload_txn.get_authorization_header_fields(); - - foreach (Publishing.RESTSupport.Argument arg in auth_header_args) - base_string_arguments += arg; - } - - Publishing.RESTSupport.Argument[] sorted_args = - Publishing.RESTSupport.Argument.sort(base_string_arguments); - - string arguments_string = ""; - for (int i = 0; i < sorted_args.length; i++) { - arguments_string += (sorted_args[i].key + "=" + sorted_args[i].value); - if (i < sorted_args.length - 1) - arguments_string += "&"; - } - - - string signature_base_string = http_method + "&" + Soup.URI.encode( - txn.get_endpoint_url(), ENCODE_RFC_3986_EXTRA) + "&" + - Soup.URI.encode(arguments_string, ENCODE_RFC_3986_EXTRA); - - debug("signature base string = '%s'", signature_base_string); - debug("signing key = '%s'", signing_key); - - // compute the signature - string signature = Publishing.RESTSupport.hmac_sha1(signing_key, signature_base_string); - debug("signature = '%s'", signature); - signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); - - debug("signature after RFC encode = '%s'", signature); - - if (upload_txn != null) - upload_txn.add_authorization_header_field("oauth_signature", signature); - else - txn.add_argument("oauth_signature", signature); - - - } - - public void set_access_phase_credentials(string token, string secret) { - this.access_phase_token = token; - this.access_phase_token_secret = secret; - - - authenticated(); - } - - public string get_access_phase_token() { - return access_phase_token; - } - - - public string get_access_phase_token_secret() { - return access_phase_token_secret; - } - - public string get_oauth_nonce() { - TimeVal currtime = TimeVal(); - currtime.get_current_time(); - - return Checksum.compute_for_string(ChecksumType.MD5, currtime.tv_sec.to_string() + - currtime.tv_usec.to_string()); - } - - public string get_oauth_timestamp() { - return GLib.get_real_time().to_string().substring(0, 10); - } - -} - - -} //class TumblrPublisher - -} //namespace Publishing.Tumblr - diff --git a/plugins/shotwell-publishing-extras/YandexPublishing.c b/plugins/shotwell-publishing-extras/YandexPublishing.c index 492f100..10482e3 100644 --- a/plugins/shotwell-publishing-extras/YandexPublishing.c +++ b/plugins/shotwell-publishing-extras/YandexPublishing.c @@ -1012,7 +1012,7 @@ static void publishing_yandex_web_auth_pane_real_constructed (GObject* base) { #line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == G_REGEX_ERROR) { #line 1015 "YandexPublishing.c" - goto __catch39_g_regex_error; + goto __catch32_g_regex_error; } #line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -1034,8 +1034,8 @@ static void publishing_yandex_web_auth_pane_real_constructed (GObject* base) { _g_regex_unref0 (_tmp0_); #line 1036 "YandexPublishing.c" } - goto __finally39; - __catch39_g_regex_error: + goto __finally32; + __catch32_g_regex_error: { GError* e = NULL; #line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -1048,7 +1048,7 @@ static void publishing_yandex_web_auth_pane_real_constructed (GObject* base) { _g_error_free0 (e); #line 1050 "YandexPublishing.c" } - __finally39: + __finally32: #line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -1761,7 +1761,7 @@ PublishingYandexPublishingOptionsPane* publishing_yandex_publishing_options_pane #line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1764 "YandexPublishing.c" - goto __catch40_g_error; + goto __catch33_g_error; } #line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" _tmp4_ = self->priv->builder; @@ -1902,8 +1902,8 @@ PublishingYandexPublishingOptionsPane* publishing_yandex_publishing_options_pane _g_object_unref0 (content); #line 1904 "YandexPublishing.c" } - goto __finally40; - __catch40_g_error: + goto __finally33; + __catch33_g_error: { GError* e = NULL; GError* _tmp38_; @@ -1922,7 +1922,7 @@ PublishingYandexPublishingOptionsPane* publishing_yandex_publishing_options_pane _g_error_free0 (e); #line 1924 "YandexPublishing.c" } - __finally40: + __finally33: #line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -2532,7 +2532,7 @@ PublishingYandexUploadTransaction* publishing_yandex_upload_transaction_construc #line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == G_FILE_ERROR) { #line 2535 "YandexPublishing.c" - goto __catch41_g_file_error; + goto __catch34_g_file_error; } #line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" _g_free0 (photo_data); @@ -2547,8 +2547,8 @@ PublishingYandexUploadTransaction* publishing_yandex_upload_transaction_construc #line 2548 "YandexPublishing.c" } } - goto __finally41; - __catch41_g_file_error: + goto __finally34; + __catch34_g_file_error: { GError* e = NULL; SpitPublishingPublishable* _tmp33_; @@ -2586,7 +2586,7 @@ PublishingYandexUploadTransaction* publishing_yandex_upload_transaction_construc _g_error_free0 (e); #line 2588 "YandexPublishing.c" } - __finally41: + __finally34: #line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -3408,7 +3408,7 @@ static void publishing_yandex_yandex_publisher_album_creation_complete (Publishi #line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 3411 "YandexPublishing.c" - goto __catch42_spit_publishing_publishing_error; + goto __catch35_spit_publishing_publishing_error; } #line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -3419,8 +3419,8 @@ static void publishing_yandex_yandex_publisher_album_creation_complete (Publishi #line 3420 "YandexPublishing.c" } } - goto __finally42; - __catch42_spit_publishing_publishing_error: + goto __finally35; + __catch35_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp7_; @@ -3441,7 +3441,7 @@ static void publishing_yandex_yandex_publisher_album_creation_complete (Publishi return; #line 3443 "YandexPublishing.c" } - __finally42: + __finally35: #line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -3540,7 +3540,7 @@ static void publishing_yandex_yandex_publisher_create_destination_album (Publish #line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 3542 "YandexPublishing.c" - goto __catch43_spit_publishing_publishing_error; + goto __catch36_spit_publishing_publishing_error; } #line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" _publishing_rest_support_transaction_unref0 (t); @@ -3557,8 +3557,8 @@ static void publishing_yandex_yandex_publisher_create_destination_album (Publish #line 3557 "YandexPublishing.c" } } - goto __finally43; - __catch43_spit_publishing_publishing_error: + goto __finally36; + __catch36_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp7_; @@ -3577,7 +3577,7 @@ static void publishing_yandex_yandex_publisher_create_destination_album (Publish _g_error_free0 (err); #line 3578 "YandexPublishing.c" } - __finally43: + __finally36: #line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -4052,7 +4052,7 @@ void publishing_yandex_yandex_publisher_service_get_album_list_complete (Publish #line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4053 "YandexPublishing.c" - goto __catch44_spit_publishing_publishing_error; + goto __catch37_spit_publishing_publishing_error; } #line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -4063,8 +4063,8 @@ void publishing_yandex_yandex_publisher_service_get_album_list_complete (Publish #line 4062 "YandexPublishing.c" } } - goto __finally44; - __catch44_spit_publishing_publishing_error: + goto __finally37; + __catch37_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp10_; @@ -4083,7 +4083,7 @@ void publishing_yandex_yandex_publisher_service_get_album_list_complete (Publish _g_error_free0 (err); #line 4083 "YandexPublishing.c" } - __finally44: + __finally37: #line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -4159,7 +4159,7 @@ void publishing_yandex_yandex_publisher_service_get_album_list (PublishingYandex #line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4160 "YandexPublishing.c" - goto __catch45_spit_publishing_publishing_error; + goto __catch38_spit_publishing_publishing_error; } #line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" _publishing_rest_support_transaction_unref0 (t); @@ -4172,8 +4172,8 @@ void publishing_yandex_yandex_publisher_service_get_album_list (PublishingYandex #line 4171 "YandexPublishing.c" } } - goto __finally45; - __catch45_spit_publishing_publishing_error: + goto __finally38; + __catch38_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp5_; @@ -4192,7 +4192,7 @@ void publishing_yandex_yandex_publisher_service_get_album_list (PublishingYandex _g_error_free0 (err); #line 4192 "YandexPublishing.c" } - __finally45: + __finally38: #line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -4323,7 +4323,7 @@ void publishing_yandex_yandex_publisher_fetch_account_complete (PublishingYandex #line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4324 "YandexPublishing.c" - goto __catch46_spit_publishing_publishing_error; + goto __catch39_spit_publishing_publishing_error; } #line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -4508,8 +4508,8 @@ void publishing_yandex_yandex_publisher_fetch_account_complete (PublishingYandex _publishing_rest_support_xml_document_unref0 (doc); #line 4508 "YandexPublishing.c" } - goto __finally46; - __catch46_spit_publishing_publishing_error: + goto __finally39; + __catch39_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp40_; @@ -4528,7 +4528,7 @@ void publishing_yandex_yandex_publisher_fetch_account_complete (PublishingYandex _g_error_free0 (err); #line 4528 "YandexPublishing.c" } - __finally46: + __finally39: #line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" @@ -4578,7 +4578,7 @@ void publishing_yandex_yandex_publisher_fetch_account_information (PublishingYan #line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4579 "YandexPublishing.c" - goto __catch47_spit_publishing_publishing_error; + goto __catch40_spit_publishing_publishing_error; } #line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" _publishing_rest_support_transaction_unref0 (t); @@ -4591,8 +4591,8 @@ void publishing_yandex_yandex_publisher_fetch_account_information (PublishingYan #line 4590 "YandexPublishing.c" } } - goto __finally47; - __catch47_spit_publishing_publishing_error: + goto __finally40; + __catch40_spit_publishing_publishing_error: { GError* err = NULL; SpitPublishingPluginHost* _tmp4_; @@ -4611,7 +4611,7 @@ void publishing_yandex_yandex_publisher_fetch_account_information (PublishingYan _g_error_free0 (err); #line 4611 "YandexPublishing.c" } - __finally47: + __finally40: #line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/YandexPublishing.vala" diff --git a/plugins/shotwell-publishing-extras/gallery3_publishing_options_pane.ui b/plugins/shotwell-publishing-extras/gallery3_publishing_options_pane.ui index 8662f8c..f27fd2d 100644 --- a/plugins/shotwell-publishing-extras/gallery3_publishing_options_pane.ui +++ b/plugins/shotwell-publishing-extras/gallery3_publishing_options_pane.ui @@ -156,7 +156,7 @@ <property name="can_focus">False</property> <items> <item translatable="yes">Original size</item> - <item translatable="yes">Width or height</item> + <item translatable="yes">Longest edge</item> </items> </object> <packing> diff --git a/plugins/shotwell-publishing-extras/meson.build b/plugins/shotwell-publishing-extras/meson.build new file mode 100644 index 0000000..34f3e12 --- /dev/null +++ b/plugins/shotwell-publishing-extras/meson.build @@ -0,0 +1,21 @@ +shotwell_publishing_extra_sources = [ + 'GalleryConnector.vala', + 'RajcePublishing.vala', + 'shotwell-publishing-extras.vala', + 'YandexPublishing.vala' + ] + +shotwell_publishing_extra_resources = gnome.compile_resources('publishing-extra-resource', + 'org.gnome.Shotwell.Publishing.Extras.gresource.xml') + +shared_module('shotwell-publishing-extras', + shotwell_publishing_extra_sources + shotwell_publishing_extra_resources, + dependencies : [gee, gtk, xml, soup, gdk_pixbuf, sw_plugin, + sw_plugin_common_dep, json_glib, webkit], + vala_args : [ + '--gresources', 'org.gnome.Shotwell.Publishing.Extras.gresource.xml' + ], + c_args : ['-DPLUGIN_RESOURCE_PATH="/org/gnome/Shotwell/Publishing/Extras"', + '-DGCR_API_SUBJECT_TO_CHANGE'], + install: true, + install_dir : shotwell_plugin_dir) diff --git a/plugins/shotwell-publishing-extras/org.gnome.Shotwell.Publishing.Extras.gresource.xml b/plugins/shotwell-publishing-extras/org.gnome.Shotwell.Publishing.Extras.gresource.xml index ab8a367..5916f82 100644 --- a/plugins/shotwell-publishing-extras/org.gnome.Shotwell.Publishing.Extras.gresource.xml +++ b/plugins/shotwell-publishing-extras/org.gnome.Shotwell.Publishing.Extras.gresource.xml @@ -3,13 +3,10 @@ <gresource prefix="/org/gnome/Shotwell/Publishing/Extras"> <file>gallery3.png</file> <file>rajce.png</file> - <file>tumblr.png</file> <file>gallery3_authentication_pane.ui</file> <file>gallery3_publishing_options_pane.ui</file> <file>rajce_authentication_pane.ui</file> <file>rajce_publishing_options_pane.ui</file> - <file>tumblr_authentication_pane.ui</file> - <file>tumblr_publishing_options_pane.ui</file> <file>yandex_publish_model.ui</file> </gresource> </gresources> diff --git a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c index 04cf9d3..c4556dd 100644 --- a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c +++ b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c @@ -27,37 +27,6 @@ typedef struct _ShotwellPublishingExtraServices ShotwellPublishingExtraServices; typedef struct _ShotwellPublishingExtraServicesClass ShotwellPublishingExtraServicesClass; typedef struct _ShotwellPublishingExtraServicesPrivate ShotwellPublishingExtraServicesPrivate; -#define TYPE_YANDEX_SERVICE (yandex_service_get_type ()) -#define YANDEX_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_YANDEX_SERVICE, YandexService)) -#define YANDEX_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_YANDEX_SERVICE, YandexServiceClass)) -#define IS_YANDEX_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_YANDEX_SERVICE)) -#define IS_YANDEX_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_YANDEX_SERVICE)) -#define YANDEX_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_YANDEX_SERVICE, YandexServiceClass)) - -typedef struct _YandexService YandexService; -typedef struct _YandexServiceClass YandexServiceClass; - -#define TYPE_TUMBLR_SERVICE (tumblr_service_get_type ()) -#define TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TUMBLR_SERVICE, TumblrService)) -#define TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) -#define IS_TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TUMBLR_SERVICE)) -#define IS_TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TUMBLR_SERVICE)) -#define TUMBLR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) - -typedef struct _TumblrService TumblrService; -typedef struct _TumblrServiceClass TumblrServiceClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_RAJCE_SERVICE (rajce_service_get_type ()) -#define RAJCE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAJCE_SERVICE, RajceService)) -#define RAJCE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAJCE_SERVICE, RajceServiceClass)) -#define IS_RAJCE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAJCE_SERVICE)) -#define IS_RAJCE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAJCE_SERVICE)) -#define RAJCE_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAJCE_SERVICE, RajceServiceClass)) - -typedef struct _RajceService RajceService; -typedef struct _RajceServiceClass RajceServiceClass; - #define TYPE_GALLERY3_SERVICE (gallery3_service_get_type ()) #define GALLERY3_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GALLERY3_SERVICE, Gallery3Service)) #define GALLERY3_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GALLERY3_SERVICE, Gallery3ServiceClass)) @@ -67,6 +36,7 @@ typedef struct _RajceServiceClass RajceServiceClass; typedef struct _Gallery3Service Gallery3Service; typedef struct _Gallery3ServiceClass Gallery3ServiceClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _ShotwellPublishingExtraServices { GObject parent_instance; @@ -94,22 +64,10 @@ enum { }; ShotwellPublishingExtraServices* shotwell_publishing_extra_services_new (GFile* module_file); ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (GType object_type, GFile* module_file); -YandexService* yandex_service_new (void); -YandexService* yandex_service_construct (GType object_type); -GType yandex_service_get_type (void) G_GNUC_CONST; -static void _vala_array_add14 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); -TumblrService* tumblr_service_new (GFile* resource_directory); -TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory); -GType tumblr_service_get_type (void) G_GNUC_CONST; -static void _vala_array_add15 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); -RajceService* rajce_service_new (GFile* resource_directory); -RajceService* rajce_service_construct (GType object_type, GFile* resource_directory); -GType rajce_service_get_type (void) G_GNUC_CONST; -static void _vala_array_add16 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); Gallery3Service* gallery3_service_new (GFile* resource_directory); Gallery3Service* gallery3_service_construct (GType object_type, GFile* resource_directory); GType gallery3_service_get_type (void) G_GNUC_CONST; -static void _vala_array_add17 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); +static void _vala_array_add14 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); static const gchar* shotwell_publishing_extra_services_real_get_module_name (SpitModule* base); static const gchar* shotwell_publishing_extra_services_real_get_version (SpitModule* base); static const gchar* shotwell_publishing_extra_services_real_get_id (SpitModule* base); @@ -121,70 +79,19 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify static void _vala_array_add14 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - if ((*length) == (*size)) { -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 131 "shotwell-publishing-extras.c" - } -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[(*length)++] = value; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[*length] = NULL; -#line 137 "shotwell-publishing-extras.c" -} - - -static void _vala_array_add15 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - if ((*length) == (*size)) { -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 148 "shotwell-publishing-extras.c" - } -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[(*length)++] = value; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[*length] = NULL; -#line 154 "shotwell-publishing-extras.c" -} - - -static void _vala_array_add16 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" if ((*length) == (*size)) { #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" *size = (*size) ? (2 * (*size)) : 4; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 165 "shotwell-publishing-extras.c" +#line 89 "shotwell-publishing-extras.c" } #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" (*array)[(*length)++] = value; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" (*array)[*length] = NULL; -#line 171 "shotwell-publishing-extras.c" -} - - -static void _vala_array_add17 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - if ((*length) == (*size)) { -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 182 "shotwell-publishing-extras.c" - } -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[(*length)++] = value; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - (*array)[*length] = NULL; -#line 188 "shotwell-publishing-extras.c" +#line 95 "shotwell-publishing-extras.c" } @@ -192,134 +99,79 @@ ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (G ShotwellPublishingExtraServices * self = NULL; SpitPluggable** _tmp0_; gint _tmp0__length1; - YandexService* _tmp1_; - SpitPluggable** _tmp2_; - gint _tmp2__length1; + GFile* _tmp1_; + GFile* _tmp2_; GFile* _tmp3_; - GFile* _tmp4_; - GFile* _tmp5_; - TumblrService* _tmp6_; - SpitPluggable** _tmp7_; - gint _tmp7__length1; - GFile* _tmp8_; - GFile* _tmp9_; - GFile* _tmp10_; - RajceService* _tmp11_; - SpitPluggable** _tmp12_; - gint _tmp12__length1; - GFile* _tmp13_; - GFile* _tmp14_; - GFile* _tmp15_; - Gallery3Service* _tmp16_; + Gallery3Service* _tmp4_; #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" g_return_val_if_fail (G_IS_FILE (module_file), NULL); #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self = (ShotwellPublishingExtraServices*) g_object_new (object_type, NULL); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp0_ = self->priv->pluggables; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp0__length1 = self->priv->pluggables_length1; -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp1_ = yandex_service_new (); -#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _vala_array_add14 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp2_ = self->priv->pluggables; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp2__length1 = self->priv->pluggables_length1; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp3_ = module_file; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp4_ = g_file_get_parent (_tmp3_); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp5_ = _tmp4_; -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp6_ = tumblr_service_new (_tmp5_); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _vala_array_add15 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _g_object_unref0 (_tmp5_); #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp7_ = self->priv->pluggables; + _tmp0_ = self->priv->pluggables; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp7__length1 = self->priv->pluggables_length1; + _tmp0__length1 = self->priv->pluggables_length1; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp8_ = module_file; + _tmp1_ = module_file; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp9_ = g_file_get_parent (_tmp8_); + _tmp2_ = g_file_get_parent (_tmp1_); #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp10_ = _tmp9_; + _tmp3_ = _tmp2_; #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp11_ = rajce_service_new (_tmp10_); + _tmp4_ = gallery3_service_new (_tmp3_); #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _vala_array_add16 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); + _vala_array_add14 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); #line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _g_object_unref0 (_tmp10_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp12_ = self->priv->pluggables; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp12__length1 = self->priv->pluggables_length1; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp13_ = module_file; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp14_ = g_file_get_parent (_tmp13_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp15_ = _tmp14_; -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _tmp16_ = gallery3_service_new (_tmp15_); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _vala_array_add17 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" - _g_object_unref0 (_tmp15_); + _g_object_unref0 (_tmp3_); #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return self; -#line 277 "shotwell-publishing-extras.c" +#line 129 "shotwell-publishing-extras.c" } ShotwellPublishingExtraServices* shotwell_publishing_extra_services_new (GFile* module_file) { #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return shotwell_publishing_extra_services_construct (TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, module_file); -#line 284 "shotwell-publishing-extras.c" +#line 136 "shotwell-publishing-extras.c" } static const gchar* shotwell_publishing_extra_services_real_get_module_name (SpitModule* base) { ShotwellPublishingExtraServices * self; const gchar* result = NULL; -#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServices); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" result = _ ("Shotwell Extra Publishing Services"); -#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return result; -#line 297 "shotwell-publishing-extras.c" +#line 149 "shotwell-publishing-extras.c" } static const gchar* shotwell_publishing_extra_services_real_get_version (SpitModule* base) { ShotwellPublishingExtraServices * self; const gchar* result = NULL; -#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServices); -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" result = _VERSION; -#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return result; -#line 310 "shotwell-publishing-extras.c" +#line 162 "shotwell-publishing-extras.c" } static const gchar* shotwell_publishing_extra_services_real_get_id (SpitModule* base) { ShotwellPublishingExtraServices * self; const gchar* result = NULL; -#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServices); -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" result = "org.yorba.shotwell.publishing.extras"; -#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return result; -#line 323 "shotwell-publishing-extras.c" +#line 175 "shotwell-publishing-extras.c" } @@ -330,27 +182,27 @@ static SpitPluggable** shotwell_publishing_extra_services_real_get_pluggables (S gint _tmp0__length1; SpitPluggable** _tmp1_; gint _tmp1__length1; -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServices); -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp0_ = self->priv->pluggables; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp0__length1 = self->priv->pluggables_length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp1_ = _tmp0_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp1__length1 = _tmp0__length1; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" if (result_length1) { -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" *result_length1 = _tmp1__length1; -#line 348 "shotwell-publishing-extras.c" +#line 200 "shotwell-publishing-extras.c" } -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" result = _tmp1_; -#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return result; -#line 354 "shotwell-publishing-extras.c" +#line 206 "shotwell-publishing-extras.c" } @@ -361,7 +213,7 @@ static void shotwell_publishing_extra_services_class_init (ShotwellPublishingExt g_type_class_add_private (klass, sizeof (ShotwellPublishingExtraServicesPrivate)); #line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" G_OBJECT_CLASS (klass)->finalize = shotwell_publishing_extra_services_finalize; -#line 365 "shotwell-publishing-extras.c" +#line 217 "shotwell-publishing-extras.c" } @@ -376,7 +228,7 @@ static void shotwell_publishing_extra_services_spit_module_interface_init (SpitM iface->get_id = (const gchar* (*) (SpitModule *)) shotwell_publishing_extra_services_real_get_id; #line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" iface->get_pluggables = (SpitPluggable** (*) (SpitModule *, int*)) shotwell_publishing_extra_services_real_get_pluggables; -#line 380 "shotwell-publishing-extras.c" +#line 232 "shotwell-publishing-extras.c" } @@ -392,7 +244,7 @@ static void shotwell_publishing_extra_services_instance_init (ShotwellPublishing self->priv->pluggables_length1 = 0; #line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" self->priv->_pluggables_size_ = self->priv->pluggables_length1; -#line 396 "shotwell-publishing-extras.c" +#line 248 "shotwell-publishing-extras.c" } @@ -404,7 +256,7 @@ static void shotwell_publishing_extra_services_finalize (GObject * obj) { self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL); #line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" G_OBJECT_CLASS (shotwell_publishing_extra_services_parent_class)->finalize (obj); -#line 408 "shotwell-publishing-extras.c" +#line 260 "shotwell-publishing-extras.c" } @@ -432,51 +284,51 @@ SpitModule* spit_entry_point (SpitEntryPointParams* params) { ShotwellPublishingExtraServices* _tmp5_ = NULL; SpitEntryPointParams* _tmp6_; gint _tmp7_; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp0_ = params; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp1_ = (*_tmp0_).host_min_spit_interface; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp2_ = params; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp3_ = (*_tmp2_).host_max_spit_interface; -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" (*params).module_spit_interface = _tmp4_; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp6_ = params; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp7_ = (*_tmp6_).module_spit_interface; -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) { -#line 454 "shotwell-publishing-extras.c" +#line 306 "shotwell-publishing-extras.c" SpitEntryPointParams* _tmp8_; GFile* _tmp9_; ShotwellPublishingExtraServices* _tmp10_; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp8_ = params; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp9_ = (*_tmp8_).module_file; -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp10_ = shotwell_publishing_extra_services_new (_tmp9_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _g_object_unref0 (_tmp5_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp5_ = _tmp10_; -#line 468 "shotwell-publishing-extras.c" +#line 320 "shotwell-publishing-extras.c" } else { -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _g_object_unref0 (_tmp5_); -#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" _tmp5_ = NULL; -#line 474 "shotwell-publishing-extras.c" +#line 326 "shotwell-publishing-extras.c" } -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule); -#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala" return result; -#line 480 "shotwell-publishing-extras.c" +#line 332 "shotwell-publishing-extras.c" } diff --git a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala index 2f47771..fb622fa 100644 --- a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala +++ b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala @@ -14,10 +14,6 @@ private class ShotwellPublishingExtraServices : Object, Spit.Module { pluggables += new YandexService(); #endif -#if HAVE_TUMBLR - pluggables += new TumblrService(module_file.get_parent()); -#endif - #if HAVE_RAJCE pluggables += new RajceService(module_file.get_parent()); #endif diff --git a/plugins/shotwell-publishing/FacebookPublishing.c b/plugins/shotwell-publishing/FacebookPublishing.c index a1d00b4..12575cb 100644 --- a/plugins/shotwell-publishing/FacebookPublishing.c +++ b/plugins/shotwell-publishing/FacebookPublishing.c @@ -575,7 +575,7 @@ enum { PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_new (void); PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_construct (GType object_type); void publishing_facebook_publishing_parameters_add_album (PublishingFacebookPublishingParameters* self, const gchar* name, const gchar* id); -static void _vala_array_add6 (PublishingFacebookAlbum** * array, int* length, int* size, PublishingFacebookAlbum* value); +static void _vala_array_add7 (PublishingFacebookAlbum** * array, int* length, int* size, PublishingFacebookAlbum* value); void publishing_facebook_publishing_parameters_set_target_album_by_name (PublishingFacebookPublishingParameters* self, const gchar* name); gchar* publishing_facebook_publishing_parameters_get_target_album_name (PublishingFacebookPublishingParameters* self); gchar* publishing_facebook_publishing_parameters_get_target_album_id (PublishingFacebookPublishingParameters* self); @@ -709,11 +709,11 @@ static void _publishing_facebook_publishing_options_pane_on_size_changed_gtk_com static gboolean publishing_facebook_publishing_options_pane_publishing_photos (PublishingFacebookPublishingOptionsPane* self); static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_new (const gchar* description, const gchar* privacy_setting); static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, const gchar* privacy_setting); -static void _vala_array_add7 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); static void _vala_array_add9 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); -static void _vala_array_add10 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value); +static void _vala_array_add10 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); static void _vala_array_add11 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value); +static void _vala_array_add12 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value); void publishing_facebook_publishing_options_pane_installed (PublishingFacebookPublishingOptionsPane* self); static void publishing_facebook_publishing_options_pane_notify_logout (PublishingFacebookPublishingOptionsPane* self); static void publishing_facebook_publishing_options_pane_notify_publish (PublishingFacebookPublishingOptionsPane* self, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution); @@ -1544,7 +1544,7 @@ static gpointer _publishing_facebook_album_ref0 (gpointer self) { } -static void _vala_array_add6 (PublishingFacebookAlbum** * array, int* length, int* size, PublishingFacebookAlbum* value) { +static void _vala_array_add7 (PublishingFacebookAlbum** * array, int* length, int* size, PublishingFacebookAlbum* value) { #line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -1612,7 +1612,7 @@ void publishing_facebook_publishing_parameters_add_album (PublishingFacebookPubl #line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp6_ = _publishing_facebook_album_ref0 (new_album); #line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add6 (&self->albums, &self->albums_length1, &self->_albums_size_, _tmp6_); + _vala_array_add7 (&self->albums, &self->albums_length1, &self->_albums_size_, _tmp6_); #line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _publishing_facebook_album_unref0 (new_album); #line 1619 "FacebookPublishing.c" @@ -5278,7 +5278,7 @@ static void publishing_facebook_publishing_options_pane_on_publish_button_clicke } -static void _vala_array_add7 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { #line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5295,7 +5295,7 @@ static void _vala_array_add7 (PublishingFacebookPublishingOptionsPanePrivacyDesc } -static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add9 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5312,7 +5312,7 @@ static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDesc } -static void _vala_array_add9 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add10 (PublishingFacebookPublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5363,7 +5363,7 @@ static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_fa #line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp2_ = publishing_facebook_publishing_options_pane_privacy_description_new (_ ("Just me"), "{ 'value' : 'SELF' }"); #line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add7 (&_result_, &_result__length1, &__result__size_, _tmp2_); + _vala_array_add8 (&_result_, &_result__length1, &__result__size_, _tmp2_); #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp3_ = _result_; #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5371,7 +5371,7 @@ static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_fa #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp4_ = publishing_facebook_publishing_options_pane_privacy_description_new (_ ("Friends"), "{ 'value' : 'ALL_FRIENDS' }"); #line 888 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add8 (&_result_, &_result__length1, &__result__size_, _tmp4_); + _vala_array_add9 (&_result_, &_result__length1, &__result__size_, _tmp4_); #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp5_ = _result_; #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5379,7 +5379,7 @@ static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_fa #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp6_ = publishing_facebook_publishing_options_pane_privacy_description_new (_ ("Everyone"), "{ 'value' : 'EVERYONE' }"); #line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add9 (&_result_, &_result__length1, &__result__size_, _tmp6_); + _vala_array_add10 (&_result_, &_result__length1, &__result__size_, _tmp6_); #line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp7_ = _result_; #line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5398,7 +5398,7 @@ static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_fa } -static void _vala_array_add10 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value) { +static void _vala_array_add11 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value) { #line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5413,7 +5413,7 @@ static void _vala_array_add10 (PublishingFacebookResolution* * array, int* lengt } -static void _vala_array_add11 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value) { +static void _vala_array_add12 (PublishingFacebookResolution* * array, int* length, int* size, PublishingFacebookResolution value) { #line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" if ((*length) == (*size)) { #line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" @@ -5455,13 +5455,13 @@ static PublishingFacebookResolution* publishing_facebook_publishing_options_pane #line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp1__length1 = _result__length1; #line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add10 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_STANDARD); + _vala_array_add11 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_STANDARD); #line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp2_ = _result_; #line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp2__length1 = _result__length1; #line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" - _vala_array_add11 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_HIGH); + _vala_array_add12 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_HIGH); #line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" _tmp3_ = _result_; #line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" diff --git a/plugins/shotwell-publishing/FlickrPublishing.c b/plugins/shotwell-publishing/FlickrPublishing.c index 25f2d69..fb7e9a3 100644 --- a/plugins/shotwell-publishing/FlickrPublishing.c +++ b/plugins/shotwell-publishing/FlickrPublishing.c @@ -77,16 +77,6 @@ typedef struct _PublishingFlickrPublishingParametersPrivate PublishingFlickrPubl typedef struct _PublishingFlickrParamSpecPublishingParameters PublishingFlickrParamSpecPublishingParameters; typedef struct _PublishingFlickrFlickrPublisherPrivate PublishingFlickrFlickrPublisherPrivate; -#define PUBLISHING_FLICKR_TYPE_SESSION (publishing_flickr_session_get_type ()) -#define PUBLISHING_FLICKR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession)) -#define PUBLISHING_FLICKR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionClass)) -#define PUBLISHING_FLICKR_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_SESSION)) -#define PUBLISHING_FLICKR_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_SESSION)) -#define PUBLISHING_FLICKR_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionClass)) - -typedef struct _PublishingFlickrSession PublishingFlickrSession; -typedef struct _PublishingFlickrSessionClass PublishingFlickrSessionClass; - #define PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE (publishing_flickr_publishing_options_pane_get_type ()) #define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane)) #define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPaneClass)) @@ -102,16 +92,6 @@ typedef struct _PublishingFlickrPublishingOptionsPaneClass PublishingFlickrPubli #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL))) #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) -#define PUBLISHING_FLICKR_TYPE_TRANSACTION (publishing_flickr_transaction_get_type ()) -#define PUBLISHING_FLICKR_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransaction)) -#define PUBLISHING_FLICKR_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransactionClass)) -#define PUBLISHING_FLICKR_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION)) -#define PUBLISHING_FLICKR_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_TRANSACTION)) -#define PUBLISHING_FLICKR_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransactionClass)) - -typedef struct _PublishingFlickrTransaction PublishingFlickrTransaction; -typedef struct _PublishingFlickrTransactionClass PublishingFlickrTransactionClass; - #define PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION (publishing_flickr_account_info_fetch_transaction_get_type ()) #define PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, PublishingFlickrAccountInfoFetchTransaction)) #define PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, PublishingFlickrAccountInfoFetchTransactionClass)) @@ -136,7 +116,6 @@ typedef struct _PublishingFlickrAccountInfoFetchTransactionClass PublishingFlick typedef struct _PublishingFlickrUploader PublishingFlickrUploader; typedef struct _PublishingFlickrUploaderClass PublishingFlickrUploaderClass; #define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) -typedef struct _PublishingFlickrTransactionPrivate PublishingFlickrTransactionPrivate; typedef struct _PublishingFlickrAccountInfoFetchTransactionPrivate PublishingFlickrAccountInfoFetchTransactionPrivate; #define PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION (publishing_flickr_upload_transaction_get_type ()) @@ -149,8 +128,6 @@ typedef struct _PublishingFlickrAccountInfoFetchTransactionPrivate PublishingFli typedef struct _PublishingFlickrUploadTransaction PublishingFlickrUploadTransaction; typedef struct _PublishingFlickrUploadTransactionClass PublishingFlickrUploadTransactionClass; typedef struct _PublishingFlickrUploadTransactionPrivate PublishingFlickrUploadTransactionPrivate; -typedef struct _PublishingFlickrSessionPrivate PublishingFlickrSessionPrivate; -#define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL))) typedef struct _PublishingFlickrPublishingOptionsPanePrivate PublishingFlickrPublishingOptionsPanePrivate; #define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY (publishing_flickr_publishing_options_pane_visibility_entry_get_type ()) @@ -260,62 +237,32 @@ struct _PublishingFlickrFlickrPublisherPrivate { GDestroyNotify progress_reporter_target_destroy_notify; gboolean running; gboolean was_started; - PublishingFlickrSession* session; + PublishingRESTSupportOAuth1Session* session; PublishingFlickrPublishingOptionsPane* publishing_options_pane; SpitPublishingAuthenticator* authenticator; PublishingFlickrPublishingParameters* parameters; }; -struct _PublishingFlickrTransaction { - PublishingRESTSupportTransaction parent_instance; - PublishingFlickrTransactionPrivate * priv; -}; - -struct _PublishingFlickrTransactionClass { - PublishingRESTSupportTransactionClass parent_class; -}; - struct _PublishingFlickrAccountInfoFetchTransaction { - PublishingFlickrTransaction parent_instance; + PublishingRESTSupportOAuth1Transaction parent_instance; PublishingFlickrAccountInfoFetchTransactionPrivate * priv; }; struct _PublishingFlickrAccountInfoFetchTransactionClass { - PublishingFlickrTransactionClass parent_class; + PublishingRESTSupportOAuth1TransactionClass parent_class; }; struct _PublishingFlickrUploadTransaction { - PublishingRESTSupportUploadTransaction parent_instance; + PublishingRESTSupportOAuth1UploadTransaction parent_instance; PublishingFlickrUploadTransactionPrivate * priv; }; struct _PublishingFlickrUploadTransactionClass { - PublishingRESTSupportUploadTransactionClass parent_class; + PublishingRESTSupportOAuth1UploadTransactionClass parent_class; }; struct _PublishingFlickrUploadTransactionPrivate { PublishingFlickrPublishingParameters* parameters; - PublishingFlickrSession* session; - PublishingRESTSupportArgument** auth_header_fields; - gint auth_header_fields_length1; - gint _auth_header_fields_size_; -}; - -struct _PublishingFlickrSession { - PublishingRESTSupportSession parent_instance; - PublishingFlickrSessionPrivate * priv; -}; - -struct _PublishingFlickrSessionClass { - PublishingRESTSupportSessionClass parent_class; -}; - -struct _PublishingFlickrSessionPrivate { - gchar* access_phase_token; - gchar* access_phase_token_secret; - gchar* username; - gchar* consumer_key; - gchar* consumer_secret; }; struct _PublishingFlickrPublishingOptionsPane { @@ -410,10 +357,8 @@ static gpointer publishing_flickr_visibility_specification_parent_class = NULL; static gpointer publishing_flickr_publishing_parameters_parent_class = NULL; static gpointer publishing_flickr_flickr_publisher_parent_class = NULL; static SpitPublishingPublisherIface * publishing_flickr_flickr_publisher_spit_publishing_publisher_parent_iface = NULL; -static gpointer publishing_flickr_transaction_parent_class = NULL; static gpointer publishing_flickr_account_info_fetch_transaction_parent_class = NULL; static gpointer publishing_flickr_upload_transaction_parent_class = NULL; -static gpointer publishing_flickr_session_parent_class = NULL; static gpointer publishing_flickr_publishing_options_pane_parent_class = NULL; static gpointer publishing_flickr_publishing_options_pane_size_entry_parent_class = NULL; static gpointer publishing_flickr_publishing_options_pane_visibility_entry_parent_class = NULL; @@ -443,7 +388,6 @@ static void flickr_service_finalize (GObject * obj); #define PUBLISHING_FLICKR_ENDPOINT_URL "https://api.flickr.com/services/rest" #define PUBLISHING_FLICKR_ORIGINAL_SIZE -1 #define PUBLISHING_FLICKR_EXPIRED_SESSION_ERROR_CODE "98" -#define PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" GType publishing_flickr_user_kind_get_type (void) G_GNUC_CONST; gpointer publishing_flickr_visibility_specification_ref (gpointer instance); void publishing_flickr_visibility_specification_unref (gpointer instance); @@ -471,7 +415,6 @@ enum { PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_new (void); PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_construct (GType object_type); static void publishing_flickr_publishing_parameters_finalize (PublishingFlickrPublishingParameters * obj); -GType publishing_flickr_session_get_type (void) G_GNUC_CONST; GType publishing_flickr_publishing_options_pane_get_type (void) G_GNUC_CONST; #define PUBLISHING_FLICKR_FLICKR_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisherPrivate)) enum { @@ -479,14 +422,9 @@ enum { }; static void publishing_flickr_flickr_publisher_on_session_authenticated (PublishingFlickrFlickrPublisher* self); static void _publishing_flickr_flickr_publisher_on_session_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender, gpointer self); -PublishingFlickrSession* publishing_flickr_session_new (void); -PublishingFlickrSession* publishing_flickr_session_construct (GType object_type); SpitPublishingAuthenticator* publishing_flickr_flickr_publisher_get_authenticator (PublishingFlickrFlickrPublisher* self); static gboolean publishing_flickr_flickr_publisher_get_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self); static void publishing_flickr_flickr_publisher_set_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata); -void publishing_flickr_session_set_api_credentials (PublishingFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret); -void publishing_flickr_session_set_access_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username); -gchar* publishing_flickr_session_get_username (PublishingFlickrSession* self); static void publishing_flickr_flickr_publisher_do_fetch_account_info (PublishingFlickrFlickrPublisher* self); static void publishing_flickr_flickr_publisher_on_account_fetch_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn); static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); @@ -507,10 +445,9 @@ static void _publishing_flickr_flickr_publisher_on_upload_complete_publishing_re static void publishing_flickr_flickr_publisher_on_upload_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); static void _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); static void publishing_flickr_flickr_publisher_do_show_success_pane (PublishingFlickrFlickrPublisher* self); -GType publishing_flickr_transaction_get_type (void) G_GNUC_CONST; GType publishing_flickr_account_info_fetch_transaction_get_type (void) G_GNUC_CONST; -PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingFlickrSession* session); -PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session); +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session); +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session); PublishingRESTSupportXmlDocument* publishing_flickr_transaction_parse_flickr_response (const gchar* xml, GError** error); static void publishing_flickr_flickr_publisher_attempt_start (PublishingFlickrFlickrPublisher* self); PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_new (PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata); @@ -518,8 +455,8 @@ PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane gint publishing_flickr_flickr_publisher_flickr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b); static gint _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); GType publishing_flickr_uploader_get_type (void) G_GNUC_CONST; -PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); -PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); +PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); +PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); static void _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); gint publishing_flickr_flickr_publisher_get_persistent_visibility (PublishingFlickrFlickrPublisher* self); void publishing_flickr_flickr_publisher_set_persistent_visibility (PublishingFlickrFlickrPublisher* self, gint vis); @@ -530,46 +467,21 @@ static gboolean publishing_flickr_flickr_publisher_real_is_running (SpitPublishi static void publishing_flickr_flickr_publisher_real_start (SpitPublishingPublisher* base); static void publishing_flickr_flickr_publisher_real_stop (SpitPublishingPublisher* base); static void publishing_flickr_flickr_publisher_finalize (GObject * obj); -enum { - PUBLISHING_FLICKR_TRANSACTION_DUMMY_PROPERTY -}; -PublishingFlickrTransaction* publishing_flickr_transaction_new (PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method); -PublishingFlickrTransaction* publishing_flickr_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method); -gchar* publishing_flickr_session_get_oauth_nonce (PublishingFlickrSession* self); -gchar* publishing_flickr_session_get_oauth_timestamp (PublishingFlickrSession* self); -gchar* publishing_flickr_session_get_consumer_key (PublishingFlickrSession* self); -PublishingFlickrTransaction* publishing_flickr_transaction_new_with_uri (PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -PublishingFlickrTransaction* publishing_flickr_transaction_construct_with_uri (GType object_type, PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); -static void publishing_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); -void publishing_flickr_session_sign_transaction (PublishingFlickrSession* self, PublishingRESTSupportTransaction* txn); gchar* publishing_flickr_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc); static gchar* _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); enum { PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION_DUMMY_PROPERTY }; -gchar* publishing_flickr_session_get_access_phase_token (PublishingFlickrSession* self); GType publishing_flickr_upload_transaction_get_type (void) G_GNUC_CONST; #define PUBLISHING_FLICKR_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransactionPrivate)) enum { PUBLISHING_FLICKR_UPLOAD_TRANSACTION_DUMMY_PROPERTY }; -PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); -PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); -void publishing_flickr_upload_transaction_add_authorization_header_field (PublishingFlickrUploadTransaction* self, const gchar* key, const gchar* value); +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); static void _g_free0_ (gpointer var); -static void _vala_array_add19 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); -PublishingRESTSupportArgument** publishing_flickr_upload_transaction_get_authorization_header_fields (PublishingFlickrUploadTransaction* self, int* result_length1); -static PublishingRESTSupportArgument** _vala_array_dup8 (PublishingRESTSupportArgument** self, int length); -gchar* publishing_flickr_upload_transaction_get_authorization_header_string (PublishingFlickrUploadTransaction* self); static void publishing_flickr_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); static void publishing_flickr_upload_transaction_finalize (PublishingRESTSupportTransaction * obj); -#define PUBLISHING_FLICKR_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionPrivate)) -enum { - PUBLISHING_FLICKR_SESSION_DUMMY_PROPERTY -}; -static gboolean publishing_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base); -static void _vala_array_add20 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value); -static void publishing_flickr_session_finalize (PublishingRESTSupportSession * obj); static gpointer publishing_flickr_publishing_options_pane_visibility_entry_ref (gpointer instance); static void publishing_flickr_publishing_options_pane_visibility_entry_unref (gpointer instance); static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_visibility_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; @@ -602,18 +514,18 @@ static void publishing_flickr_publishing_options_pane_on_publish_clicked (Publis static void _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_new (const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification); static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_construct (GType object_type, const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification); +static void _vala_array_add20 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); static void _vala_array_add21 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); static void _vala_array_add22 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); static void _vala_array_add23 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); static void _vala_array_add24 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); -static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_new (const gchar* creator_title, gint creator_size); static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size); +static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); static void _vala_array_add26 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); static void _vala_array_add27 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); static void _vala_array_add28 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); static void _vala_array_add29 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); -static void _vala_array_add30 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); void publishing_flickr_publishing_options_pane_notify_publish (PublishingFlickrPublishingOptionsPane* self); void publishing_flickr_publishing_options_pane_notify_logout (PublishingFlickrPublishingOptionsPane* self); static GtkWidget* publishing_flickr_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); @@ -636,7 +548,7 @@ enum { PUBLISHING_FLICKR_UPLOADER_DUMMY_PROPERTY }; static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrUploader* self, SpitPublishingPublishable* publishable); -static void _vala_array_add31 (gchar** * array, int* length, int* size, gchar* value); +static void _vala_array_add30 (gchar** * array, int* length, int* size, gchar* value); static PublishingRESTSupportTransaction* publishing_flickr_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); static void publishing_flickr_uploader_finalize (PublishingRESTSupportBatchUploader * obj); static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); @@ -658,7 +570,7 @@ FlickrService* flickr_service_construct (GType object_type, GFile* resource_dire _tmp0__length1 = flickr_service_icon_pixbuf_set_length1; #line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp0_ == NULL) { -#line 662 "FlickrPublishing.c" +#line 574 "FlickrPublishing.c" gint _tmp1_; GdkPixbuf** _tmp2_; #line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" @@ -671,18 +583,18 @@ FlickrService* flickr_service_construct (GType object_type, GFile* resource_dire flickr_service_icon_pixbuf_set_length1 = _tmp1_; #line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _flickr_service_icon_pixbuf_set_size_ = flickr_service_icon_pixbuf_set_length1; -#line 675 "FlickrPublishing.c" +#line 587 "FlickrPublishing.c" } #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 679 "FlickrPublishing.c" +#line 591 "FlickrPublishing.c" } FlickrService* flickr_service_new (GFile* resource_directory) { #line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return flickr_service_construct (TYPE_FLICKR_SERVICE, resource_directory); -#line 686 "FlickrPublishing.c" +#line 598 "FlickrPublishing.c" } @@ -704,7 +616,7 @@ static gint flickr_service_real_get_pluggable_interface (SpitPluggable* base, gi result = _tmp2_; #line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 708 "FlickrPublishing.c" +#line 620 "FlickrPublishing.c" } @@ -717,7 +629,7 @@ static const gchar* flickr_service_real_get_id (SpitPluggable* base) { result = "org.yorba.shotwell.publishing.flickr"; #line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 721 "FlickrPublishing.c" +#line 633 "FlickrPublishing.c" } @@ -730,14 +642,14 @@ static const gchar* flickr_service_real_get_pluggable_name (SpitPluggable* base) result = "Flickr"; #line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 734 "FlickrPublishing.c" +#line 646 "FlickrPublishing.c" } static gpointer _g_object_ref0 (gpointer self) { #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? g_object_ref (self) : NULL; -#line 741 "FlickrPublishing.c" +#line 653 "FlickrPublishing.c" } @@ -748,17 +660,17 @@ static GdkPixbuf** _vala_array_dup7 (GdkPixbuf** self, int length) { result = g_new0 (GdkPixbuf*, length + 1); #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (i = 0; i < length; i++) { -#line 752 "FlickrPublishing.c" +#line 664 "FlickrPublishing.c" GdkPixbuf* _tmp0_; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = _g_object_ref0 (self[i]); #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result[i] = _tmp0_; -#line 758 "FlickrPublishing.c" +#line 670 "FlickrPublishing.c" } #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 762 "FlickrPublishing.c" +#line 674 "FlickrPublishing.c" } @@ -837,7 +749,7 @@ static void flickr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo (*info).icons = _tmp8_; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*info).icons_length1 = _tmp8__length1; -#line 841 "FlickrPublishing.c" +#line 753 "FlickrPublishing.c" } @@ -845,7 +757,7 @@ static void flickr_service_real_activation (SpitPluggable* base, gboolean enable FlickrService * self; #line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); -#line 849 "FlickrPublishing.c" +#line 761 "FlickrPublishing.c" } @@ -866,7 +778,7 @@ static SpitPublishingPublisher* flickr_service_real_create_publisher (SpitPublis result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); #line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 870 "FlickrPublishing.c" +#line 782 "FlickrPublishing.c" } @@ -879,7 +791,7 @@ static SpitPublishingPublisherMediaType flickr_service_real_get_supported_media result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; #line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 883 "FlickrPublishing.c" +#line 795 "FlickrPublishing.c" } @@ -888,7 +800,7 @@ static void flickr_service_class_init (FlickrServiceClass * klass) { flickr_service_parent_class = g_type_class_peek_parent (klass); #line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (klass)->finalize = flickr_service_finalize; -#line 892 "FlickrPublishing.c" +#line 804 "FlickrPublishing.c" } @@ -905,7 +817,7 @@ static void flickr_service_spit_pluggable_interface_init (SpitPluggableIface * i iface->get_info = (void (*) (SpitPluggable *, SpitPluggableInfo*)) flickr_service_real_get_info; #line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->activation = (void (*) (SpitPluggable *, gboolean)) flickr_service_real_activation; -#line 909 "FlickrPublishing.c" +#line 821 "FlickrPublishing.c" } @@ -916,7 +828,7 @@ static void flickr_service_spit_publishing_service_interface_init (SpitPublishin iface->create_publisher = (SpitPublishingPublisher* (*) (SpitPublishingService *, SpitPublishingPluginHost*)) flickr_service_real_create_publisher; #line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->get_supported_media = (SpitPublishingPublisherMediaType (*) (SpitPublishingService *)) flickr_service_real_get_supported_media; -#line 920 "FlickrPublishing.c" +#line 832 "FlickrPublishing.c" } @@ -930,7 +842,7 @@ static void flickr_service_finalize (GObject * obj) { self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FLICKR_SERVICE, FlickrService); #line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (flickr_service_parent_class)->finalize (obj); -#line 934 "FlickrPublishing.c" +#line 846 "FlickrPublishing.c" } @@ -967,236 +879,236 @@ PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specificat gint _tmp0_; gint _tmp1_; gint _tmp2_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrVisibilitySpecification*) g_type_create_instance (object_type); -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = friends_level; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->friends_level = _tmp0_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = family_level; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->family_level = _tmp1_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = everyone_level; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->everyone_level = _tmp2_; -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 987 "FlickrPublishing.c" +#line 899 "FlickrPublishing.c" } PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specification_new (gint friends_level, gint family_level, gint everyone_level) { -#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_visibility_specification_construct (PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, friends_level, family_level, everyone_level); -#line 994 "FlickrPublishing.c" +#line 906 "FlickrPublishing.c" } static void publishing_flickr_value_visibility_specification_init (GValue* value) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1001 "FlickrPublishing.c" +#line 913 "FlickrPublishing.c" } static void publishing_flickr_value_visibility_specification_free_value (GValue* value) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (value->data[0].v_pointer) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_visibility_specification_unref (value->data[0].v_pointer); -#line 1010 "FlickrPublishing.c" +#line 922 "FlickrPublishing.c" } } static void publishing_flickr_value_visibility_specification_copy_value (const GValue* src_value, GValue* dest_value) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (src_value->data[0].v_pointer) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = publishing_flickr_visibility_specification_ref (src_value->data[0].v_pointer); -#line 1020 "FlickrPublishing.c" +#line 932 "FlickrPublishing.c" } else { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = NULL; -#line 1024 "FlickrPublishing.c" +#line 936 "FlickrPublishing.c" } } static gpointer publishing_flickr_value_visibility_specification_peek_pointer (const GValue* value) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 1032 "FlickrPublishing.c" +#line 944 "FlickrPublishing.c" } static gchar* publishing_flickr_value_visibility_specification_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (collect_values[0].v_pointer) { -#line 1039 "FlickrPublishing.c" +#line 951 "FlickrPublishing.c" PublishingFlickrVisibilitySpecification * object; object = collect_values[0].v_pointer; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (object->parent_instance.g_class == NULL) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1046 "FlickrPublishing.c" +#line 958 "FlickrPublishing.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1050 "FlickrPublishing.c" +#line 962 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = publishing_flickr_visibility_specification_ref (object); -#line 1054 "FlickrPublishing.c" +#line 966 "FlickrPublishing.c" } else { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1058 "FlickrPublishing.c" +#line 970 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 1062 "FlickrPublishing.c" +#line 974 "FlickrPublishing.c" } static gchar* publishing_flickr_value_visibility_specification_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingFlickrVisibilitySpecification ** object_p; object_p = collect_values[0].v_pointer; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!object_p) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1073 "FlickrPublishing.c" +#line 985 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!value->data[0].v_pointer) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = NULL; -#line 1079 "FlickrPublishing.c" +#line 991 "FlickrPublishing.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = value->data[0].v_pointer; -#line 1083 "FlickrPublishing.c" +#line 995 "FlickrPublishing.c" } else { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = publishing_flickr_visibility_specification_ref (value->data[0].v_pointer); -#line 1087 "FlickrPublishing.c" +#line 999 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 1091 "FlickrPublishing.c" +#line 1003 "FlickrPublishing.c" } GParamSpec* publishing_flickr_param_spec_visibility_specification (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingFlickrParamSpecVisibilitySpecification* spec; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION), NULL); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return G_PARAM_SPEC (spec); -#line 1105 "FlickrPublishing.c" +#line 1017 "FlickrPublishing.c" } gpointer publishing_flickr_value_get_visibility_specification (const GValue* value) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION), NULL); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 1114 "FlickrPublishing.c" +#line 1026 "FlickrPublishing.c" } void publishing_flickr_value_set_visibility_specification (GValue* value, gpointer v_object) { PublishingFlickrVisibilitySpecification * old; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_visibility_specification_ref (value->data[0].v_pointer); -#line 1134 "FlickrPublishing.c" +#line 1046 "FlickrPublishing.c" } else { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1138 "FlickrPublishing.c" +#line 1050 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_visibility_specification_unref (old); -#line 1144 "FlickrPublishing.c" +#line 1056 "FlickrPublishing.c" } } void publishing_flickr_value_take_visibility_specification (GValue* value, gpointer v_object) { PublishingFlickrVisibilitySpecification * old; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 1163 "FlickrPublishing.c" +#line 1075 "FlickrPublishing.c" } else { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1167 "FlickrPublishing.c" +#line 1079 "FlickrPublishing.c" } -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_visibility_specification_unref (old); -#line 1173 "FlickrPublishing.c" +#line 1085 "FlickrPublishing.c" } } static void publishing_flickr_visibility_specification_class_init (PublishingFlickrVisibilitySpecificationClass * klass) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_visibility_specification_parent_class = g_type_class_peek_parent (klass); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingFlickrVisibilitySpecificationClass *) klass)->finalize = publishing_flickr_visibility_specification_finalize; -#line 1183 "FlickrPublishing.c" +#line 1095 "FlickrPublishing.c" } static void publishing_flickr_visibility_specification_instance_init (PublishingFlickrVisibilitySpecification * self) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->ref_count = 1; -#line 1190 "FlickrPublishing.c" +#line 1102 "FlickrPublishing.c" } static void publishing_flickr_visibility_specification_finalize (PublishingFlickrVisibilitySpecification * obj) { PublishingFlickrVisibilitySpecification * self; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, PublishingFlickrVisibilitySpecification); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_destroy (self); -#line 1200 "FlickrPublishing.c" +#line 1112 "FlickrPublishing.c" } @@ -1217,252 +1129,252 @@ GType publishing_flickr_visibility_specification_get_type (void) { gpointer publishing_flickr_visibility_specification_ref (gpointer instance) { PublishingFlickrVisibilitySpecification * self; self = instance; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_atomic_int_inc (&self->ref_count); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return instance; -#line 1225 "FlickrPublishing.c" +#line 1137 "FlickrPublishing.c" } void publishing_flickr_visibility_specification_unref (gpointer instance) { PublishingFlickrVisibilitySpecification * self; self = instance; -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION_GET_CLASS (self)->finalize (self); -#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_free_instance ((GTypeInstance *) self); -#line 1238 "FlickrPublishing.c" +#line 1150 "FlickrPublishing.c" } } PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_construct (GType object_type) { PublishingFlickrPublishingParameters* self = NULL; -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrPublishingParameters*) g_type_create_instance (object_type); -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 1249 "FlickrPublishing.c" +#line 1161 "FlickrPublishing.c" } PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_new (void) { -#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_publishing_parameters_construct (PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS); -#line 1256 "FlickrPublishing.c" +#line 1168 "FlickrPublishing.c" } static void publishing_flickr_value_publishing_parameters_init (GValue* value) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1263 "FlickrPublishing.c" +#line 1175 "FlickrPublishing.c" } static void publishing_flickr_value_publishing_parameters_free_value (GValue* value) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (value->data[0].v_pointer) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_parameters_unref (value->data[0].v_pointer); -#line 1272 "FlickrPublishing.c" +#line 1184 "FlickrPublishing.c" } } static void publishing_flickr_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (src_value->data[0].v_pointer) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = publishing_flickr_publishing_parameters_ref (src_value->data[0].v_pointer); -#line 1282 "FlickrPublishing.c" +#line 1194 "FlickrPublishing.c" } else { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = NULL; -#line 1286 "FlickrPublishing.c" +#line 1198 "FlickrPublishing.c" } } static gpointer publishing_flickr_value_publishing_parameters_peek_pointer (const GValue* value) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 1294 "FlickrPublishing.c" +#line 1206 "FlickrPublishing.c" } static gchar* publishing_flickr_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (collect_values[0].v_pointer) { -#line 1301 "FlickrPublishing.c" +#line 1213 "FlickrPublishing.c" PublishingFlickrPublishingParameters * object; object = collect_values[0].v_pointer; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (object->parent_instance.g_class == NULL) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1308 "FlickrPublishing.c" +#line 1220 "FlickrPublishing.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1312 "FlickrPublishing.c" +#line 1224 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = publishing_flickr_publishing_parameters_ref (object); -#line 1316 "FlickrPublishing.c" +#line 1228 "FlickrPublishing.c" } else { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1320 "FlickrPublishing.c" +#line 1232 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 1324 "FlickrPublishing.c" +#line 1236 "FlickrPublishing.c" } static gchar* publishing_flickr_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingFlickrPublishingParameters ** object_p; object_p = collect_values[0].v_pointer; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!object_p) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1335 "FlickrPublishing.c" +#line 1247 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!value->data[0].v_pointer) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = NULL; -#line 1341 "FlickrPublishing.c" +#line 1253 "FlickrPublishing.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = value->data[0].v_pointer; -#line 1345 "FlickrPublishing.c" +#line 1257 "FlickrPublishing.c" } else { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = publishing_flickr_publishing_parameters_ref (value->data[0].v_pointer); -#line 1349 "FlickrPublishing.c" +#line 1261 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 1353 "FlickrPublishing.c" +#line 1265 "FlickrPublishing.c" } GParamSpec* publishing_flickr_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingFlickrParamSpecPublishingParameters* spec; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return G_PARAM_SPEC (spec); -#line 1367 "FlickrPublishing.c" +#line 1279 "FlickrPublishing.c" } gpointer publishing_flickr_value_get_publishing_parameters (const GValue* value) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS), NULL); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 1376 "FlickrPublishing.c" +#line 1288 "FlickrPublishing.c" } void publishing_flickr_value_set_publishing_parameters (GValue* value, gpointer v_object) { PublishingFlickrPublishingParameters * old; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_parameters_ref (value->data[0].v_pointer); -#line 1396 "FlickrPublishing.c" +#line 1308 "FlickrPublishing.c" } else { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1400 "FlickrPublishing.c" +#line 1312 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_parameters_unref (old); -#line 1406 "FlickrPublishing.c" +#line 1318 "FlickrPublishing.c" } } void publishing_flickr_value_take_publishing_parameters (GValue* value, gpointer v_object) { PublishingFlickrPublishingParameters * old; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 1425 "FlickrPublishing.c" +#line 1337 "FlickrPublishing.c" } else { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 1429 "FlickrPublishing.c" +#line 1341 "FlickrPublishing.c" } -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_parameters_unref (old); -#line 1435 "FlickrPublishing.c" +#line 1347 "FlickrPublishing.c" } } static void publishing_flickr_publishing_parameters_class_init (PublishingFlickrPublishingParametersClass * klass) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_parameters_parent_class = g_type_class_peek_parent (klass); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingFlickrPublishingParametersClass *) klass)->finalize = publishing_flickr_publishing_parameters_finalize; -#line 1445 "FlickrPublishing.c" +#line 1357 "FlickrPublishing.c" } static void publishing_flickr_publishing_parameters_instance_init (PublishingFlickrPublishingParameters * self) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->ref_count = 1; -#line 1452 "FlickrPublishing.c" +#line 1364 "FlickrPublishing.c" } static void publishing_flickr_publishing_parameters_finalize (PublishingFlickrPublishingParameters * obj) { PublishingFlickrPublishingParameters * self; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS, PublishingFlickrPublishingParameters); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_destroy (self); -#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (self->username); -#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (self->visibility_specification); -#line 1466 "FlickrPublishing.c" +#line 1378 "FlickrPublishing.c" } @@ -1483,32 +1395,32 @@ GType publishing_flickr_publishing_parameters_get_type (void) { gpointer publishing_flickr_publishing_parameters_ref (gpointer instance) { PublishingFlickrPublishingParameters * self; self = instance; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_atomic_int_inc (&self->ref_count); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return instance; -#line 1491 "FlickrPublishing.c" +#line 1403 "FlickrPublishing.c" } void publishing_flickr_publishing_parameters_unref (gpointer instance) { PublishingFlickrPublishingParameters * self; self = instance; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_FLICKR_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_free_instance ((GTypeInstance *) self); -#line 1504 "FlickrPublishing.c" +#line 1416 "FlickrPublishing.c" } } static void _publishing_flickr_flickr_publisher_on_session_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender, gpointer self) { -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_session_authenticated ((PublishingFlickrFlickrPublisher*) self); -#line 1512 "FlickrPublishing.c" +#line 1424 "FlickrPublishing.c" } @@ -1518,77 +1430,77 @@ PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_construct (G SpitPublishingService* _tmp1_; SpitPublishingPluginHost* _tmp2_; SpitPublishingPluginHost* _tmp3_; - PublishingFlickrSession* _tmp4_; + PublishingRESTSupportOAuth1Session* _tmp4_; PublishingFlickrPublishingParameters* _tmp5_; PublishingAuthenticatorFactory* _tmp6_; PublishingAuthenticatorFactory* _tmp7_; SpitPublishingPluginHost* _tmp8_; SpitPublishingAuthenticator* _tmp9_; SpitPublishingAuthenticator* _tmp10_; -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrFlickrPublisher*) g_object_new (object_type, NULL); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:106: FlickrPublisher instantiated."); #line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:107: FlickrPublisher instantiated."); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = service; -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->service); -#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->service = _tmp1_; -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = host; -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _g_object_ref0 (_tmp2_); -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->host); -#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->host = _tmp3_; -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = publishing_flickr_session_new (); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_rest_support_oauth1_session_new (PUBLISHING_FLICKR_ENDPOINT_URL); +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->session = _tmp4_; -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = publishing_flickr_publishing_parameters_new (); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = _tmp5_; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = publishing_authenticator_factory_get_instance (); -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = host; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = spit_publishing_authenticator_factory_create (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR_FACTORY, SpitPublishingAuthenticatorFactory), "flickr", _tmp8_); -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->authenticator); -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->authenticator = _tmp9_; -#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp7_); -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = self->priv->authenticator; -#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (_tmp10_, "authenticated", (GCallback) _publishing_flickr_flickr_publisher_on_session_authenticated_spit_publishing_authenticator_authenticated, self, 0); -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 1585 "FlickrPublishing.c" +#line 1497 "FlickrPublishing.c" } PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { -#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_flickr_publisher_construct (PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, service, host); -#line 1592 "FlickrPublishing.c" +#line 1504 "FlickrPublishing.c" } @@ -1596,17 +1508,17 @@ SpitPublishingAuthenticator* publishing_flickr_flickr_publisher_get_authenticato SpitPublishingAuthenticator* result = NULL; SpitPublishingAuthenticator* _tmp0_; SpitPublishingAuthenticator* _tmp1_; -#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), NULL); -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->authenticator; -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 1610 "FlickrPublishing.c" +#line 1522 "FlickrPublishing.c" } @@ -1614,39 +1526,39 @@ static gboolean publishing_flickr_flickr_publisher_get_persistent_strip_metadata gboolean result = FALSE; SpitPublishingPluginHost* _tmp0_; gboolean _tmp1_; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), FALSE); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", FALSE); -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 1628 "FlickrPublishing.c" +#line 1540 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_set_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata) { SpitPublishingPluginHost* _tmp0_; gboolean _tmp1_; -#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = strip_metadata; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", _tmp1_); -#line 1643 "FlickrPublishing.c" +#line 1555 "FlickrPublishing.c" } static gpointer _g_variant_ref0 (gpointer self) { -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? g_variant_ref (self) : NULL; -#line 1650 "FlickrPublishing.c" +#line 1562 "FlickrPublishing.c" } @@ -1666,7 +1578,7 @@ static void publishing_flickr_flickr_publisher_on_session_authenticated (Publish GHashTable* _tmp6_; gconstpointer _tmp7_ = NULL; GVariant* _tmp8_; - PublishingFlickrSession* _tmp9_; + PublishingRESTSupportOAuth1Session* _tmp9_; GVariant* _tmp10_; const gchar* _tmp11_; GVariant* _tmp12_; @@ -1680,7 +1592,7 @@ static void publishing_flickr_flickr_publisher_on_session_authenticated (Publish GHashTable* _tmp20_; gconstpointer _tmp21_ = NULL; GVariant* _tmp22_; - PublishingFlickrSession* _tmp23_; + PublishingRESTSupportOAuth1Session* _tmp23_; GVariant* _tmp24_; const gchar* _tmp25_; GVariant* _tmp26_; @@ -1688,154 +1600,154 @@ static void publishing_flickr_flickr_publisher_on_session_authenticated (Publish GVariant* _tmp28_; const gchar* _tmp29_; PublishingFlickrPublishingParameters* _tmp30_; - PublishingFlickrSession* _tmp31_; + PublishingRESTSupportOAuth1Session* _tmp31_; gchar* _tmp32_; -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp0_) { -#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 1702 "FlickrPublishing.c" +#line 1614 "FlickrPublishing.c" } -#line 137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:137: EVENT: a fully authenticated session has be" \ +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:136: EVENT: a fully authenticated session has be" \ "come available"); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->authenticator; -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = spit_publishing_authenticator_get_authentication_parameter (_tmp1_); -#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" params = _tmp2_; -#line 140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" consumer_key = NULL; -#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" consumer_secret = NULL; -#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" auth_token = NULL; -#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" auth_token_secret = NULL; -#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" username = NULL; -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = params; -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_hash_table_lookup_extended (_tmp3_, "ConsumerKey", NULL, &_tmp4_); -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (consumer_key); -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _g_variant_ref0 (_tmp4_); -#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" consumer_key = _tmp5_; -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = params; -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_hash_table_lookup_extended (_tmp6_, "ConsumerSecret", NULL, &_tmp7_); -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (consumer_secret); -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = _g_variant_ref0 (_tmp7_); -#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" consumer_secret = _tmp8_; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = self->priv->session; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = consumer_key; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = g_variant_get_string (_tmp10_, NULL); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = consumer_secret; -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = g_variant_get_string (_tmp12_, NULL); -#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_session_set_api_credentials (_tmp9_, _tmp11_, _tmp13_); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_oauth1_session_set_api_credentials (_tmp9_, _tmp11_, _tmp13_); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = params; -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_hash_table_lookup_extended (_tmp14_, "AuthToken", NULL, &_tmp15_); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (auth_token); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = _g_variant_ref0 (_tmp15_); -#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" auth_token = _tmp16_; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = params; -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_hash_table_lookup_extended (_tmp17_, "AuthTokenSecret", NULL, &_tmp18_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (auth_token_secret); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = _g_variant_ref0 (_tmp18_); -#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" auth_token_secret = _tmp19_; -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = params; -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_hash_table_lookup_extended (_tmp20_, "Username", NULL, &_tmp21_); -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (username); -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_ = _g_variant_ref0 (_tmp21_); -#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" username = _tmp22_; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = self->priv->session; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_ = auth_token; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp25_ = g_variant_get_string (_tmp24_, NULL); -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp26_ = auth_token_secret; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp27_ = g_variant_get_string (_tmp26_, NULL); -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp28_ = username; -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp29_ = g_variant_get_string (_tmp28_, NULL); -#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_session_set_access_phase_credentials (_tmp23_, _tmp25_, _tmp27_, _tmp29_); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp23_, _tmp25_, _tmp27_, _tmp29_); +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp30_ = self->priv->parameters; -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp31_ = self->priv->session; -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp32_ = publishing_flickr_session_get_username (_tmp31_); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = publishing_rest_support_oauth1_session_get_username (_tmp31_); +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp30_->username); -#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp30_->username = _tmp32_; -#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_fetch_account_info (self); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (username); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (auth_token_secret); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (auth_token); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (consumer_secret); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_variant_unref0 (consumer_key); -#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_hash_table_unref0 (params); -#line 1824 "FlickrPublishing.c" +#line 1736 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_account_fetch_txn_completed ((PublishingFlickrFlickrPublisher*) self, _sender); -#line 1831 "FlickrPublishing.c" +#line 1743 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_account_fetch_txn_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); -#line 1838 "FlickrPublishing.c" +#line 1750 "FlickrPublishing.c" } @@ -1848,44 +1760,44 @@ static void publishing_flickr_flickr_publisher_on_account_fetch_txn_completed (P PublishingRESTSupportTransaction* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = txn; -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = txn; -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp4_) { -#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 1873 "FlickrPublishing.c" +#line 1785 "FlickrPublishing.c" } -#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:168: EVENT: account fetch transaction response r" \ +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:167: EVENT: account fetch transaction response r" \ "eceived over the network"); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = txn; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (self, _tmp7_); -#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp7_); -#line 1887 "FlickrPublishing.c" +#line 1799 "FlickrPublishing.c" } @@ -1897,75 +1809,75 @@ static void publishing_flickr_flickr_publisher_on_account_fetch_txn_error (Publi gboolean _tmp4_; SpitPublishingPluginHost* _tmp5_; GError* _tmp6_; -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = txn; -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = txn; -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); -#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp4_) { -#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 1921 "FlickrPublishing.c" +#line 1833 "FlickrPublishing.c" } -#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:180: EVENT: account fetch transaction caused a n" \ +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:179: EVENT: account fetch transaction caused a n" \ "etwork error"); -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = self->priv->host; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = err; -#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); -#line 1931 "FlickrPublishing.c" +#line 1843 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_on_account_info_available (PublishingFlickrFlickrPublisher* self) { gboolean _tmp0_; -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp0_) { -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 1945 "FlickrPublishing.c" +#line 1857 "FlickrPublishing.c" } -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:188: EVENT: account information has become avail" \ +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:187: EVENT: account information has become avail" \ "able"); -#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_show_publishing_options_pane (self); -#line 1951 "FlickrPublishing.c" +#line 1863 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self) { -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_publishing_options_pane_publish ((PublishingFlickrFlickrPublisher*) self, strip_metadata); -#line 1958 "FlickrPublishing.c" +#line 1870 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self) { -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_publishing_options_pane_logout ((PublishingFlickrFlickrPublisher*) self); -#line 1965 "FlickrPublishing.c" +#line 1877 "FlickrPublishing.c" } @@ -1976,36 +1888,36 @@ static void publishing_flickr_flickr_publisher_on_publishing_options_pane_publis guint _tmp3_; gboolean _tmp4_; gboolean _tmp5_; -#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->publishing_options_pane; -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); -#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self); -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->publishing_options_pane; -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); -#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self); -#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp4_) { -#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 1996 "FlickrPublishing.c" +#line 1908 "FlickrPublishing.c" } -#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:199: EVENT: user clicked the 'Publish' button in" \ +#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:198: EVENT: user clicked the 'Publish' button in" \ " the publishing options pane"); -#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = strip_metadata; -#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_publish (self, _tmp5_); -#line 2004 "FlickrPublishing.c" +#line 1916 "FlickrPublishing.c" } @@ -2015,34 +1927,34 @@ static void publishing_flickr_flickr_publisher_on_publishing_options_pane_logout PublishingFlickrPublishingOptionsPane* _tmp2_; guint _tmp3_; gboolean _tmp4_; -#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->publishing_options_pane; -#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); -#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self); -#line 205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->publishing_options_pane; -#line 205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); -#line 205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp4_) { -#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2034 "FlickrPublishing.c" +#line 1946 "FlickrPublishing.c" } -#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:210: EVENT: user clicked the 'Logout' button in " \ +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:209: EVENT: user clicked the 'Logout' button in " \ "the publishing options pane"); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_logout (self); -#line 2040 "FlickrPublishing.c" +#line 1952 "FlickrPublishing.c" } @@ -2055,52 +1967,52 @@ static void publishing_flickr_flickr_publisher_on_upload_status_updated (Publish void* _tmp3__target; gint _tmp4_; gdouble _tmp5_; -#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp0_) { -#line 217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2061 "FlickrPublishing.c" +#line 1973 "FlickrPublishing.c" } -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = completed_fraction; -#line 219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:219: EVENT: uploader reports upload %.2f percent" \ +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:218: EVENT: uploader reports upload %.2f percent" \ " complete.", 100.0 * _tmp1_); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->progress_reporter; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2__target = self->priv->progress_reporter_target; -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = self->priv->progress_reporter; -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3__target = self->priv->progress_reporter_target; -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = file_number; -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = completed_fraction; -#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); -#line 2083 "FlickrPublishing.c" +#line 1995 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_upload_complete ((PublishingFlickrFlickrPublisher*) self, _sender, num_photos_published); -#line 2090 "FlickrPublishing.c" +#line 2002 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_upload_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); -#line 2097 "FlickrPublishing.c" +#line 2009 "FlickrPublishing.c" } @@ -2111,38 +2023,38 @@ static void publishing_flickr_flickr_publisher_on_upload_complete (PublishingFli guint _tmp3_; PublishingRESTSupportBatchUploader* _tmp4_; guint _tmp5_; -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp0_) { -#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2118 "FlickrPublishing.c" +#line 2030 "FlickrPublishing.c" } -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = num_published; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:231: EVENT: uploader reports upload complete; %d" \ +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:230: EVENT: uploader reports upload complete; %d" \ " items published.", _tmp1_); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = uploader; -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = uploader; -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp5_, NULL, FALSE); -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_show_success_pane (self); -#line 2138 "FlickrPublishing.c" +#line 2050 "FlickrPublishing.c" } @@ -2156,44 +2068,44 @@ static void publishing_flickr_flickr_publisher_on_upload_error (PublishingFlickr guint _tmp6_; SpitPublishingPluginHost* _tmp7_; GError* _tmp8_; -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp0_) { -#line 242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2162 "FlickrPublishing.c" +#line 2074 "FlickrPublishing.c" } -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = err; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = _tmp1_->message; -#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:244: EVENT: uploader reports upload error = '%s'" \ +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:243: EVENT: uploader reports upload error = '%s'" \ ".", _tmp2_); -#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = uploader; -#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp4_, NULL, FALSE); -#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = uploader; -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp6_, NULL, FALSE); -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = self->priv->host; -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = err; -#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); -#line 2188 "FlickrPublishing.c" +#line 2100 "FlickrPublishing.c" } @@ -2201,52 +2113,52 @@ static void publishing_flickr_flickr_publisher_do_fetch_account_info (Publishing SpitPublishingPluginHost* _tmp0_; SpitPublishingPluginHost* _tmp1_; PublishingFlickrAccountInfoFetchTransaction* txn = NULL; - PublishingFlickrSession* _tmp2_; + PublishingRESTSupportOAuth1Session* _tmp2_; PublishingFlickrAccountInfoFetchTransaction* _tmp3_; GError * _inner_error_ = NULL; -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:253: ACTION: running network transaction to fetc" \ +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:252: ACTION: running network transaction to fetc" \ "h account information"); -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->host; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->session; -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = publishing_flickr_account_info_fetch_transaction_new (_tmp2_); -#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" txn = _tmp3_; -#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self, 0); -#line 260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self, 0); -#line 2221 "FlickrPublishing.c" +#line 2133 "FlickrPublishing.c" { -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2229 "FlickrPublishing.c" +#line 2141 "FlickrPublishing.c" goto __catch13_spit_publishing_publishing_error; } -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2240 "FlickrPublishing.c" +#line 2152 "FlickrPublishing.c" } } goto __finally13; @@ -2255,36 +2167,36 @@ static void publishing_flickr_flickr_publisher_do_fetch_account_info (Publishing GError* err = NULL; SpitPublishingPluginHost* _tmp4_; GError* _tmp5_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" err = _inner_error_; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = self->priv->host; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = err; -#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 2261 "FlickrPublishing.c" +#line 2173 "FlickrPublishing.c" } __finally13: -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2274 "FlickrPublishing.c" +#line 2186 "FlickrPublishing.c" } -#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_transaction_unref0 (txn); -#line 2278 "FlickrPublishing.c" +#line 2190 "FlickrPublishing.c" } @@ -2302,23 +2214,23 @@ static gint64 int64_parse (const gchar* str) { result = _tmp1_; #line 688 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 2296 "FlickrPublishing.c" +#line 2208 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (PublishingFlickrFlickrPublisher* self, const gchar* xml) { const gchar* _tmp0_; GError * _inner_error_ = NULL; -#line 269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (xml != NULL); -#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = xml; -#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:270: ACTION: parsing account information from xm" \ +#line 269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:269: ACTION: parsing account information from xm" \ "l = '%s'", _tmp0_); -#line 2311 "FlickrPublishing.c" +#line 2223 "FlickrPublishing.c" { PublishingRESTSupportXmlDocument* response_doc = NULL; const gchar* _tmp1_; @@ -2351,222 +2263,222 @@ static void publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (P gint64 _tmp23_; PublishingFlickrPublishingParameters* _tmp24_; PublishingFlickrUserKind _tmp25_; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = xml; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_flickr_transaction_parse_flickr_response (_tmp1_, &_inner_error_); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" response_doc = _tmp2_; -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2354 "FlickrPublishing.c" +#line 2266 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2363 "FlickrPublishing.c" +#line 2275 "FlickrPublishing.c" } -#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = response_doc; -#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = publishing_rest_support_xml_document_get_root_node (_tmp3_); -#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" root_node = _tmp4_; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = response_doc; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = root_node; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = publishing_rest_support_xml_document_get_named_child (_tmp5_, _tmp6_, "user", &_inner_error_); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" user_node = _tmp7_; -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2385 "FlickrPublishing.c" +#line 2297 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2396 "FlickrPublishing.c" +#line 2308 "FlickrPublishing.c" } -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = response_doc; -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = user_node; -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_rest_support_xml_document_get_property_value (_tmp8_, _tmp9_, "ispro", &_inner_error_); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" is_pro_str = _tmp10_; -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2412 "FlickrPublishing.c" +#line 2324 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2423 "FlickrPublishing.c" +#line 2335 "FlickrPublishing.c" } -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = response_doc; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = user_node; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = publishing_rest_support_xml_document_get_named_child (_tmp11_, _tmp12_, "bandwidth", &_inner_error_); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" bandwidth_node = _tmp13_; -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2441 "FlickrPublishing.c" +#line 2353 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2454 "FlickrPublishing.c" +#line 2366 "FlickrPublishing.c" } -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = response_doc; -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = bandwidth_node; -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = publishing_rest_support_xml_document_get_property_value (_tmp14_, _tmp15_, "remainingkb", &_inner_error_); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" remaining_kb_str = _tmp16_; -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2472 "FlickrPublishing.c" +#line 2384 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2485 "FlickrPublishing.c" +#line 2397 "FlickrPublishing.c" } -#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = is_pro_str; -#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_strcmp0 (_tmp17_, "0") == 0) { -#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" user_kind = PUBLISHING_FLICKR_USER_KIND_FREE; -#line 2493 "FlickrPublishing.c" +#line 2405 "FlickrPublishing.c" } else { const gchar* _tmp18_; -#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = is_pro_str; -#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_strcmp0 (_tmp18_, "1") == 0) { -#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" user_kind = PUBLISHING_FLICKR_USER_KIND_PRO; -#line 2502 "FlickrPublishing.c" +#line 2414 "FlickrPublishing.c" } else { GError* _tmp19_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to determine if user has free or pro account"); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = _tmp19_; -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (remaining_kb_str); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 2517 "FlickrPublishing.c" +#line 2429 "FlickrPublishing.c" goto __catch14_spit_publishing_publishing_error; } -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (remaining_kb_str); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2532 "FlickrPublishing.c" +#line 2444 "FlickrPublishing.c" } } -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = remaining_kb_str; -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp21_ = int64_parse (_tmp20_); -#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" quota_bytes_left = _tmp21_ * 1024; -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_ = self->priv->parameters; -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = quota_bytes_left; -#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_->quota_free_bytes = _tmp23_; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_ = self->priv->parameters; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp25_ = user_kind; -#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_->user_kind = _tmp25_; -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (remaining_kb_str); -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (is_pro_str); -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (response_doc); -#line 2559 "FlickrPublishing.c" +#line 2471 "FlickrPublishing.c" } goto __finally14; __catch14_spit_publishing_publishing_error: @@ -2575,78 +2487,78 @@ static void publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (P GError* _tmp26_; SpitPublishingPluginHost* _tmp27_; GError* _tmp28_; -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" err = _inner_error_; -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp26_ = err; -#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_error_matches (_tmp26_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION)) { -#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_do_logout (self); -#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2582 "FlickrPublishing.c" +#line 2494 "FlickrPublishing.c" } -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp27_ = self->priv->host; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp28_ = err; -#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_post_error (_tmp27_, _tmp28_); -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2594 "FlickrPublishing.c" +#line 2506 "FlickrPublishing.c" } __finally14: -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2605 "FlickrPublishing.c" +#line 2517 "FlickrPublishing.c" } -#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_account_info_available (self); -#line 2609 "FlickrPublishing.c" +#line 2521 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_do_logout (PublishingFlickrFlickrPublisher* self) { SpitPublishingAuthenticator* _tmp0_; gboolean _tmp1_; -#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:314: ACTION: logging user out, deauthenticating " \ +#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:313: ACTION: logging user out, deauthenticating " \ "session, and erasing stored credentials"); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->authenticator; -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_publishing_authenticator_can_logout (_tmp0_); -#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp1_) { -#line 2626 "FlickrPublishing.c" +#line 2538 "FlickrPublishing.c" SpitPublishingAuthenticator* _tmp2_; -#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->authenticator; -#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_authenticator_logout (_tmp2_); -#line 2632 "FlickrPublishing.c" +#line 2544 "FlickrPublishing.c" } -#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->running = FALSE; -#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_attempt_start (self); -#line 2638 "FlickrPublishing.c" +#line 2550 "FlickrPublishing.c" } @@ -2665,28 +2577,28 @@ static void publishing_flickr_flickr_publisher_do_show_publishing_options_pane ( SpitPublishingPluginHost* _tmp16_; PublishingFlickrPublishingOptionsPane* _tmp17_; GError * _inner_error_ = NULL; -#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:326: ACTION: displaying publishing options pane"); -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:325: ACTION: displaying publishing options pane"); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = gtk_builder_new (); -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" builder = _tmp1_; -#line 2669 "FlickrPublishing.c" +#line 2581 "FlickrPublishing.c" { GtkBuilder* _tmp2_; -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = builder; -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/" "flickr_publishing_options_pane.ui", &_inner_error_); -#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2678 "FlickrPublishing.c" +#line 2590 "FlickrPublishing.c" goto __catch15_g_error; } } @@ -2699,81 +2611,81 @@ static void publishing_flickr_flickr_publisher_do_show_publishing_options_pane ( SpitPublishingPluginHost* _tmp5_; GError* _tmp6_; GError* _tmp7_; -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" e = _inner_error_; -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = e; -#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = _tmp3_->message; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:337: Could not parse UI file! Error: %s.", _tmp4_); #line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_warning ("FlickrPublishing.vala:338: Could not parse UI file! Error: %s.", _tmp4_); -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = self->priv->host; -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A file required for publishing is unavailable. Publishing to Flickr ca" \ "n’t continue.")); -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_post_error (_tmp5_, _tmp7_); -#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (_tmp7_); -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (e); -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (builder); -#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2717 "FlickrPublishing.c" +#line 2629 "FlickrPublishing.c" } __finally15: -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (builder); -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2730 "FlickrPublishing.c" +#line 2642 "FlickrPublishing.c" } -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = self->priv->parameters; -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = self->priv->host; -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = spit_publishing_plugin_host_get_publishable_media_type (_tmp9_); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = builder; -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = publishing_flickr_flickr_publisher_get_persistent_strip_metadata (self); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = publishing_flickr_publishing_options_pane_new (self, _tmp8_, _tmp10_, _tmp11_, _tmp12_); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publishing_options_pane); -#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publishing_options_pane = _tmp13_; -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = self->priv->publishing_options_pane; -#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (_tmp14_, "publish", (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self, 0); -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = self->priv->publishing_options_pane; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (_tmp15_, "logout", (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self, 0); -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = self->priv->host; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = self->priv->publishing_options_pane; -#line 349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_install_dialog_pane (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); -#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (builder); -#line 2764 "FlickrPublishing.c" +#line 2676 "FlickrPublishing.c" } @@ -2787,51 +2699,51 @@ gint publishing_flickr_flickr_publisher_flickr_date_time_compare_func (SpitPubli GDateTime* _tmp5_; gint _tmp6_; gint _tmp7_; -#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (a), 0); -#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (b), 0); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = a; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_publishing_publishable_get_exposure_date_time (_tmp0_); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = _tmp1_; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = b; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = spit_publishing_publishable_get_exposure_date_time (_tmp3_); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _tmp4_; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = g_date_time_compare (_tmp2_, _tmp5_); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_date_time_unref0 (_tmp5_); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_date_time_unref0 (_tmp2_); -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp7_; -#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 2806 "FlickrPublishing.c" +#line 2718 "FlickrPublishing.c" } static gint _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { gint result; result = publishing_flickr_flickr_publisher_flickr_date_time_compare_func ((SpitPublishingPublishable*) a, (SpitPublishingPublishable*) b); -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 2815 "FlickrPublishing.c" +#line 2727 "FlickrPublishing.c" } static void _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_on_upload_status_updated ((PublishingFlickrFlickrPublisher*) self, file_number, fraction_complete); -#line 2822 "FlickrPublishing.c" +#line 2734 "FlickrPublishing.c" } @@ -2858,7 +2770,7 @@ static void publishing_flickr_flickr_publisher_do_publish (PublishingFlickrFlick gint _tmp14__length1; GeeArrayList* _tmp18_; PublishingFlickrUploader* uploader = NULL; - PublishingFlickrSession* _tmp19_; + PublishingRESTSupportOAuth1Session* _tmp19_; GeeArrayList* _tmp20_; gint _tmp21_; gpointer* _tmp22_; @@ -2871,168 +2783,168 @@ static void publishing_flickr_flickr_publisher_do_publish (PublishingFlickrFlick PublishingFlickrUploader* _tmp28_; PublishingFlickrUploader* _tmp29_; PublishingFlickrUploader* _tmp30_; -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = strip_metadata; -#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_set_persistent_strip_metadata (self, _tmp0_); -#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:359: ACTION: uploading media items to remote ser" \ +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:358: ACTION: uploading media items to remote ser" \ "ver."); -#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->host; -#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->host; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = self->priv->parameters; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = _tmp3_->photo_major_axis_size; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = strip_metadata; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = spit_publishing_plugin_host_serialize_publishables (_tmp2_, _tmp4_, _tmp5_, &_tmp6_, &_tmp7_); -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter = NULL; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target = NULL; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target_destroy_notify = NULL; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter = _tmp8_; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target = _tmp6_; -#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target_destroy_notify = _tmp7_; -#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp9_) { -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 2904 "FlickrPublishing.c" +#line 2816 "FlickrPublishing.c" } -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = self->priv->host; -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = spit_publishing_plugin_host_get_publishables (_tmp10_, &_tmp11_); -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishables = _tmp12_; -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishables_length1 = _tmp11_; -#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishables_size_ = publishables_length1; -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = gee_array_list_new (SPIT_PUBLISHING_TYPE_PUBLISHABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" sorted_list = _tmp13_; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = publishables; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14__length1 = publishables_length1; -#line 2924 "FlickrPublishing.c" +#line 2836 "FlickrPublishing.c" { SpitPublishingPublishable** p_collection = NULL; gint p_collection_length1 = 0; gint _p_collection_size_ = 0; gint p_it = 0; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" p_collection = _tmp14_; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" p_collection_length1 = _tmp14__length1; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (p_it = 0; p_it < _tmp14__length1; p_it = p_it + 1) { -#line 2936 "FlickrPublishing.c" +#line 2848 "FlickrPublishing.c" SpitPublishingPublishable* _tmp15_; SpitPublishingPublishable* p = NULL; -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = _g_object_ref0 (p_collection[p_it]); -#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" p = _tmp15_; -#line 2943 "FlickrPublishing.c" +#line 2855 "FlickrPublishing.c" { GeeArrayList* _tmp16_; SpitPublishingPublishable* _tmp17_; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = sorted_list; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = p; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); #line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (p); -#line 2955 "FlickrPublishing.c" +#line 2867 "FlickrPublishing.c" } } } -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = sorted_list; -#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gee_list_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_LIST, GeeList), _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func, NULL, NULL); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = self->priv->session; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = sorted_list; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp21_); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = _tmp22_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23__length1 = _tmp21_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_ = self->priv->parameters; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp25_ = strip_metadata; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp26_ = publishing_flickr_uploader_new (_tmp19_, _tmp23_, _tmp21_, _tmp24_, _tmp25_); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp27_ = _tmp26_; -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = (_vala_array_free (_tmp23_, _tmp23__length1, (GDestroyNotify) g_object_unref), NULL); -#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" uploader = _tmp27_; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp28_ = uploader; -#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp29_ = uploader; -#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp30_ = uploader; -#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_batch_uploader_unref0 (uploader); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (sorted_list); -#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); -#line 3003 "FlickrPublishing.c" +#line 2915 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_do_show_success_pane (PublishingFlickrFlickrPublisher* self) { SpitPublishingPluginHost* _tmp0_; SpitPublishingPluginHost* _tmp1_; -#line 386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 385 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:387: ACTION: showing success pane."); -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:386: ACTION: showing success pane."); +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); -#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->host; -#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_plugin_host_install_success_pane (_tmp1_); -#line 3022 "FlickrPublishing.c" +#line 2934 "FlickrPublishing.c" } @@ -3040,32 +2952,32 @@ gint publishing_flickr_flickr_publisher_get_persistent_visibility (PublishingFli gint result = 0; SpitPublishingPluginHost* _tmp0_; gint _tmp1_; -#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), 0); -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "visibility", 0); -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3040 "FlickrPublishing.c" +#line 2952 "FlickrPublishing.c" } void publishing_flickr_flickr_publisher_set_persistent_visibility (PublishingFlickrFlickrPublisher* self, gint vis) { SpitPublishingPluginHost* _tmp0_; gint _tmp1_; -#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = vis; -#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "visibility", _tmp1_); -#line 3055 "FlickrPublishing.c" +#line 2967 "FlickrPublishing.c" } @@ -3073,32 +2985,32 @@ gint publishing_flickr_flickr_publisher_get_persistent_default_size (PublishingF gint result = 0; SpitPublishingPluginHost* _tmp0_; gint _tmp1_; -#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), 0); -#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", 1); -#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3073 "FlickrPublishing.c" +#line 2985 "FlickrPublishing.c" } void publishing_flickr_flickr_publisher_set_persistent_default_size (PublishingFlickrFlickrPublisher* self, gint size) { SpitPublishingPluginHost* _tmp0_; gint _tmp1_; -#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->host; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = size; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", _tmp1_); -#line 3088 "FlickrPublishing.c" +#line 3000 "FlickrPublishing.c" } @@ -3107,17 +3019,17 @@ static SpitPublishingService* publishing_flickr_flickr_publisher_real_get_servic SpitPublishingService* result = NULL; SpitPublishingService* _tmp0_; SpitPublishingService* _tmp1_; -#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->service; -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3107 "FlickrPublishing.c" +#line 3019 "FlickrPublishing.c" } @@ -3125,31 +3037,31 @@ static gboolean publishing_flickr_flickr_publisher_real_is_running (SpitPublishi PublishingFlickrFlickrPublisher * self; gboolean result = FALSE; gboolean _tmp0_; -#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); -#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->running; -#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp0_; -#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3123 "FlickrPublishing.c" +#line 3035 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_attempt_start (PublishingFlickrFlickrPublisher* self) { SpitPublishingAuthenticator* _tmp0_; -#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 418 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); -#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->running = TRUE; -#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->was_started = TRUE; -#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->authenticator; -#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spit_publishing_authenticator_authenticate (_tmp0_); -#line 3139 "FlickrPublishing.c" +#line 3051 "FlickrPublishing.c" } @@ -3157,106 +3069,106 @@ static void publishing_flickr_flickr_publisher_real_start (SpitPublishingPublish PublishingFlickrFlickrPublisher * self; gboolean _tmp0_; gboolean _tmp1_; -#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); -#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); -#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp0_) { -#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 3155 "FlickrPublishing.c" +#line 3067 "FlickrPublishing.c" } -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->was_started; -#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp1_) { -#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_error ("FlickrPublishing.vala:431: FlickrPublisher: start( ): can't start; thi" \ +#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_error ("FlickrPublishing.vala:430: FlickrPublisher: start( ): can't start; thi" \ "s publisher is not restartable."); -#line 3163 "FlickrPublishing.c" +#line 3075 "FlickrPublishing.c" } -#line 433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:433: FlickrPublisher: starting interaction."); -#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:432: FlickrPublisher: starting interaction."); +#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_attempt_start (self); -#line 3169 "FlickrPublishing.c" +#line 3081 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_real_stop (SpitPublishingPublisher* base) { PublishingFlickrFlickrPublisher * self; - PublishingFlickrSession* _tmp0_; -#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); -#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:439: FlickrPublisher: stop( ) invoked."); -#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:438: FlickrPublisher: stop( ) invoked."); +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->session; -#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp0_ != NULL) { -#line 3184 "FlickrPublishing.c" - PublishingFlickrSession* _tmp1_; -#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 3096 "FlickrPublishing.c" + PublishingRESTSupportOAuth1Session* _tmp1_; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->session; -#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_rest_support_session_stop_transactions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 3190 "FlickrPublishing.c" +#line 3102 "FlickrPublishing.c" } -#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->running = FALSE; -#line 3194 "FlickrPublishing.c" +#line 3106 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_class_init (PublishingFlickrFlickrPublisherClass * klass) { -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_parent_class = g_type_class_peek_parent (klass); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_class_add_private (klass, sizeof (PublishingFlickrFlickrPublisherPrivate)); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (klass)->finalize = publishing_flickr_flickr_publisher_finalize; -#line 3205 "FlickrPublishing.c" +#line 3117 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->get_service = (SpitPublishingService* (*) (SpitPublishingPublisher *)) publishing_flickr_flickr_publisher_real_get_service; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->is_running = (gboolean (*) (SpitPublishingPublisher *)) publishing_flickr_flickr_publisher_real_is_running; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->start = (void (*) (SpitPublishingPublisher *)) publishing_flickr_flickr_publisher_real_start; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->stop = (void (*) (SpitPublishingPublisher *)) publishing_flickr_flickr_publisher_real_stop; -#line 3220 "FlickrPublishing.c" +#line 3132 "FlickrPublishing.c" } static void publishing_flickr_flickr_publisher_instance_init (PublishingFlickrFlickrPublisher * self) { -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv = PUBLISHING_FLICKR_FLICKR_PUBLISHER_GET_PRIVATE (self); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter = NULL; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target = self; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target_destroy_notify = NULL; -#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->running = FALSE; -#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->was_started = FALSE; -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->session = NULL; -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publishing_options_pane = NULL; -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->authenticator = NULL; -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = NULL; -#line 3245 "FlickrPublishing.c" +#line 3157 "FlickrPublishing.c" } @@ -3264,37 +3176,37 @@ static void publishing_flickr_flickr_publisher_finalize (GObject * obj) { PublishingFlickrFlickrPublisher * self; SpitPublishingAuthenticator* _tmp0_; guint _tmp1_; -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->authenticator; -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("authenticated", SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &_tmp1_, NULL, FALSE); -#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_session_authenticated_spit_publishing_authenticator_authenticated, self); -#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->service); -#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->host); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter = NULL; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target = NULL; -#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->progress_reporter_target_destroy_notify = NULL; -#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_session_unref0 (self->priv->session); -#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publishing_options_pane); -#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->authenticator); -#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (publishing_flickr_flickr_publisher_parent_class)->finalize (obj); -#line 3283 "FlickrPublishing.c" +#line 3195 "FlickrPublishing.c" } @@ -3312,190 +3224,6 @@ GType publishing_flickr_flickr_publisher_get_type (void) { } -PublishingFlickrTransaction* publishing_flickr_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method) { - PublishingFlickrTransaction* self = NULL; - PublishingFlickrSession* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; - PublishingFlickrSession* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - PublishingFlickrSession* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - PublishingFlickrSession* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = session; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = method; -#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = (PublishingFlickrTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_); -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = session; -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = publishing_flickr_session_get_oauth_nonce (_tmp2_); -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = _tmp3_; -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp4_); -#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp4_); -#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); -#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); -#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "oob"); -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = session; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = publishing_flickr_session_get_oauth_timestamp (_tmp5_); -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp7_ = _tmp6_; -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp7_); -#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp7_); -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = session; -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = publishing_flickr_session_get_consumer_key (_tmp8_); -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = _tmp9_; -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", _tmp10_); -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp10_); -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self; -#line 3360 "FlickrPublishing.c" -} - - -PublishingFlickrTransaction* publishing_flickr_transaction_new (PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method) { -#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return publishing_flickr_transaction_construct (PUBLISHING_FLICKR_TYPE_TRANSACTION, session, method); -#line 3367 "FlickrPublishing.c" -} - - -PublishingFlickrTransaction* publishing_flickr_transaction_construct_with_uri (GType object_type, PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { - PublishingFlickrTransaction* self = NULL; - PublishingFlickrSession* _tmp0_; - const gchar* _tmp1_; - PublishingRESTSupportHttpMethod _tmp2_; - PublishingFlickrSession* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - PublishingFlickrSession* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - PublishingFlickrSession* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (uri != NULL, NULL); -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = session; -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = uri; -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = method; -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = (PublishingFlickrTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = session; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = publishing_flickr_session_get_oauth_nonce (_tmp3_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = _tmp4_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp5_); -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp5_); -#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); -#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "oob"); -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = session; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp7_ = publishing_flickr_session_get_oauth_timestamp (_tmp6_); -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = _tmp7_; -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp8_); -#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp8_); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = session; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = publishing_flickr_session_get_consumer_key (_tmp9_); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp11_ = _tmp10_; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", _tmp11_); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp11_); -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self; -#line 3435 "FlickrPublishing.c" -} - - -PublishingFlickrTransaction* publishing_flickr_transaction_new_with_uri (PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return publishing_flickr_transaction_construct_with_uri (PUBLISHING_FLICKR_TYPE_TRANSACTION, session, uri, method); -#line 3442 "FlickrPublishing.c" -} - - -static void publishing_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { - PublishingFlickrTransaction * self; - PublishingRESTSupportSession* _tmp0_; - PublishingFlickrSession* _tmp1_; - GError * _inner_error_ = NULL; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransaction); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _publishing_rest_support_session_unref0 (_tmp1_); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_propagate_error (error, _inner_error_); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return; -#line 3471 "FlickrPublishing.c" - } else { -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_clear_error (&_inner_error_); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return; -#line 3479 "FlickrPublishing.c" - } - } -} - - gchar* publishing_flickr_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc) { gchar* result = NULL; xmlNode* root = NULL; @@ -3516,152 +3244,152 @@ gchar* publishing_flickr_transaction_validate_xml (PublishingRESTSupportXmlDocum gchar* _tmp18_; gchar* _tmp19_; GError * _inner_error_ = NULL; -#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = doc; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" root = _tmp1_; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = root; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = (gchar*) xmlGetProp (_tmp2_, (xmlChar*) "stat"); -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" status = _tmp3_; -#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = status; -#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp4_ == NULL) { -#line 3523 "FlickrPublishing.c" +#line 3251 "FlickrPublishing.c" gchar* _tmp5_; -#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = g_strdup ("No status property in root node"); -#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp5_; -#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3533 "FlickrPublishing.c" +#line 3261 "FlickrPublishing.c" } -#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = status; -#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_strcmp0 (_tmp6_, "ok") == 0) { -#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = NULL; -#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3545 "FlickrPublishing.c" +#line 3273 "FlickrPublishing.c" } { xmlNode* _tmp7_ = NULL; PublishingRESTSupportXmlDocument* _tmp8_; xmlNode* _tmp9_; xmlNode* _tmp10_; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = doc; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = root; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_rest_support_xml_document_get_named_child (_tmp8_, _tmp9_, "err", &_inner_error_); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp10_; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 3564 "FlickrPublishing.c" +#line 3292 "FlickrPublishing.c" goto __catch16_spit_publishing_publishing_error; } -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 3575 "FlickrPublishing.c" +#line 3303 "FlickrPublishing.c" } -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" errcode = _tmp7_; -#line 3579 "FlickrPublishing.c" +#line 3307 "FlickrPublishing.c" } goto __finally16; __catch16_spit_publishing_publishing_error: { GError* err = NULL; gchar* _tmp11_; -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" err = _inner_error_; -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = g_strdup ("No error code specified"); -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp11_; -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3600 "FlickrPublishing.c" +#line 3328 "FlickrPublishing.c" } __finally16: -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 3613 "FlickrPublishing.c" +#line 3341 "FlickrPublishing.c" } -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = errcode; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = (gchar*) xmlGetProp (_tmp12_, (xmlChar*) "msg"); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = _tmp13_; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = errcode; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = (gchar*) xmlGetProp (_tmp15_, (xmlChar*) "code"); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = _tmp16_; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = g_strdup_printf ("%s (error code %s)", _tmp14_, _tmp17_); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = _tmp18_; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp17_); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp14_); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp19_; -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (status); -#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3641 "FlickrPublishing.c" +#line 3369 "FlickrPublishing.c" } static gchar* _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { gchar* result; result = publishing_flickr_transaction_validate_xml (doc); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3650 "FlickrPublishing.c" +#line 3378 "FlickrPublishing.c" } @@ -3681,14 +3409,14 @@ static gboolean string_contains (const gchar* self, const gchar* needle) { result = _tmp1_ != NULL; #line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 3670 "FlickrPublishing.c" +#line 3398 "FlickrPublishing.c" } static gpointer _g_error_copy0 (gpointer self) { -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? g_error_copy (self) : NULL; -#line 3677 "FlickrPublishing.c" +#line 3405 "FlickrPublishing.c" } @@ -3696,50 +3424,50 @@ PublishingRESTSupportXmlDocument* publishing_flickr_transaction_parse_flickr_res PublishingRESTSupportXmlDocument* result = NULL; PublishingRESTSupportXmlDocument* _result_ = NULL; GError * _inner_error_ = NULL; -#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (xml != NULL, NULL); -#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result_ = NULL; -#line 3689 "FlickrPublishing.c" +#line 3417 "FlickrPublishing.c" { PublishingRESTSupportXmlDocument* _tmp0_ = NULL; const gchar* _tmp1_; PublishingRESTSupportXmlDocument* _tmp2_; PublishingRESTSupportXmlDocument* _tmp3_; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = xml; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_rest_support_xml_document_parse_string (_tmp1_, _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = _tmp2_; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 3705 "FlickrPublishing.c" +#line 3433 "FlickrPublishing.c" goto __catch17_spit_publishing_publishing_error; } -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (_result_); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 3716 "FlickrPublishing.c" +#line 3444 "FlickrPublishing.c" } -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _tmp0_; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = NULL; -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (_result_); -#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result_ = _tmp3_; -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (_tmp0_); -#line 3728 "FlickrPublishing.c" +#line 3456 "FlickrPublishing.c" } goto __finally17; __catch17_spit_publishing_publishing_error: @@ -3751,158 +3479,120 @@ PublishingRESTSupportXmlDocument* publishing_flickr_transaction_parse_flickr_res gchar* _tmp7_; gboolean _tmp8_; gboolean _tmp9_; -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" e = _inner_error_; -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = e; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _tmp4_->message; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = g_strdup_printf ("(error code %s)", PUBLISHING_FLICKR_EXPIRED_SESSION_ERROR_CODE); -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = string_contains (_tmp5_, _tmp7_); -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = _tmp8_; -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp7_); -#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp9_) { -#line 3760 "FlickrPublishing.c" +#line 3488 "FlickrPublishing.c" GError* _tmp10_; const gchar* _tmp11_; GError* _tmp12_; -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = e; -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = _tmp10_->message; -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION, _tmp11_); -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = _tmp12_; -#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (e); -#line 3774 "FlickrPublishing.c" +#line 3502 "FlickrPublishing.c" goto __finally17; } else { GError* _tmp13_; GError* _tmp14_; -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = e; -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = _g_error_copy0 (_tmp13_); -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = _tmp14_; -#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (e); -#line 3787 "FlickrPublishing.c" +#line 3515 "FlickrPublishing.c" goto __finally17; } -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (e); -#line 3792 "FlickrPublishing.c" +#line 3520 "FlickrPublishing.c" } __finally17: -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_propagate_error (error, _inner_error_); -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (_result_); -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 3805 "FlickrPublishing.c" +#line 3533 "FlickrPublishing.c" } else { -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_xml_document_unref0 (_result_); -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 3815 "FlickrPublishing.c" +#line 3543 "FlickrPublishing.c" } } -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _result_; -#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 3822 "FlickrPublishing.c" -} - - -static void publishing_flickr_transaction_class_init (PublishingFlickrTransactionClass * klass) { -#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_transaction_parent_class = g_type_class_peek_parent (klass); -#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_flickr_transaction_real_execute; -#line 3831 "FlickrPublishing.c" -} - - -static void publishing_flickr_transaction_instance_init (PublishingFlickrTransaction * self) { +#line 3550 "FlickrPublishing.c" } -GType publishing_flickr_transaction_get_type (void) { - static volatile gsize publishing_flickr_transaction_type_id__volatile = 0; - if (g_once_init_enter (&publishing_flickr_transaction_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrTransaction), 0, (GInstanceInitFunc) publishing_flickr_transaction_instance_init, NULL }; - GType publishing_flickr_transaction_type_id; - publishing_flickr_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingFlickrTransaction", &g_define_type_info, 0); - g_once_init_leave (&publishing_flickr_transaction_type_id__volatile, publishing_flickr_transaction_type_id); - } - return publishing_flickr_transaction_type_id__volatile; -} - - -PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session) { +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session) { PublishingFlickrAccountInfoFetchTransaction* self = NULL; - PublishingFlickrSession* _tmp0_; - PublishingFlickrSession* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); -#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = session; -#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = (PublishingFlickrAccountInfoFetchTransaction*) publishing_flickr_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); -#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrAccountInfoFetchTransaction*) publishing_rest_support_oauth1_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "flickr.people.getUploadStatus"); -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = session; -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = publishing_flickr_session_get_access_phase_token (_tmp1_); -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = _tmp2_; -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp3_); -#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp3_); -#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 3877 "FlickrPublishing.c" +#line 3567 "FlickrPublishing.c" } -PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingFlickrSession* session) { -#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_account_info_fetch_transaction_construct (PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, session); -#line 3884 "FlickrPublishing.c" +#line 3574 "FlickrPublishing.c" } static void publishing_flickr_account_info_fetch_transaction_class_init (PublishingFlickrAccountInfoFetchTransactionClass * klass) { -#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_account_info_fetch_transaction_parent_class = g_type_class_peek_parent (klass); -#line 3891 "FlickrPublishing.c" +#line 3581 "FlickrPublishing.c" } @@ -3915,7 +3605,7 @@ GType publishing_flickr_account_info_fetch_transaction_get_type (void) { if (g_once_init_enter (&publishing_flickr_account_info_fetch_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrAccountInfoFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_account_info_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrAccountInfoFetchTransaction), 0, (GInstanceInitFunc) publishing_flickr_account_info_fetch_transaction_instance_init, NULL }; GType publishing_flickr_account_info_fetch_transaction_type_id; - publishing_flickr_account_info_fetch_transaction_type_id = g_type_register_static (PUBLISHING_FLICKR_TYPE_TRANSACTION, "PublishingFlickrAccountInfoFetchTransaction", &g_define_type_info, 0); + publishing_flickr_account_info_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingFlickrAccountInfoFetchTransaction", &g_define_type_info, 0); g_once_init_leave (&publishing_flickr_account_info_fetch_transaction_type_id__volatile, publishing_flickr_account_info_fetch_transaction_type_id); } return publishing_flickr_account_info_fetch_transaction_type_id__volatile; @@ -3923,651 +3613,270 @@ GType publishing_flickr_account_info_fetch_transaction_get_type (void) { static gpointer _publishing_flickr_publishing_parameters_ref0 (gpointer self) { -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? publishing_flickr_publishing_parameters_ref (self) : NULL; -#line 3914 "FlickrPublishing.c" -} - - -static gpointer _publishing_rest_support_session_ref0 (gpointer self) { -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self ? publishing_rest_support_session_ref (self) : NULL; -#line 3921 "FlickrPublishing.c" +#line 3604 "FlickrPublishing.c" } static void _g_free0_ (gpointer var) { -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" var = (g_free (var), NULL); -#line 3928 "FlickrPublishing.c" +#line 3611 "FlickrPublishing.c" } -PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { PublishingFlickrUploadTransaction* self = NULL; - PublishingFlickrSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp0_; SpitPublishingPublishable* _tmp1_; PublishingFlickrPublishingParameters* _tmp2_; PublishingFlickrPublishingParameters* _tmp3_; - PublishingFlickrSession* _tmp4_; - PublishingFlickrSession* _tmp5_; - PublishingRESTSupportArgument** _tmp6_; - PublishingFlickrSession* _tmp7_; + PublishingFlickrPublishingParameters* _tmp4_; + PublishingFlickrVisibilitySpecification* _tmp5_; + gint _tmp6_; + gchar* _tmp7_; gchar* _tmp8_; - gchar* _tmp9_; - PublishingFlickrSession* _tmp10_; - gchar* _tmp11_; + PublishingFlickrPublishingParameters* _tmp9_; + PublishingFlickrVisibilitySpecification* _tmp10_; + gint _tmp11_; gchar* _tmp12_; - PublishingFlickrSession* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; - PublishingFlickrSession* _tmp16_; + gchar* _tmp13_; + PublishingFlickrPublishingParameters* _tmp14_; + PublishingFlickrVisibilitySpecification* _tmp15_; + gint _tmp16_; gchar* _tmp17_; gchar* _tmp18_; - PublishingFlickrPublishingParameters* _tmp19_; - PublishingFlickrVisibilitySpecification* _tmp20_; - gint _tmp21_; - gchar* _tmp22_; + GHashTable* disposition_table = NULL; + GHashFunc _tmp19_; + GEqualFunc _tmp20_; + GHashTable* _tmp21_; + gchar* filename = NULL; + SpitPublishingPublishable* _tmp22_; gchar* _tmp23_; - PublishingFlickrPublishingParameters* _tmp24_; - PublishingFlickrVisibilitySpecification* _tmp25_; - gint _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - PublishingFlickrPublishingParameters* _tmp29_; - PublishingFlickrVisibilitySpecification* _tmp30_; - gint _tmp31_; + gboolean _tmp24_ = FALSE; + const gchar* _tmp25_; + GHashTable* _tmp29_; + gchar* _tmp30_; + SpitPublishingPublishable* _tmp31_; gchar* _tmp32_; gchar* _tmp33_; - GHashTable* disposition_table = NULL; - GHashFunc _tmp34_; - GEqualFunc _tmp35_; - GHashTable* _tmp36_; - gchar* filename = NULL; - SpitPublishingPublishable* _tmp37_; - gchar* _tmp38_; - gboolean _tmp39_ = FALSE; - const gchar* _tmp40_; - GHashTable* _tmp44_; - gchar* _tmp45_; - SpitPublishingPublishable* _tmp46_; - gchar* _tmp47_; - gchar* _tmp48_; - gchar* _tmp49_; - GHashTable* _tmp50_; - gchar* _tmp51_; - gchar* _tmp52_; - GHashTable* _tmp53_; -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gchar* _tmp34_; + GHashTable* _tmp35_; + gchar* _tmp36_; + gchar* _tmp37_; + GHashTable* _tmp38_; +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = session; -#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = publishable; -#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = (PublishingFlickrUploadTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, "https://api.flickr.com/services/upload"); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrUploadTransaction*) publishing_rest_support_oauth1_upload_transaction_construct (object_type, _tmp0_, _tmp1_, "https://api.flickr.com/services/upload"); +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = parameters; -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _publishing_flickr_publishing_parameters_ref0 (_tmp2_); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = _tmp3_; -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = session; -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = _publishing_rest_support_session_ref0 (_tmp4_); -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->session = _tmp5_; -#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = g_new0 (PublishingRESTSupportArgument*, 0 + 1); -#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.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 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->auth_header_fields = _tmp6_; -#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->auth_header_fields_length1 = 0; -#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->_auth_header_fields_size_ = self->priv->auth_header_fields_length1; -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp7_ = session; -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = publishing_flickr_session_get_oauth_nonce (_tmp7_); -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = _tmp8_; -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp9_); -#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp9_); -#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_signature_method", "HMAC-SHA1"); -#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_version", "1.0"); -#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_callback", "oob"); -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = session; -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp11_ = publishing_flickr_session_get_oauth_timestamp (_tmp10_); -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp12_ = _tmp11_; -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp12_); -#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp12_); -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp13_ = session; -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp14_ = publishing_flickr_session_get_consumer_key (_tmp13_); -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp15_ = _tmp14_; -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_consumer_key", _tmp15_); -#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp15_); -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp16_ = session; -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp17_ = publishing_flickr_session_get_access_phase_token (_tmp16_); -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = parameters; +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_->visibility_specification; +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _tmp5_->everyone_level; +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = g_strdup_printf ("%d", _tmp6_); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_public", _tmp8_); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp8_); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = parameters; +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = _tmp9_->visibility_specification; +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_->friends_level; +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_strdup_printf ("%d", _tmp11_); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _tmp12_; +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_friend", _tmp13_); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp13_); +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = parameters; +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _tmp14_->visibility_specification; +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = _tmp15_->family_level; +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = g_strdup_printf ("%d", _tmp16_); +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = _tmp17_; -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp18_); -#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_family", _tmp18_); +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp18_); -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp19_ = parameters; -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp20_ = _tmp19_->visibility_specification; -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp21_ = _tmp20_->everyone_level; -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp22_ = g_strdup_printf ("%d", _tmp21_); -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp23_ = _tmp22_; -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_public", _tmp23_); -#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp23_); -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp24_ = parameters; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp25_ = _tmp24_->visibility_specification; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp26_ = _tmp25_->friends_level; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp27_ = g_strdup_printf ("%d", _tmp26_); -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp28_ = _tmp27_; -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_friend", _tmp28_); -#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp28_); -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp29_ = parameters; -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp30_ = _tmp29_->visibility_specification; -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp31_ = _tmp30_->family_level; -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp32_ = g_strdup_printf ("%d", _tmp31_); -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp33_ = _tmp32_; -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_family", _tmp33_); -#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp33_); -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp34_ = g_str_hash; -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp35_ = g_str_equal; -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp36_ = g_hash_table_new_full (_tmp34_, _tmp35_, _g_free0_, _g_free0_); -#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - disposition_table = _tmp36_; -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp37_ = publishable; -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp38_ = spit_publishing_publishable_get_publishing_name (_tmp37_); -#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - filename = _tmp38_; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp40_ = filename; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp40_ == NULL) { -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp39_ = TRUE; -#line 4133 "FlickrPublishing.c" +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = g_str_hash; +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = g_str_equal; +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = g_hash_table_new_full (_tmp19_, _tmp20_, _g_free0_, _g_free0_); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + disposition_table = _tmp21_; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = publishable; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = spit_publishing_publishable_get_publishing_name (_tmp22_); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + filename = _tmp23_; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = filename; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp25_ == NULL) { +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = TRUE; +#line 3737 "FlickrPublishing.c" } else { - const gchar* _tmp41_; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp41_ = filename; -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp39_ = g_strcmp0 (_tmp41_, "") == 0; -#line 4140 "FlickrPublishing.c" + const gchar* _tmp26_; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = filename; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = g_strcmp0 (_tmp26_, "") == 0; +#line 3744 "FlickrPublishing.c" } -#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp39_) { -#line 4144 "FlickrPublishing.c" - SpitPublishingPublishable* _tmp42_; - gchar* _tmp43_; -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp42_ = publishable; -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp43_ = spit_publishing_publishable_get_param_string (_tmp42_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp24_) { +#line 3748 "FlickrPublishing.c" + SpitPublishingPublishable* _tmp27_; + gchar* _tmp28_; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = publishable; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = spit_publishing_publishable_get_param_string (_tmp27_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (filename); -#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - filename = _tmp43_; -#line 4155 "FlickrPublishing.c" - } -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp44_ = disposition_table; -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp45_ = g_strdup ("filename"); -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp46_ = publishable; -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp47_ = spit_publishing_publishable_get_param_string (_tmp46_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp48_ = _tmp47_; -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp49_ = soup_uri_encode (_tmp48_, NULL); -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_hash_table_insert (_tmp44_, _tmp45_, _tmp49_); -#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp48_); -#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp50_ = disposition_table; -#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp51_ = g_strdup ("name"); -#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp52_ = g_strdup ("photo"); -#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_hash_table_insert (_tmp50_, _tmp51_, _tmp52_); -#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp53_ = disposition_table; -#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_upload_transaction_set_binary_disposition_table (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), _tmp53_); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + filename = _tmp28_; +#line 3759 "FlickrPublishing.c" + } +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = disposition_table; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = g_strdup ("filename"); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = publishable; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = spit_publishing_publishable_get_param_string (_tmp31_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = _tmp32_; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = soup_uri_encode (_tmp33_, NULL); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_hash_table_insert (_tmp29_, _tmp30_, _tmp34_); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp33_); +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = disposition_table; +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = g_strdup ("name"); +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = g_strdup ("photo"); +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_hash_table_insert (_tmp35_, _tmp36_, _tmp37_); +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = disposition_table; +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_upload_transaction_set_binary_disposition_table (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), _tmp38_); +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (filename); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_hash_table_unref0 (disposition_table); -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 4191 "FlickrPublishing.c" +#line 3795 "FlickrPublishing.c" } -PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { -#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_upload_transaction_construct (PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, session, parameters, publishable); -#line 4198 "FlickrPublishing.c" -} - - -static void _vala_array_add19 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if ((*length) == (*size)) { -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 4209 "FlickrPublishing.c" - } -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - (*array)[(*length)++] = value; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - (*array)[*length] = NULL; -#line 4215 "FlickrPublishing.c" -} - - -void publishing_flickr_upload_transaction_add_authorization_header_field (PublishingFlickrUploadTransaction* self, const gchar* key, const gchar* value) { - PublishingRESTSupportArgument** _tmp0_; - gint _tmp0__length1; - const gchar* _tmp1_; - const gchar* _tmp2_; - PublishingRESTSupportArgument* _tmp3_; -#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self)); -#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (key != NULL); -#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (value != NULL); -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = self->priv->auth_header_fields; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0__length1 = self->priv->auth_header_fields_length1; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = key; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = value; -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = publishing_rest_support_argument_new (_tmp1_, _tmp2_); -#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add19 (&self->priv->auth_header_fields, &self->priv->auth_header_fields_length1, &self->priv->_auth_header_fields_size_, _tmp3_); -#line 4243 "FlickrPublishing.c" -} - - -static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self ? publishing_rest_support_argument_ref (self) : NULL; -#line 4250 "FlickrPublishing.c" -} - - -static PublishingRESTSupportArgument** _vala_array_dup8 (PublishingRESTSupportArgument** self, int length) { - PublishingRESTSupportArgument** result; - int i; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = g_new0 (PublishingRESTSupportArgument*, length + 1); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - for (i = 0; i < length; i++) { -#line 4261 "FlickrPublishing.c" - PublishingRESTSupportArgument* _tmp0_; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = _publishing_rest_support_argument_ref0 (self[i]); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result[i] = _tmp0_; -#line 4267 "FlickrPublishing.c" - } -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 4271 "FlickrPublishing.c" -} - - -PublishingRESTSupportArgument** publishing_flickr_upload_transaction_get_authorization_header_fields (PublishingFlickrUploadTransaction* self, int* result_length1) { - PublishingRESTSupportArgument** result = NULL; - PublishingRESTSupportArgument** _tmp0_; - gint _tmp0__length1; - PublishingRESTSupportArgument** _tmp1_; - gint _tmp1__length1; - PublishingRESTSupportArgument** _tmp2_; - gint _tmp2__length1; -#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self), NULL); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = self->priv->auth_header_fields; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0__length1 = self->priv->auth_header_fields_length1; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup8 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1__length1 = _tmp0__length1; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = _tmp1_; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2__length1 = _tmp1__length1; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (result_length1) { -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - *result_length1 = _tmp2__length1; -#line 4301 "FlickrPublishing.c" - } -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp2_; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 4307 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_upload_transaction_get_authorization_header_string (PublishingFlickrUploadTransaction* self) { - gchar* result = NULL; - gchar* _result_ = NULL; - gchar* _tmp0_; -#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self), NULL); -#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = g_strdup ("OAuth "); -#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _result_ = _tmp0_; -#line 4321 "FlickrPublishing.c" - { - gint i = 0; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - i = 0; -#line 4326 "FlickrPublishing.c" - { - gboolean _tmp1_ = FALSE; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = TRUE; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - while (TRUE) { -#line 4333 "FlickrPublishing.c" - gint _tmp3_; - PublishingRESTSupportArgument** _tmp4_; - gint _tmp4__length1; - const gchar* _tmp5_; - PublishingRESTSupportArgument** _tmp6_; - gint _tmp6__length1; - gint _tmp7_; - PublishingRESTSupportArgument* _tmp8_; - const gchar* _tmp9_; - gchar* _tmp10_; - const gchar* _tmp11_; - gchar* _tmp12_; - const gchar* _tmp13_; - PublishingRESTSupportArgument** _tmp14_; - gint _tmp14__length1; - gint _tmp15_; - PublishingRESTSupportArgument* _tmp16_; - const gchar* _tmp17_; - gchar* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; - gint _tmp23_; - PublishingRESTSupportArgument** _tmp24_; - gint _tmp24__length1; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (!_tmp1_) { -#line 4362 "FlickrPublishing.c" - gint _tmp2_; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = i; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - i = _tmp2_ + 1; -#line 4368 "FlickrPublishing.c" - } -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = FALSE; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = i; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = self->priv->auth_header_fields; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4__length1 = self->priv->auth_header_fields_length1; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - break; -#line 4382 "FlickrPublishing.c" - } -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = _result_; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = self->priv->auth_header_fields; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6__length1 = self->priv->auth_header_fields_length1; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp7_ = i; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = _tmp6_[_tmp7_]; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = _tmp8_->key; -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = g_strconcat (_tmp5_, _tmp9_, NULL); -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_result_); -#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _result_ = _tmp10_; -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp11_ = _result_; -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp12_ = g_strconcat (_tmp11_, "=", NULL); -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_result_); -#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _result_ = _tmp12_; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp13_ = _result_; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp14_ = self->priv->auth_header_fields; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp14__length1 = self->priv->auth_header_fields_length1; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp15_ = i; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp16_ = _tmp14_[_tmp15_]; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp17_ = _tmp16_->value; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp18_ = g_strconcat ("\"", _tmp17_, NULL); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp19_ = _tmp18_; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp20_ = g_strconcat (_tmp19_, "\"", NULL); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp21_ = _tmp20_; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp22_ = g_strconcat (_tmp13_, _tmp21_, NULL); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_result_); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _result_ = _tmp22_; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp21_); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp19_); -#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp23_ = i; -#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp24_ = self->priv->auth_header_fields; -#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp24__length1 = self->priv->auth_header_fields_length1; -#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp23_ < (_tmp24__length1 - 1)) { -#line 4448 "FlickrPublishing.c" - const gchar* _tmp25_; - gchar* _tmp26_; -#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp25_ = _result_; -#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp26_ = g_strconcat (_tmp25_, ", ", NULL); -#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_result_); -#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _result_ = _tmp26_; -#line 4459 "FlickrPublishing.c" - } - } - } - } -#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _result_; -#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 4468 "FlickrPublishing.c" +#line 3802 "FlickrPublishing.c" } static void publishing_flickr_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { PublishingFlickrUploadTransaction * self; - PublishingFlickrSession* _tmp0_; - gchar* authorization_header = NULL; - gchar* _tmp1_; GError * _inner_error_ = NULL; -#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransaction); -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = self->priv->session; -#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_session_sign_transaction (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); -#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = publishing_flickr_upload_transaction_get_authorization_header_string (self); -#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - authorization_header = _tmp1_; -#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:605: executing upload transaction: authorization" \ -" header string = '%s'", authorization_header); -#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", authorization_header); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_upload_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 534 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_oauth1_upload_transaction_authorize (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction)); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_upload_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_propagate_error (error, _inner_error_); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (authorization_header); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 4504 "FlickrPublishing.c" +#line 3823 "FlickrPublishing.c" } else { -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (authorization_header); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 4514 "FlickrPublishing.c" +#line 3831 "FlickrPublishing.c" } } -#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (authorization_header); -#line 4519 "FlickrPublishing.c" } static void publishing_flickr_upload_transaction_class_init (PublishingFlickrUploadTransactionClass * klass) { -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_upload_transaction_parent_class = g_type_class_peek_parent (klass); -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_flickr_upload_transaction_finalize; -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_class_add_private (klass, sizeof (PublishingFlickrUploadTransactionPrivate)); -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_flickr_upload_transaction_real_execute; -#line 4532 "FlickrPublishing.c" +#line 3846 "FlickrPublishing.c" } static void publishing_flickr_upload_transaction_instance_init (PublishingFlickrUploadTransaction * self) { -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv = PUBLISHING_FLICKR_UPLOAD_TRANSACTION_GET_PRIVATE (self); -#line 4539 "FlickrPublishing.c" +#line 3853 "FlickrPublishing.c" } static void publishing_flickr_upload_transaction_finalize (PublishingRESTSupportTransaction * obj) { PublishingFlickrUploadTransaction * self; -#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransaction); -#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _publishing_rest_support_session_unref0 (self->priv->session); -#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.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 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_upload_transaction_parent_class)->finalize (obj); -#line 4555 "FlickrPublishing.c" +#line 3865 "FlickrPublishing.c" } @@ -4576,1068 +3885,38 @@ GType publishing_flickr_upload_transaction_get_type (void) { if (g_once_init_enter (&publishing_flickr_upload_transaction_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrUploadTransaction), 0, (GInstanceInitFunc) publishing_flickr_upload_transaction_instance_init, NULL }; GType publishing_flickr_upload_transaction_type_id; - publishing_flickr_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, "PublishingFlickrUploadTransaction", &g_define_type_info, 0); + publishing_flickr_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, "PublishingFlickrUploadTransaction", &g_define_type_info, 0); g_once_init_leave (&publishing_flickr_upload_transaction_type_id__volatile, publishing_flickr_upload_transaction_type_id); } return publishing_flickr_upload_transaction_type_id__volatile; } -PublishingFlickrSession* publishing_flickr_session_construct (GType object_type) { - PublishingFlickrSession* self = NULL; -#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = (PublishingFlickrSession*) publishing_rest_support_session_construct (object_type, PUBLISHING_FLICKR_ENDPOINT_URL); -#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self; -#line 4577 "FlickrPublishing.c" -} - - -PublishingFlickrSession* publishing_flickr_session_new (void) { -#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return publishing_flickr_session_construct (PUBLISHING_FLICKR_TYPE_SESSION); -#line 4584 "FlickrPublishing.c" -} - - -static gboolean publishing_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base) { - PublishingFlickrSession * self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - const gchar* _tmp2_; -#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = self->priv->access_phase_token; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp2_ != NULL) { -#line 4600 "FlickrPublishing.c" - const gchar* _tmp3_; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = self->priv->access_phase_token_secret; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = _tmp3_ != NULL; -#line 4606 "FlickrPublishing.c" - } else { -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = FALSE; -#line 4610 "FlickrPublishing.c" - } -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp1_) { -#line 4614 "FlickrPublishing.c" - const gchar* _tmp4_; -#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = self->priv->username; -#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = _tmp4_ != NULL; -#line 4620 "FlickrPublishing.c" - } else { -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = FALSE; -#line 4624 "FlickrPublishing.c" - } -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp0_; -#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 4630 "FlickrPublishing.c" -} - - -void publishing_flickr_session_set_api_credentials (PublishingFlickrSession* self, const gchar* consumer_key, const gchar* consumer_secret) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (consumer_key != NULL); -#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (consumer_secret != NULL); -#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = consumer_key; -#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->consumer_key); -#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->consumer_key = _tmp1_; -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = consumer_secret; -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->consumer_secret); -#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->consumer_secret = _tmp3_; -#line 4661 "FlickrPublishing.c" -} - - -static gpointer _publishing_rest_support_transaction_ref0 (gpointer self) { -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return self ? publishing_rest_support_transaction_ref (self) : NULL; -#line 4668 "FlickrPublishing.c" -} - - -static void _vala_array_add20 (PublishingRESTSupportArgument** * array, int* length, int* size, PublishingRESTSupportArgument* value) { -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if ((*length) == (*size)) { -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); -#line 4679 "FlickrPublishing.c" - } -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - (*array)[(*length)++] = value; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - (*array)[*length] = NULL; -#line 4685 "FlickrPublishing.c" -} - - -void publishing_flickr_session_sign_transaction (PublishingFlickrSession* self, PublishingRESTSupportTransaction* txn) { - gchar* http_method = NULL; - PublishingRESTSupportTransaction* _tmp0_; - PublishingRESTSupportHttpMethod _tmp1_; - gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - PublishingRESTSupportArgument** base_string_arguments = NULL; - PublishingRESTSupportTransaction* _tmp6_; - gint _tmp7_; - PublishingRESTSupportArgument** _tmp8_; - gint base_string_arguments_length1; - gint _base_string_arguments_size_; - PublishingFlickrUploadTransaction* upload_txn = NULL; - PublishingRESTSupportTransaction* _tmp9_; - PublishingFlickrUploadTransaction* _tmp10_; - PublishingFlickrUploadTransaction* _tmp11_; - PublishingRESTSupportArgument** sorted_args = NULL; - PublishingRESTSupportArgument** _tmp20_; - gint _tmp20__length1; - gint _tmp21_; - PublishingRESTSupportArgument** _tmp22_; - gint sorted_args_length1; - gint _sorted_args_size_; - gchar* arguments_string = NULL; - gchar* _tmp23_; - gchar* signing_key = NULL; - const gchar* _tmp46_; - gchar* signature_base_string = NULL; - const gchar* _tmp54_; - gchar* _tmp55_; - gchar* _tmp56_; - PublishingRESTSupportTransaction* _tmp57_; - gchar* _tmp58_; - gchar* _tmp59_; - gchar* _tmp60_; - gchar* _tmp61_; - gchar* _tmp62_; - gchar* _tmp63_; - gchar* _tmp64_; - gchar* _tmp65_; - const gchar* _tmp66_; - gchar* _tmp67_; - gchar* _tmp68_; - gchar* _tmp69_; - gchar* _tmp70_; - const gchar* _tmp71_; - const gchar* _tmp72_; - gchar* signature = NULL; - const gchar* _tmp73_; - const gchar* _tmp74_; - gchar* _tmp75_; - const gchar* _tmp76_; - gchar* _tmp77_; - const gchar* _tmp78_; - PublishingFlickrUploadTransaction* _tmp79_; -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = txn; -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_); -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); -#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - http_method = _tmp2_; -#line 637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:637: signing transaction with parameters:"); -#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = http_method; -#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); -#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = _tmp4_; -#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:638: %s", _tmp5_); -#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp5_); -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = txn; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_); -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - base_string_arguments = _tmp8_; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - base_string_arguments_length1 = _tmp7_; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _base_string_arguments_size_ = base_string_arguments_length1; -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = txn; -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = _publishing_rest_support_transaction_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION) ? ((PublishingFlickrUploadTransaction*) _tmp9_) : NULL); -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - upload_txn = _tmp10_; -#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp11_ = upload_txn; -#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp11_ != NULL) { -#line 4790 "FlickrPublishing.c" - PublishingRESTSupportArgument** auth_header_args = NULL; - PublishingFlickrUploadTransaction* _tmp12_; - gint _tmp13_; - PublishingRESTSupportArgument** _tmp14_; - gint auth_header_args_length1; - gint _auth_header_args_size_; - PublishingRESTSupportArgument** _tmp15_; - gint _tmp15__length1; -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:644: %s", "this transaction is an UploadTransaction; including Authorization head" \ -"er " "fields in signature base string"); -#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp12_ = upload_txn; -#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp14_ = publishing_flickr_upload_transaction_get_authorization_header_fields (_tmp12_, &_tmp13_); -#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - auth_header_args = _tmp14_; -#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - auth_header_args_length1 = _tmp13_; -#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _auth_header_args_size_ = auth_header_args_length1; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp15_ = auth_header_args; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp15__length1 = auth_header_args_length1; -#line 4815 "FlickrPublishing.c" - { - PublishingRESTSupportArgument** arg_collection = NULL; - gint arg_collection_length1 = 0; - gint _arg_collection_size_ = 0; - gint arg_it = 0; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arg_collection = _tmp15_; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arg_collection_length1 = _tmp15__length1; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - for (arg_it = 0; arg_it < _tmp15__length1; arg_it = arg_it + 1) { -#line 4827 "FlickrPublishing.c" - PublishingRESTSupportArgument* _tmp16_; - PublishingRESTSupportArgument* arg = NULL; -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp16_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arg = _tmp16_; -#line 4834 "FlickrPublishing.c" - { - PublishingRESTSupportArgument** _tmp17_; - gint _tmp17__length1; - PublishingRESTSupportArgument* _tmp18_; - PublishingRESTSupportArgument* _tmp19_; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp17_ = base_string_arguments; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp17__length1 = base_string_arguments_length1; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp18_ = arg; -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp19_ = _publishing_rest_support_argument_ref0 (_tmp18_); -#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add20 (&base_string_arguments, &base_string_arguments_length1, &_base_string_arguments_size_, _tmp19_); -#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _publishing_rest_support_argument_unref0 (arg); -#line 4852 "FlickrPublishing.c" - } - } - } -#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - auth_header_args = (_vala_array_free (auth_header_args, auth_header_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 4858 "FlickrPublishing.c" - } -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp20_ = base_string_arguments; -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp20__length1 = base_string_arguments_length1; -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp22_ = publishing_rest_support_argument_sort (_tmp20_, _tmp20__length1, &_tmp21_); -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - sorted_args = _tmp22_; -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - sorted_args_length1 = _tmp21_; -#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _sorted_args_size_ = sorted_args_length1; -#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp23_ = g_strdup (""); -#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arguments_string = _tmp23_; -#line 4876 "FlickrPublishing.c" - { - gint i = 0; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - i = 0; -#line 4881 "FlickrPublishing.c" - { - gboolean _tmp24_ = FALSE; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp24_ = TRUE; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - while (TRUE) { -#line 4888 "FlickrPublishing.c" - gint _tmp26_; - PublishingRESTSupportArgument** _tmp27_; - gint _tmp27__length1; - const gchar* _tmp28_; - PublishingRESTSupportArgument** _tmp29_; - gint _tmp29__length1; - gint _tmp30_; - PublishingRESTSupportArgument* _tmp31_; - const gchar* _tmp32_; - gchar* _tmp33_; - gchar* _tmp34_; - PublishingRESTSupportArgument** _tmp35_; - gint _tmp35__length1; - gint _tmp36_; - PublishingRESTSupportArgument* _tmp37_; - const gchar* _tmp38_; - gchar* _tmp39_; - gchar* _tmp40_; - gchar* _tmp41_; - gint _tmp42_; - PublishingRESTSupportArgument** _tmp43_; - gint _tmp43__length1; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (!_tmp24_) { -#line 4913 "FlickrPublishing.c" - gint _tmp25_; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp25_ = i; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - i = _tmp25_ + 1; -#line 4919 "FlickrPublishing.c" - } -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp24_ = FALSE; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp26_ = i; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp27_ = sorted_args; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp27__length1 = sorted_args_length1; -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (!(_tmp26_ < _tmp27__length1)) { -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - break; -#line 4933 "FlickrPublishing.c" - } -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp28_ = arguments_string; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp29_ = sorted_args; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp29__length1 = sorted_args_length1; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp30_ = i; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp31_ = _tmp29_[_tmp30_]; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp32_ = _tmp31_->key; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp33_ = g_strconcat (_tmp32_, "=", NULL); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp34_ = _tmp33_; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp35_ = sorted_args; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp35__length1 = sorted_args_length1; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp36_ = i; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp37_ = _tmp35_[_tmp36_]; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp38_ = _tmp37_->value; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp39_ = g_strconcat (_tmp34_, _tmp38_, NULL); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp40_ = _tmp39_; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp41_ = g_strconcat (_tmp28_, _tmp40_, NULL); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (arguments_string); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arguments_string = _tmp41_; -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp40_); -#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp34_); -#line 660 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp42_ = i; -#line 660 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp43_ = sorted_args; -#line 660 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp43__length1 = sorted_args_length1; -#line 660 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp42_ < (_tmp43__length1 - 1)) { -#line 4983 "FlickrPublishing.c" - const gchar* _tmp44_; - gchar* _tmp45_; -#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp44_ = arguments_string; -#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp45_ = g_strconcat (_tmp44_, "&", NULL); -#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (arguments_string); -#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - arguments_string = _tmp45_; -#line 4994 "FlickrPublishing.c" - } - } - } - } -#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signing_key = NULL; -#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp46_ = self->priv->access_phase_token_secret; -#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp46_ != NULL) { -#line 5005 "FlickrPublishing.c" - const gchar* _tmp47_; - gchar* _tmp48_; - gchar* _tmp49_; - const gchar* _tmp50_; - gchar* _tmp51_; -#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:666: access phase token secret available; using " \ -"it as signing key"); -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp47_ = self->priv->consumer_secret; -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp48_ = g_strconcat (_tmp47_, "&", NULL); -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp49_ = _tmp48_; -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp50_ = self->priv->access_phase_token_secret; -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp51_ = g_strconcat (_tmp49_, _tmp50_, NULL); -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signing_key); -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signing_key = _tmp51_; -#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp49_); -#line 5029 "FlickrPublishing.c" - } else { - const gchar* _tmp52_; - gchar* _tmp53_; -#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:670: %s", "neither access phase nor request phase token secrets available; using " \ -"API " "key as signing key"); -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp52_ = self->priv->consumer_secret; -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp53_ = g_strconcat (_tmp52_, "&", NULL); -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signing_key); -#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signing_key = _tmp53_; -#line 5043 "FlickrPublishing.c" - } -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp54_ = http_method; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp55_ = g_strconcat (_tmp54_, "&", NULL); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp56_ = _tmp55_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp57_ = txn; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp58_ = publishing_rest_support_transaction_get_endpoint_url (_tmp57_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp59_ = _tmp58_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp60_ = soup_uri_encode (_tmp59_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp61_ = _tmp60_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp62_ = g_strconcat (_tmp56_, _tmp61_, NULL); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp63_ = _tmp62_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp64_ = g_strconcat (_tmp63_, "&", NULL); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp65_ = _tmp64_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp66_ = arguments_string; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp67_ = soup_uri_encode (_tmp66_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp68_ = _tmp67_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp69_ = g_strconcat (_tmp65_, _tmp68_, NULL); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp70_ = _tmp69_; -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp68_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp65_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp63_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp61_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp59_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp56_); -#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signature_base_string = _tmp70_; -#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp71_ = signature_base_string; -#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:680: signature base string = '%s'", _tmp71_); -#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp72_ = signing_key; -#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:682: signing key = '%s'", _tmp72_); -#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp73_ = signing_key; -#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp74_ = signature_base_string; -#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp75_ = publishing_rest_support_hmac_sha1 (_tmp73_, _tmp74_); -#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signature = _tmp75_; -#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp76_ = signature; -#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp77_ = soup_uri_encode (_tmp76_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); -#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signature); -#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - signature = _tmp77_; -#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp78_ = signature; -#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_debug ("FlickrPublishing.vala:688: signature = '%s'", _tmp78_); -#line 690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp79_ = upload_txn; -#line 690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - if (_tmp79_ != NULL) { -#line 5125 "FlickrPublishing.c" - PublishingFlickrUploadTransaction* _tmp80_; - const gchar* _tmp81_; -#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp80_ = upload_txn; -#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp81_ = signature; -#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_upload_transaction_add_authorization_header_field (_tmp80_, "oauth_signature", _tmp81_); -#line 5134 "FlickrPublishing.c" - } else { - PublishingRESTSupportTransaction* _tmp82_; - const gchar* _tmp83_; -#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp82_ = txn; -#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp83_ = signature; -#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_rest_support_transaction_add_argument (_tmp82_, "oauth_signature", _tmp83_); -#line 5144 "FlickrPublishing.c" - } -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signature); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signature_base_string); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (signing_key); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (arguments_string); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _publishing_rest_support_transaction_unref0 (upload_txn); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (http_method); -#line 5162 "FlickrPublishing.c" -} - - -void publishing_flickr_session_set_access_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) { - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (token != NULL); -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (secret != NULL); -#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_if_fail (username != NULL); -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = token; -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->access_phase_token = _tmp1_; -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = secret; -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->access_phase_token_secret = _tmp3_; -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = username; -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->username); -#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->username = _tmp5_; -#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); -#line 5207 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_session_get_oauth_nonce (PublishingFlickrSession* self) { - gchar* result = NULL; - GTimeVal currtime = {0}; - GTimeVal _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - GTimeVal _tmp4_; - glong _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); -#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_get_current_time (&currtime); -#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_get_current_time (&currtime); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = currtime; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = _tmp0_.tv_sec; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = g_strdup_printf ("%li", _tmp1_); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = _tmp2_; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = currtime; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp5_ = _tmp4_.tv_usec; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp6_ = g_strdup_printf ("%li", _tmp5_); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp7_ = _tmp6_; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp9_ = _tmp8_; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp11_ = _tmp10_; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp9_); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp7_); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp3_); -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp11_; -#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 5266 "FlickrPublishing.c" -} - - -static glong string_strnlen (gchar* str, glong maxlen) { - glong result = 0L; - gchar* end = NULL; - gchar* _tmp0_; - glong _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = str; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = maxlen; -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); -#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - end = _tmp2_; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = end; -#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp3_ == NULL) { -#line 5289 "FlickrPublishing.c" - glong _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = maxlen; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 5297 "FlickrPublishing.c" - } else { - gchar* _tmp5_; - gchar* _tmp6_; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = str; -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = (glong) (_tmp5_ - _tmp6_); -#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 5309 "FlickrPublishing.c" - } -} - - -static gchar* string_substring (const gchar* self, glong offset, glong len) { - gchar* result = NULL; - glong string_length = 0L; - gboolean _tmp0_ = FALSE; - glong _tmp1_; - glong _tmp8_; - glong _tmp14_; - glong _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - gchar* _tmp22_; -#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = offset; -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp1_ >= ((glong) 0)) { -#line 5333 "FlickrPublishing.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 5339 "FlickrPublishing.c" - } else { -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 5343 "FlickrPublishing.c" - } -#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 5347 "FlickrPublishing.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 5359 "FlickrPublishing.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 5369 "FlickrPublishing.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 5375 "FlickrPublishing.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 5389 "FlickrPublishing.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 5399 "FlickrPublishing.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 5405 "FlickrPublishing.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 5414 "FlickrPublishing.c" - } -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp17_ = offset; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp18_ = len; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp19_ = string_length; -#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp20_ = offset; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp21_ = len; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp22_; -#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 5434 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_session_get_oauth_timestamp (PublishingFlickrSession* self) { - gchar* result = NULL; - gint64 _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = g_get_real_time (); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = _tmp1_; -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp4_ = _tmp3_; -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (_tmp2_); -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp4_; -#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 5463 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_session_get_consumer_key (PublishingFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); -#line 717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = self->priv->consumer_key; -#line 717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_assert (_tmp0_ != NULL, "consumer_key != null"); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = self->priv->consumer_key; -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp2_; -#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 5486 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_session_get_access_phase_token (PublishingFlickrSession* self) { - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); -#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = self->priv->access_phase_token; -#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_assert (_tmp0_ != NULL, "access_phase_token != null"); -#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = self->priv->access_phase_token; -#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp2_; -#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 5509 "FlickrPublishing.c" -} - - -gchar* publishing_flickr_session_get_username (PublishingFlickrSession* self) { - gchar* result = NULL; - gboolean _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); -#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_assert (_tmp0_, "is_authenticated()"); -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp1_ = self->priv->username; -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp2_ = g_strdup (_tmp1_); -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - result = _tmp2_; -#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - return result; -#line 5532 "FlickrPublishing.c" -} - - -static void publishing_flickr_session_class_init (PublishingFlickrSessionClass * klass) { -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - publishing_flickr_session_parent_class = g_type_class_peek_parent (klass); -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_flickr_session_finalize; -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_type_class_add_private (klass, sizeof (PublishingFlickrSessionPrivate)); -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = (gboolean (*) (PublishingRESTSupportSession *)) publishing_flickr_session_real_is_authenticated; -#line 5545 "FlickrPublishing.c" -} - - -static void publishing_flickr_session_instance_init (PublishingFlickrSession * self) { -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv = PUBLISHING_FLICKR_SESSION_GET_PRIVATE (self); -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->access_phase_token = NULL; -#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->access_phase_token_secret = NULL; -#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->username = NULL; -#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->consumer_key = NULL; -#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self->priv->consumer_secret = NULL; -#line 5562 "FlickrPublishing.c" -} - - -static void publishing_flickr_session_finalize (PublishingRESTSupportSession * obj) { - PublishingFlickrSession * self; -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); -#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->access_phase_token); -#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->access_phase_token_secret); -#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->username); -#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->consumer_key); -#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _g_free0 (self->priv->consumer_secret); -#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_flickr_session_parent_class)->finalize (obj); -#line 5582 "FlickrPublishing.c" -} - - -GType publishing_flickr_session_get_type (void) { - static volatile gsize publishing_flickr_session_type_id__volatile = 0; - if (g_once_init_enter (&publishing_flickr_session_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrSession), 0, (GInstanceInitFunc) publishing_flickr_session_instance_init, NULL }; - GType publishing_flickr_session_type_id; - publishing_flickr_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingFlickrSession", &g_define_type_info, 0); - g_once_init_leave (&publishing_flickr_session_type_id__volatile, publishing_flickr_session_type_id); - } - return publishing_flickr_session_type_id__volatile; -} - - static void _publishing_flickr_publishing_options_pane_on_visibility_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 820 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_on_visibility_changed ((PublishingFlickrPublishingOptionsPane*) self); -#line 5601 "FlickrPublishing.c" +#line 3884 "FlickrPublishing.c" } static void _publishing_flickr_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_on_size_changed ((PublishingFlickrPublishingOptionsPane*) self); -#line 5608 "FlickrPublishing.c" +#line 3891 "FlickrPublishing.c" } static void _publishing_flickr_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_on_logout_clicked ((PublishingFlickrPublishingOptionsPane*) self); -#line 5615 "FlickrPublishing.c" +#line 3898 "FlickrPublishing.c" } static void _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_on_publish_clicked ((PublishingFlickrPublishingOptionsPane*) self); -#line 5622 "FlickrPublishing.c" +#line 3905 "FlickrPublishing.c" } @@ -5710,214 +3989,214 @@ PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane gboolean _tmp82_; GtkButton* _tmp83_; GtkButton* _tmp84_; -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (publisher), NULL); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrPublishingOptionsPane*) g_object_new (object_type, NULL); -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = builder; -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->builder); -#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->builder = _tmp1_; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = builder; -#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _vala_assert (_tmp2_ != NULL, "builder != null"); -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = builder; -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = gtk_builder_get_objects (_tmp3_); -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _tmp4_; -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = g_slist_length (_tmp5_); -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0"); -#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_slist_free0 (_tmp5_); -#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = self->priv->builder; -#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = gtk_builder_get_object (_tmp7_, "flickr_pane"); -#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_box_get_type (), GtkBox)); -#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->pane_widget); -#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->pane_widget = _tmp9_; -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = self->priv->builder; -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = gtk_builder_get_object (_tmp10_, "visibility_label"); -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_label_get_type (), GtkLabel)); -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->visibility_label); -#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibility_label = _tmp12_; -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = self->priv->builder; -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = gtk_builder_get_object (_tmp13_, "upload_info_label"); -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_label_get_type (), GtkLabel)); -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->upload_info_label); -#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->upload_info_label = _tmp15_; -#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = self->priv->builder; -#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = gtk_builder_get_object (_tmp16_, "logout_button"); -#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_button_get_type (), GtkButton)); -#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->logout_button); -#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->logout_button = _tmp18_; -#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = self->priv->builder; -#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = gtk_builder_get_object (_tmp19_, "publish_button"); -#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_button_get_type (), GtkButton)); -#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publish_button); -#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publish_button = _tmp21_; -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_ = self->priv->builder; -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = gtk_builder_get_object (_tmp22_, "visibility_combo"); -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_combo_box_text_get_type (), GtkComboBoxText)); -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->visibility_combo); -#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibility_combo = _tmp24_; -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp25_ = self->priv->builder; -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp26_ = gtk_builder_get_object (_tmp25_, "size_combo"); -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_text_get_type (), GtkComboBoxText)); -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->size_combo); -#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->size_combo = _tmp27_; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp28_ = self->priv->builder; -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp29_ = gtk_builder_get_object (_tmp28_, "size_label"); -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_label_get_type (), GtkLabel)); -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->size_label); -#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->size_label = _tmp30_; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp31_ = self->priv->builder; -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp32_ = gtk_builder_get_object (_tmp31_, "strip_metadata_check"); -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_check_button_get_type (), GtkCheckButton)); -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->strip_metadata_check); -#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->strip_metadata_check = _tmp33_; -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp34_ = publisher; -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp35_ = publishing_flickr_flickr_publisher_get_authenticator (_tmp34_); -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp36_ = _tmp35_; -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp37_ = spit_publishing_authenticator_can_logout (_tmp36_); -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp38_ = !_tmp37_; -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp36_); -#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp38_) { -#line 5831 "FlickrPublishing.c" +#line 4114 "FlickrPublishing.c" GtkButton* _tmp39_; GtkContainer* _tmp40_; GtkContainer* _tmp41_; GtkButton* _tmp42_; -#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp39_ = self->priv->logout_button; -#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp40_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget)); -#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp41_ = _tmp40_; -#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp42_ = self->priv->logout_button; -#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_container_remove (_tmp41_, G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget)); -#line 5846 "FlickrPublishing.c" +#line 4129 "FlickrPublishing.c" } -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp43_ = parameters; -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp44_ = _publishing_flickr_publishing_parameters_ref0 (_tmp43_); -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 793 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = _tmp44_; -#line 794 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp45_ = publisher; -#line 794 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp46_ = _g_object_ref0 (_tmp45_); -#line 794 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publisher); -#line 794 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publisher = _tmp46_; -#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp47_ = media_type; -#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->media_type = _tmp47_; -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp49_ = publishing_flickr_publishing_options_pane_create_visibilities (self, &_tmp48_); -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = _tmp49_; -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities_length1 = _tmp48_; -#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_visibilities_size_ = self->priv->visibilities_length1; -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp51_ = publishing_flickr_publishing_options_pane_create_sizes (self, &_tmp50_); -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = _tmp51_; -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes_length1 = _tmp50_; -#line 798 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp52_ = parameters; -#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp53_ = _tmp52_->username; -#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp54_ = g_strdup_printf (_ ("You are logged into Flickr as %s.\n\n"), _tmp53_); -#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" upload_label_text = _tmp54_; -#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp55_ = parameters; -#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp56_ = _tmp55_->user_kind; -#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp56_ == PUBLISHING_FLICKR_USER_KIND_FREE) { -#line 5902 "FlickrPublishing.c" +#line 4185 "FlickrPublishing.c" const gchar* _tmp57_; PublishingFlickrPublishingParameters* _tmp58_; gint64 _tmp59_; @@ -5926,168 +4205,168 @@ PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane gchar* _tmp62_; gchar* _tmp63_; gchar* _tmp64_; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp57_ = upload_label_text; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp58_ = parameters; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp59_ = _tmp58_->quota_free_bytes; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp60_ = g_format_size_full ((guint64) _tmp59_, G_FORMAT_SIZE_LONG_FORMAT | G_FORMAT_SIZE_IEC_UNITS); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp61_ = _tmp60_; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp62_ = g_strdup_printf (_ ("Your free Flickr account limits how much data you can upload per month" \ ".\n" \ "This month you have %s remaining in your upload quota."), _tmp61_); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp63_ = _tmp62_; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp64_ = g_strconcat (_tmp57_, _tmp63_, NULL); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (upload_label_text); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" upload_label_text = _tmp64_; -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp63_); -#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp61_); -#line 5935 "FlickrPublishing.c" +#line 4218 "FlickrPublishing.c" } else { const gchar* _tmp65_; gchar* _tmp66_; -#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp65_ = upload_label_text; -#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp66_ = g_strconcat (_tmp65_, _ ("Your Flickr Pro account entitles you to unlimited uploads."), NULL); -#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (upload_label_text); -#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" upload_label_text = _tmp66_; -#line 5947 "FlickrPublishing.c" +#line 4230 "FlickrPublishing.c" } -#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp67_ = self->priv->upload_info_label; -#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp68_ = upload_label_text; -#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_label_set_label (_tmp67_, _tmp68_); -#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp69_ = g_strdup (_ ("Photos _visible to:")); -#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" visibility_label_text = _tmp69_; -#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp70_ = media_type; -#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp70_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { -#line 5963 "FlickrPublishing.c" +#line 4246 "FlickrPublishing.c" gchar* _tmp71_; -#line 811 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp71_ = g_strdup (_ ("Videos _visible to:")); -#line 811 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (visibility_label_text); -#line 811 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" visibility_label_text = _tmp71_; -#line 5971 "FlickrPublishing.c" +#line 4254 "FlickrPublishing.c" } else { SpitPublishingPublisherMediaType _tmp72_; -#line 812 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp72_ = media_type; -#line 812 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp72_ == (SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO)) { -#line 5978 "FlickrPublishing.c" +#line 4261 "FlickrPublishing.c" gchar* _tmp73_; -#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp73_ = g_strdup (_ ("Photos and videos _visible to:")); -#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (visibility_label_text); -#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" visibility_label_text = _tmp73_; -#line 5986 "FlickrPublishing.c" +#line 4269 "FlickrPublishing.c" } } -#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp74_ = self->priv->visibility_label; -#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp75_ = visibility_label_text; -#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_label_set_label (_tmp74_, _tmp75_); -#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_populate_visibility_combo (self); -#line 820 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp76_ = self->priv->visibility_combo; -#line 820 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_flickr_publishing_options_pane_on_visibility_changed_gtk_combo_box_changed, self, 0); -#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp77_ = media_type; -#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp77_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { -#line 6005 "FlickrPublishing.c" +#line 4288 "FlickrPublishing.c" GtkComboBoxText* _tmp78_; -#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_populate_size_combo (self); -#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp78_ = self->priv->size_combo; -#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_flickr_publishing_options_pane_on_size_changed_gtk_combo_box_changed, self, 0); -#line 6013 "FlickrPublishing.c" +#line 4296 "FlickrPublishing.c" } else { GtkComboBoxText* _tmp79_; GtkLabel* _tmp80_; -#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp79_ = self->priv->size_combo; -#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp80_ = self->priv->size_label; -#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 6025 "FlickrPublishing.c" +#line 4308 "FlickrPublishing.c" } -#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp81_ = self->priv->strip_metadata_check; -#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp82_ = strip_metadata; -#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp82_); -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp83_ = self->priv->logout_button; -#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (_tmp83_, "clicked", (GCallback) _publishing_flickr_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); -#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp84_ = self->priv->publish_button; -#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (_tmp84_, "clicked", (GCallback) _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (visibility_label_text); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (upload_label_text); -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 6047 "FlickrPublishing.c" +#line 4330 "FlickrPublishing.c" } PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_new (PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata) { -#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_publishing_options_pane_construct (PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, publisher, parameters, media_type, builder, strip_metadata); -#line 6054 "FlickrPublishing.c" +#line 4337 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_on_logout_clicked (PublishingFlickrPublishingOptionsPane* self) { -#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 838 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_emit (self, publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); -#line 6063 "FlickrPublishing.c" +#line 4346 "FlickrPublishing.c" } static gpointer _publishing_flickr_visibility_specification_ref0 (gpointer self) { -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? publishing_flickr_visibility_specification_ref (self) : NULL; -#line 6070 "FlickrPublishing.c" +#line 4353 "FlickrPublishing.c" } @@ -6103,33 +4382,33 @@ static void publishing_flickr_publishing_options_pane_on_publish_clicked (Publis SpitPublishingPublisherMediaType _tmp7_; GtkCheckButton* _tmp14_; gboolean _tmp15_; -#line 841 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->parameters; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->visibilities; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1__length1 = self->priv->visibilities_length1; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = self->priv->visibility_combo; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox)); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = _tmp1_[_tmp3_]; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _tmp4_->specification; -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = _publishing_flickr_visibility_specification_ref0 (_tmp5_); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp0_->visibility_specification); -#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_->visibility_specification = _tmp6_; -#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = self->priv->media_type; -#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((_tmp7_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0) { -#line 6112 "FlickrPublishing.c" +#line 4395 "FlickrPublishing.c" PublishingFlickrPublishingParameters* _tmp8_; PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp9_; gint _tmp9__length1; @@ -6137,116 +4416,116 @@ static void publishing_flickr_publishing_options_pane_on_publish_clicked (Publis gint _tmp11_; PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp12_; gint _tmp13_; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = self->priv->parameters; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = self->priv->sizes; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9__length1 = self->priv->sizes_length1; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = self->priv->size_combo; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox)); -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = _tmp9_[_tmp11_]; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = _tmp12_->size; -#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_->photo_major_axis_size = _tmp13_; -#line 6136 "FlickrPublishing.c" +#line 4419 "FlickrPublishing.c" } -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = self->priv->strip_metadata_check; -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_toggle_button_get_type (), GtkToggleButton)); -#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_emit (self, publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0, _tmp15_); -#line 6144 "FlickrPublishing.c" +#line 4427 "FlickrPublishing.c" } -static void _vala_array_add21 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add20 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); -#line 6155 "FlickrPublishing.c" +#line 4438 "FlickrPublishing.c" } -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6161 "FlickrPublishing.c" +#line 4444 "FlickrPublishing.c" } -static void _vala_array_add22 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add21 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); -#line 6172 "FlickrPublishing.c" +#line 4455 "FlickrPublishing.c" } -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6178 "FlickrPublishing.c" +#line 4461 "FlickrPublishing.c" } -static void _vala_array_add23 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add22 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); -#line 6189 "FlickrPublishing.c" +#line 4472 "FlickrPublishing.c" } -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6195 "FlickrPublishing.c" +#line 4478 "FlickrPublishing.c" } -static void _vala_array_add24 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add23 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); -#line 6206 "FlickrPublishing.c" +#line 4489 "FlickrPublishing.c" } -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6212 "FlickrPublishing.c" +#line 4495 "FlickrPublishing.c" } -static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add24 (PublishingFlickrPublishingOptionsPaneVisibilityEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); -#line 6223 "FlickrPublishing.c" +#line 4506 "FlickrPublishing.c" } -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6229 "FlickrPublishing.c" +#line 4512 "FlickrPublishing.c" } @@ -6283,108 +4562,108 @@ static PublishingFlickrPublishingOptionsPaneVisibilityEntry** publishing_flickr_ PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp20_; PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp21_; gint _tmp21__length1; -#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self), NULL); -#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = g_new0 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, 0 + 1); -#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result_ = _tmp0_; -#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result__length1 = 0; -#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" __result__size_ = _result__length1; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _result_; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1__length1 = _result__length1; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_flickr_visibility_specification_new (1, 1, 1); -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _tmp2_; -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_ ("Everyone"), _tmp3_); -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add21 (&_result_, &_result__length1, &__result__size_, _tmp4_); -#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add20 (&_result_, &_result__length1, &__result__size_, _tmp4_); +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp3_); -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _result_; -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5__length1 = _result__length1; -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = publishing_flickr_visibility_specification_new (1, 1, 0); -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_; -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_ ("Friends & family only"), _tmp7_); -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add22 (&_result_, &_result__length1, &__result__size_, _tmp8_); -#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add21 (&_result_, &_result__length1, &__result__size_, _tmp8_); +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp7_); -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = _result_; -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9__length1 = _result__length1; -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_flickr_visibility_specification_new (0, 1, 0); -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = _tmp10_; -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_ ("Family only"), _tmp11_); -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add23 (&_result_, &_result__length1, &__result__size_, _tmp12_); -#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add22 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp11_); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = _result_; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13__length1 = _result__length1; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = publishing_flickr_visibility_specification_new (1, 0, 0); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = _tmp14_; -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_ ("Friends only"), _tmp15_); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add24 (&_result_, &_result__length1, &__result__size_, _tmp16_); -#line 857 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add23 (&_result_, &_result__length1, &__result__size_, _tmp16_); +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp15_); -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = _result_; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17__length1 = _result__length1; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = publishing_flickr_visibility_specification_new (0, 0, 0); -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = _tmp18_; -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_ ("Just me"), _tmp19_); -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add25 (&_result_, &_result__length1, &__result__size_, _tmp20_); -#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add24 (&_result_, &_result__length1, &__result__size_, _tmp20_); +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (_tmp19_); -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp21_ = _result_; -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp21__length1 = _result__length1; -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (result_length1) { -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *result_length1 = _tmp21__length1; -#line 6354 "FlickrPublishing.c" +#line 4637 "FlickrPublishing.c" } -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp21_; -#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 6360 "FlickrPublishing.c" +#line 4643 "FlickrPublishing.c" } static gpointer _publishing_flickr_publishing_options_pane_visibility_entry_ref0 (gpointer self) { -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? publishing_flickr_publishing_options_pane_visibility_entry_ref (self) : NULL; -#line 6367 "FlickrPublishing.c" +#line 4650 "FlickrPublishing.c" } @@ -6396,165 +4675,165 @@ static void publishing_flickr_publishing_options_pane_populate_visibility_combo GtkComboBoxText* _tmp8_; PublishingFlickrFlickrPublisher* _tmp9_; gint _tmp10_; -#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->visibilities; -#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0__length1 = self->priv->visibilities_length1; -#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp0_ == NULL) { -#line 6387 "FlickrPublishing.c" +#line 4670 "FlickrPublishing.c" gint _tmp1_; PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp2_; -#line 865 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_flickr_publishing_options_pane_create_visibilities (self, &_tmp1_); -#line 865 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); -#line 865 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = _tmp2_; -#line 865 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities_length1 = _tmp1_; -#line 865 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_visibilities_size_ = self->priv->visibilities_length1; -#line 6400 "FlickrPublishing.c" +#line 4683 "FlickrPublishing.c" } -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = self->priv->visibilities; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3__length1 = self->priv->visibilities_length1; -#line 6406 "FlickrPublishing.c" +#line 4689 "FlickrPublishing.c" { PublishingFlickrPublishingOptionsPaneVisibilityEntry** v_collection = NULL; gint v_collection_length1 = 0; gint _v_collection_size_ = 0; gint v_it = 0; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" v_collection = _tmp3_; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" v_collection_length1 = _tmp3__length1; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (v_it = 0; v_it < _tmp3__length1; v_it = v_it + 1) { -#line 6418 "FlickrPublishing.c" +#line 4701 "FlickrPublishing.c" PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp4_; PublishingFlickrPublishingOptionsPaneVisibilityEntry* v = NULL; -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = _publishing_flickr_publishing_options_pane_visibility_entry_ref0 (v_collection[v_it]); -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" v = _tmp4_; -#line 6425 "FlickrPublishing.c" +#line 4708 "FlickrPublishing.c" { GtkComboBoxText* _tmp5_; PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp6_; const gchar* _tmp7_; -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = self->priv->visibility_combo; -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = v; -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_->title; -#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_combo_box_text_append_text (_tmp5_, _tmp7_); -#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_options_pane_visibility_entry_unref0 (v); -#line 6440 "FlickrPublishing.c" +#line 4723 "FlickrPublishing.c" } } } -#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = self->priv->visibility_combo; -#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = self->priv->publisher; -#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_flickr_flickr_publisher_get_persistent_visibility (_tmp9_); -#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), _tmp10_); -#line 6452 "FlickrPublishing.c" +#line 4735 "FlickrPublishing.c" } -static void _vala_array_add26 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); -#line 6463 "FlickrPublishing.c" +#line 4746 "FlickrPublishing.c" } -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6469 "FlickrPublishing.c" +#line 4752 "FlickrPublishing.c" } -static void _vala_array_add27 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add26 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); -#line 6480 "FlickrPublishing.c" +#line 4763 "FlickrPublishing.c" } -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6486 "FlickrPublishing.c" +#line 4769 "FlickrPublishing.c" } -static void _vala_array_add28 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add27 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); -#line 6497 "FlickrPublishing.c" +#line 4780 "FlickrPublishing.c" } -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6503 "FlickrPublishing.c" +#line 4786 "FlickrPublishing.c" } -static void _vala_array_add29 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add28 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); -#line 6514 "FlickrPublishing.c" +#line 4797 "FlickrPublishing.c" } -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6520 "FlickrPublishing.c" +#line 4803 "FlickrPublishing.c" } -static void _vala_array_add30 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add29 (PublishingFlickrPublishingOptionsPaneSizeEntry** * array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); -#line 6531 "FlickrPublishing.c" +#line 4814 "FlickrPublishing.c" } -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 6537 "FlickrPublishing.c" +#line 4820 "FlickrPublishing.c" } @@ -6581,78 +4860,78 @@ static PublishingFlickrPublishingOptionsPaneSizeEntry** publishing_flickr_publis PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp10_; PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp11_; gint _tmp11__length1; -#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self), NULL); -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = g_new0 (PublishingFlickrPublishingOptionsPaneSizeEntry*, 0 + 1); -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result_ = _tmp0_; -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _result__length1 = 0; -#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" __result__size_ = _result__length1; -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _result_; -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1__length1 = _result__length1; -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_flickr_publishing_options_pane_size_entry_new (_ ("500 × 375 pixels"), 500); -#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add26 (&_result_, &_result__length1, &__result__size_, _tmp2_); -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add25 (&_result_, &_result__length1, &__result__size_, _tmp2_); +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _result_; -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3__length1 = _result__length1; -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = publishing_flickr_publishing_options_pane_size_entry_new (_ ("1024 × 768 pixels"), 1024); -#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add27 (&_result_, &_result__length1, &__result__size_, _tmp4_); -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add26 (&_result_, &_result__length1, &__result__size_, _tmp4_); +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = _result_; -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5__length1 = _result__length1; -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = publishing_flickr_publishing_options_pane_size_entry_new (_ ("2048 × 1536 pixels"), 2048); -#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add28 (&_result_, &_result__length1, &__result__size_, _tmp6_); -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add27 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _result_; -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7__length1 = _result__length1; -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = publishing_flickr_publishing_options_pane_size_entry_new (_ ("4096 × 3072 pixels"), 4096); -#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add29 (&_result_, &_result__length1, &__result__size_, _tmp8_); -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add28 (&_result_, &_result__length1, &__result__size_, _tmp8_); +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = _result_; -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9__length1 = _result__length1; -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_flickr_publishing_options_pane_size_entry_new (_ ("Original size"), PUBLISHING_FLICKR_ORIGINAL_SIZE); -#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add30 (&_result_, &_result__length1, &__result__size_, _tmp10_); -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add29 (&_result_, &_result__length1, &__result__size_, _tmp10_); +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = _result_; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11__length1 = _result__length1; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (result_length1) { -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *result_length1 = _tmp11__length1; -#line 6622 "FlickrPublishing.c" +#line 4905 "FlickrPublishing.c" } -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp11_; -#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 6628 "FlickrPublishing.c" +#line 4911 "FlickrPublishing.c" } static gpointer _publishing_flickr_publishing_options_pane_size_entry_ref0 (gpointer self) { -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self ? publishing_flickr_publishing_options_pane_size_entry_ref (self) : NULL; -#line 6635 "FlickrPublishing.c" +#line 4918 "FlickrPublishing.c" } @@ -6664,80 +4943,80 @@ static void publishing_flickr_publishing_options_pane_populate_size_combo (Publi GtkComboBoxText* _tmp8_; PublishingFlickrFlickrPublisher* _tmp9_; gint _tmp10_; -#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->sizes; -#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0__length1 = self->priv->sizes_length1; -#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp0_ == NULL) { -#line 6655 "FlickrPublishing.c" +#line 4938 "FlickrPublishing.c" gint _tmp1_; PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp2_; -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_flickr_publishing_options_pane_create_sizes (self, &_tmp1_); -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = _tmp2_; -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes_length1 = _tmp1_; -#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 6668 "FlickrPublishing.c" +#line 4951 "FlickrPublishing.c" } -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = self->priv->sizes; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3__length1 = self->priv->sizes_length1; -#line 6674 "FlickrPublishing.c" +#line 4957 "FlickrPublishing.c" { PublishingFlickrPublishingOptionsPaneSizeEntry** e_collection = NULL; gint e_collection_length1 = 0; gint _e_collection_size_ = 0; gint e_it = 0; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" e_collection = _tmp3_; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" e_collection_length1 = _tmp3__length1; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (e_it = 0; e_it < _tmp3__length1; e_it = e_it + 1) { -#line 6686 "FlickrPublishing.c" +#line 4969 "FlickrPublishing.c" PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp4_; PublishingFlickrPublishingOptionsPaneSizeEntry* e = NULL; -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = _publishing_flickr_publishing_options_pane_size_entry_ref0 (e_collection[e_it]); -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" e = _tmp4_; -#line 6693 "FlickrPublishing.c" +#line 4976 "FlickrPublishing.c" { GtkComboBoxText* _tmp5_; PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp6_; const gchar* _tmp7_; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = self->priv->size_combo; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = e; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = _tmp6_->title; -#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_combo_box_text_append_text (_tmp5_, _tmp7_); -#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_options_pane_size_entry_unref0 (e); -#line 6708 "FlickrPublishing.c" +#line 4991 "FlickrPublishing.c" } } } -#line 892 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = self->priv->size_combo; -#line 892 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = self->priv->publisher; -#line 892 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = publishing_flickr_flickr_publisher_get_persistent_default_size (_tmp9_); -#line 892 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 699 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), _tmp10_); -#line 6720 "FlickrPublishing.c" +#line 5003 "FlickrPublishing.c" } @@ -6745,17 +5024,17 @@ static void publishing_flickr_publishing_options_pane_on_size_changed (Publishin PublishingFlickrFlickrPublisher* _tmp0_; GtkComboBoxText* _tmp1_; gint _tmp2_; -#line 895 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->publisher; -#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->size_combo; -#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); -#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_set_persistent_default_size (_tmp0_, _tmp2_); -#line 6738 "FlickrPublishing.c" +#line 5021 "FlickrPublishing.c" } @@ -6763,41 +5042,41 @@ static void publishing_flickr_publishing_options_pane_on_visibility_changed (Pub PublishingFlickrFlickrPublisher* _tmp0_; GtkComboBoxText* _tmp1_; gint _tmp2_; -#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->publisher; -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = self->priv->visibility_combo; -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); -#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_flickr_publisher_set_persistent_visibility (_tmp0_, _tmp2_); -#line 6756 "FlickrPublishing.c" +#line 5039 "FlickrPublishing.c" } void publishing_flickr_publishing_options_pane_notify_publish (PublishingFlickrPublishingOptionsPane* self) { GtkCheckButton* _tmp0_; gboolean _tmp1_; -#line 903 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->strip_metadata_check; -#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton)); -#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_emit (self, publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0, _tmp1_); -#line 6771 "FlickrPublishing.c" +#line 5054 "FlickrPublishing.c" } void publishing_flickr_publishing_options_pane_notify_logout (PublishingFlickrPublishingOptionsPane* self) { -#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); -#line 908 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_emit (self, publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); -#line 6780 "FlickrPublishing.c" +#line 5063 "FlickrPublishing.c" } @@ -6806,56 +5085,56 @@ static GtkWidget* publishing_flickr_publishing_options_pane_real_get_widget (Spi GtkWidget* result = NULL; GtkBox* _tmp0_; GtkWidget* _tmp1_; -#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); -#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = self->priv->pane_widget; -#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); -#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp1_; -#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 6799 "FlickrPublishing.c" +#line 5082 "FlickrPublishing.c" } static SpitPublishingDialogPaneGeometryOptions publishing_flickr_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { PublishingFlickrPublishingOptionsPane * self; SpitPublishingDialogPaneGeometryOptions result = 0; -#line 915 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); -#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; -#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 6812 "FlickrPublishing.c" +#line 5095 "FlickrPublishing.c" } static void _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self) { -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_notify_publish ((PublishingFlickrPublishingOptionsPane*) self); -#line 6819 "FlickrPublishing.c" +#line 5102 "FlickrPublishing.c" } static void _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self) { -#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_notify_logout ((PublishingFlickrPublishingOptionsPane*) self); -#line 6826 "FlickrPublishing.c" +#line 5109 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { PublishingFlickrPublishingOptionsPane * self; -#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); -#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (self, "publish", (GCallback) _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish, self, 0); -#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_connect_object (self, "logout", (GCallback) _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout, self, 0); -#line 6838 "FlickrPublishing.c" +#line 5121 "FlickrPublishing.c" } @@ -6863,17 +5142,17 @@ static void publishing_flickr_publishing_options_pane_real_on_pane_uninstalled ( PublishingFlickrPublishingOptionsPane * self; guint _tmp0_; guint _tmp1_; -#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 731 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); -#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp0_, NULL, FALSE); -#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish, self); -#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); -#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout, self); -#line 6856 "FlickrPublishing.c" +#line 5139 "FlickrPublishing.c" } @@ -6882,240 +5161,240 @@ static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publish const gchar* _tmp0_; gchar* _tmp1_; gint _tmp2_; -#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (creator_title != NULL, NULL); -#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrPublishingOptionsPaneSizeEntry*) g_type_create_instance (object_type); -#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = creator_title; -#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = g_strdup (_tmp0_); -#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (self->title); -#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->title = _tmp1_; -#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = creator_size; -#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->size = _tmp2_; -#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 6883 "FlickrPublishing.c" +#line 5166 "FlickrPublishing.c" } static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_new (const gchar* creator_title, gint creator_size) { -#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_publishing_options_pane_size_entry_construct (PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, creator_title, creator_size); -#line 6890 "FlickrPublishing.c" +#line 5173 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_size_entry_init (GValue* value) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 6897 "FlickrPublishing.c" +#line 5180 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_size_entry_free_value (GValue* value) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (value->data[0].v_pointer) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_size_entry_unref (value->data[0].v_pointer); -#line 6906 "FlickrPublishing.c" +#line 5189 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_value_size_entry_copy_value (const GValue* src_value, GValue* dest_value) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (src_value->data[0].v_pointer) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = publishing_flickr_publishing_options_pane_size_entry_ref (src_value->data[0].v_pointer); -#line 6916 "FlickrPublishing.c" +#line 5199 "FlickrPublishing.c" } else { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = NULL; -#line 6920 "FlickrPublishing.c" +#line 5203 "FlickrPublishing.c" } } static gpointer publishing_flickr_publishing_options_pane_value_size_entry_peek_pointer (const GValue* value) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 6928 "FlickrPublishing.c" +#line 5211 "FlickrPublishing.c" } static gchar* publishing_flickr_publishing_options_pane_value_size_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (collect_values[0].v_pointer) { -#line 6935 "FlickrPublishing.c" +#line 5218 "FlickrPublishing.c" PublishingFlickrPublishingOptionsPaneSizeEntry * object; object = collect_values[0].v_pointer; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (object->parent_instance.g_class == NULL) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 6942 "FlickrPublishing.c" +#line 5225 "FlickrPublishing.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 6946 "FlickrPublishing.c" +#line 5229 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = publishing_flickr_publishing_options_pane_size_entry_ref (object); -#line 6950 "FlickrPublishing.c" +#line 5233 "FlickrPublishing.c" } else { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 6954 "FlickrPublishing.c" +#line 5237 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 6958 "FlickrPublishing.c" +#line 5241 "FlickrPublishing.c" } static gchar* publishing_flickr_publishing_options_pane_value_size_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingFlickrPublishingOptionsPaneSizeEntry ** object_p; object_p = collect_values[0].v_pointer; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!object_p) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 6969 "FlickrPublishing.c" +#line 5252 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!value->data[0].v_pointer) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = NULL; -#line 6975 "FlickrPublishing.c" +#line 5258 "FlickrPublishing.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = value->data[0].v_pointer; -#line 6979 "FlickrPublishing.c" +#line 5262 "FlickrPublishing.c" } else { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = publishing_flickr_publishing_options_pane_size_entry_ref (value->data[0].v_pointer); -#line 6983 "FlickrPublishing.c" +#line 5266 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 6987 "FlickrPublishing.c" +#line 5270 "FlickrPublishing.c" } static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingFlickrPublishingOptionsPaneParamSpecSizeEntry* spec; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY), NULL); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return G_PARAM_SPEC (spec); -#line 7001 "FlickrPublishing.c" +#line 5284 "FlickrPublishing.c" } static gpointer publishing_flickr_publishing_options_pane_value_get_size_entry (const GValue* value) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY), NULL); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 7010 "FlickrPublishing.c" +#line 5293 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_set_size_entry (GValue* value, gpointer v_object) { PublishingFlickrPublishingOptionsPaneSizeEntry * old; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_size_entry_ref (value->data[0].v_pointer); -#line 7030 "FlickrPublishing.c" +#line 5313 "FlickrPublishing.c" } else { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7034 "FlickrPublishing.c" +#line 5317 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_size_entry_unref (old); -#line 7040 "FlickrPublishing.c" +#line 5323 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_value_take_size_entry (GValue* value, gpointer v_object) { PublishingFlickrPublishingOptionsPaneSizeEntry * old; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 7059 "FlickrPublishing.c" +#line 5342 "FlickrPublishing.c" } else { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7063 "FlickrPublishing.c" +#line 5346 "FlickrPublishing.c" } -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_size_entry_unref (old); -#line 7069 "FlickrPublishing.c" +#line 5352 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_size_entry_class_init (PublishingFlickrPublishingOptionsPaneSizeEntryClass * klass) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_size_entry_parent_class = g_type_class_peek_parent (klass); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingFlickrPublishingOptionsPaneSizeEntryClass *) klass)->finalize = publishing_flickr_publishing_options_pane_size_entry_finalize; -#line 7079 "FlickrPublishing.c" +#line 5362 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_size_entry_instance_init (PublishingFlickrPublishingOptionsPaneSizeEntry * self) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->ref_count = 1; -#line 7086 "FlickrPublishing.c" +#line 5369 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_size_entry_finalize (PublishingFlickrPublishingOptionsPaneSizeEntry * obj) { PublishingFlickrPublishingOptionsPaneSizeEntry * self; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, PublishingFlickrPublishingOptionsPaneSizeEntry); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_destroy (self); -#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (self->title); -#line 7098 "FlickrPublishing.c" +#line 5381 "FlickrPublishing.c" } @@ -7136,24 +5415,24 @@ static GType publishing_flickr_publishing_options_pane_size_entry_get_type (void static gpointer publishing_flickr_publishing_options_pane_size_entry_ref (gpointer instance) { PublishingFlickrPublishingOptionsPaneSizeEntry * self; self = instance; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_atomic_int_inc (&self->ref_count); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return instance; -#line 7123 "FlickrPublishing.c" +#line 5406 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_size_entry_unref (gpointer instance) { PublishingFlickrPublishingOptionsPaneSizeEntry * self; self = instance; -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY_GET_CLASS (self)->finalize (self); -#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_free_instance ((GTypeInstance *) self); -#line 7136 "FlickrPublishing.c" +#line 5419 "FlickrPublishing.c" } } @@ -7164,248 +5443,248 @@ static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_p PublishingFlickrVisibilitySpecification* _tmp1_; const gchar* _tmp2_; gchar* _tmp3_; -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (creator_title != NULL, NULL); -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_VISIBILITY_SPECIFICATION (creator_specification), NULL); -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrPublishingOptionsPaneVisibilityEntry*) g_type_create_instance (object_type); -#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = creator_specification; -#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _publishing_flickr_visibility_specification_ref0 (_tmp0_); -#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (self->specification); -#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->specification = _tmp1_; -#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = creator_title; -#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = g_strdup (_tmp2_); -#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (self->title); -#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->title = _tmp3_; -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 7171 "FlickrPublishing.c" +#line 5454 "FlickrPublishing.c" } static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_new (const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification) { -#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_publishing_options_pane_visibility_entry_construct (PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, creator_title, creator_specification); -#line 7178 "FlickrPublishing.c" +#line 5461 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_visibility_entry_init (GValue* value) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7185 "FlickrPublishing.c" +#line 5468 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_visibility_entry_free_value (GValue* value) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (value->data[0].v_pointer) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_visibility_entry_unref (value->data[0].v_pointer); -#line 7194 "FlickrPublishing.c" +#line 5477 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_value_visibility_entry_copy_value (const GValue* src_value, GValue* dest_value) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (src_value->data[0].v_pointer) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = publishing_flickr_publishing_options_pane_visibility_entry_ref (src_value->data[0].v_pointer); -#line 7204 "FlickrPublishing.c" +#line 5487 "FlickrPublishing.c" } else { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" dest_value->data[0].v_pointer = NULL; -#line 7208 "FlickrPublishing.c" +#line 5491 "FlickrPublishing.c" } } static gpointer publishing_flickr_publishing_options_pane_value_visibility_entry_peek_pointer (const GValue* value) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 7216 "FlickrPublishing.c" +#line 5499 "FlickrPublishing.c" } static gchar* publishing_flickr_publishing_options_pane_value_visibility_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (collect_values[0].v_pointer) { -#line 7223 "FlickrPublishing.c" +#line 5506 "FlickrPublishing.c" PublishingFlickrPublishingOptionsPaneVisibilityEntry * object; object = collect_values[0].v_pointer; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (object->parent_instance.g_class == NULL) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 7230 "FlickrPublishing.c" +#line 5513 "FlickrPublishing.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 7234 "FlickrPublishing.c" +#line 5517 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = publishing_flickr_publishing_options_pane_visibility_entry_ref (object); -#line 7238 "FlickrPublishing.c" +#line 5521 "FlickrPublishing.c" } else { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7242 "FlickrPublishing.c" +#line 5525 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 7246 "FlickrPublishing.c" +#line 5529 "FlickrPublishing.c" } static gchar* publishing_flickr_publishing_options_pane_value_visibility_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PublishingFlickrPublishingOptionsPaneVisibilityEntry ** object_p; object_p = collect_values[0].v_pointer; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!object_p) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 7257 "FlickrPublishing.c" +#line 5540 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!value->data[0].v_pointer) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = NULL; -#line 7263 "FlickrPublishing.c" +#line 5546 "FlickrPublishing.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = value->data[0].v_pointer; -#line 7267 "FlickrPublishing.c" +#line 5550 "FlickrPublishing.c" } else { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *object_p = publishing_flickr_publishing_options_pane_visibility_entry_ref (value->data[0].v_pointer); -#line 7271 "FlickrPublishing.c" +#line 5554 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return NULL; -#line 7275 "FlickrPublishing.c" +#line 5558 "FlickrPublishing.c" } static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_visibility_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { PublishingFlickrPublishingOptionsPaneParamSpecVisibilityEntry* spec; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY), NULL); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return G_PARAM_SPEC (spec); -#line 7289 "FlickrPublishing.c" +#line 5572 "FlickrPublishing.c" } static gpointer publishing_flickr_publishing_options_pane_value_get_visibility_entry (const GValue* value) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY), NULL); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return value->data[0].v_pointer; -#line 7298 "FlickrPublishing.c" +#line 5581 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_value_set_visibility_entry (GValue* value, gpointer v_object) { PublishingFlickrPublishingOptionsPaneVisibilityEntry * old; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_visibility_entry_ref (value->data[0].v_pointer); -#line 7318 "FlickrPublishing.c" +#line 5601 "FlickrPublishing.c" } else { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7322 "FlickrPublishing.c" +#line 5605 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_visibility_entry_unref (old); -#line 7328 "FlickrPublishing.c" +#line 5611 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_value_take_visibility_entry (GValue* value, gpointer v_object) { PublishingFlickrPublishingOptionsPaneVisibilityEntry * old; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" old = value->data[0].v_pointer; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (v_object) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = v_object; -#line 7347 "FlickrPublishing.c" +#line 5630 "FlickrPublishing.c" } else { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" value->data[0].v_pointer = NULL; -#line 7351 "FlickrPublishing.c" +#line 5634 "FlickrPublishing.c" } -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (old) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_visibility_entry_unref (old); -#line 7357 "FlickrPublishing.c" +#line 5640 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_visibility_entry_class_init (PublishingFlickrPublishingOptionsPaneVisibilityEntryClass * klass) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_visibility_entry_parent_class = g_type_class_peek_parent (klass); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingFlickrPublishingOptionsPaneVisibilityEntryClass *) klass)->finalize = publishing_flickr_publishing_options_pane_visibility_entry_finalize; -#line 7367 "FlickrPublishing.c" +#line 5650 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_visibility_entry_instance_init (PublishingFlickrPublishingOptionsPaneVisibilityEntry * self) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->ref_count = 1; -#line 7374 "FlickrPublishing.c" +#line 5657 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_visibility_entry_finalize (PublishingFlickrPublishingOptionsPaneVisibilityEntry * obj) { PublishingFlickrPublishingOptionsPaneVisibilityEntry * self; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, PublishingFlickrPublishingOptionsPaneVisibilityEntry); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_signal_handlers_destroy (self); -#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_visibility_specification_unref0 (self->specification); -#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (self->title); -#line 7388 "FlickrPublishing.c" +#line 5671 "FlickrPublishing.c" } @@ -7426,134 +5705,134 @@ static GType publishing_flickr_publishing_options_pane_visibility_entry_get_type static gpointer publishing_flickr_publishing_options_pane_visibility_entry_ref (gpointer instance) { PublishingFlickrPublishingOptionsPaneVisibilityEntry * self; self = instance; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_atomic_int_inc (&self->ref_count); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return instance; -#line 7413 "FlickrPublishing.c" +#line 5696 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_visibility_entry_unref (gpointer instance) { PublishingFlickrPublishingOptionsPaneVisibilityEntry * self; self = instance; -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY_GET_CLASS (self)->finalize (self); -#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_free_instance ((GTypeInstance *) self); -#line 7426 "FlickrPublishing.c" +#line 5709 "FlickrPublishing.c" } } static void publishing_flickr_publishing_options_pane_class_init (PublishingFlickrPublishingOptionsPaneClass * klass) { -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_class_add_private (klass, sizeof (PublishingFlickrPublishingOptionsPanePrivate)); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (klass)->finalize = publishing_flickr_publishing_options_pane_finalize; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL] = g_signal_new ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_signals[PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL] = g_signal_new ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 7442 "FlickrPublishing.c" +#line 5725 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_flickr_publishing_options_pane_real_get_widget; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_flickr_publishing_options_pane_real_get_preferred_geometry; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_flickr_publishing_options_pane_real_on_pane_installed; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_flickr_publishing_options_pane_real_on_pane_uninstalled; -#line 7457 "FlickrPublishing.c" +#line 5740 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_instance_init (PublishingFlickrPublishingOptionsPane * self) { -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv = PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); -#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->pane_widget = NULL; -#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibility_label = NULL; -#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->upload_info_label = NULL; -#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->size_label = NULL; -#line 758 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->logout_button = NULL; -#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publish_button = NULL; -#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibility_combo = NULL; -#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->size_combo = NULL; -#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->strip_metadata_check = NULL; -#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = NULL; -#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities_length1 = 0; -#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_visibilities_size_ = self->priv->visibilities_length1; -#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = NULL; -#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes_length1 = 0; -#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->_sizes_size_ = self->priv->sizes_length1; -#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = NULL; -#line 766 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->publisher = NULL; -#line 7498 "FlickrPublishing.c" +#line 5781 "FlickrPublishing.c" } static void publishing_flickr_publishing_options_pane_finalize (GObject * obj) { PublishingFlickrPublishingOptionsPane * self; -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); -#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->builder); -#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->pane_widget); -#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->visibility_label); -#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->upload_info_label); -#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->size_label); -#line 758 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->logout_button); -#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publish_button); -#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->visibility_combo); -#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->size_combo); -#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->strip_metadata_check); -#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); -#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); -#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 766 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (self->priv->publisher); -#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" G_OBJECT_CLASS (publishing_flickr_publishing_options_pane_parent_class)->finalize (obj); -#line 7536 "FlickrPublishing.c" +#line 5819 "FlickrPublishing.c" } @@ -7571,65 +5850,65 @@ GType publishing_flickr_publishing_options_pane_get_type (void) { } -PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { +PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { PublishingFlickrUploader* self = NULL; - PublishingFlickrSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp0_; SpitPublishingPublishable** _tmp1_; gint _tmp1__length1; PublishingFlickrPublishingParameters* _tmp2_; PublishingFlickrPublishingParameters* _tmp3_; gboolean _tmp4_; -#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); -#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); -#line 936 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = session; -#line 936 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = publishables; -#line 936 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1__length1 = publishables_length1; -#line 936 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = (PublishingFlickrUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); -#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = parameters; -#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = _publishing_flickr_publishing_parameters_ref0 (_tmp2_); -#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->parameters = _tmp3_; -#line 939 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = strip_metadata; -#line 939 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv->strip_metadata = _tmp4_; -#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return self; -#line 7588 "FlickrPublishing.c" +#line 5871 "FlickrPublishing.c" } -PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { -#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { +#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return publishing_flickr_uploader_construct (PUBLISHING_FLICKR_TYPE_UPLOADER, session, publishables, publishables_length1, parameters, strip_metadata); -#line 7595 "FlickrPublishing.c" +#line 5878 "FlickrPublishing.c" } -static void _vala_array_add31 (gchar** * array, int* length, int* size, gchar* value) { -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +static void _vala_array_add30 (gchar** * array, int* length, int* size, gchar* value) { +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if ((*length) == (*size)) { -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *size = (*size) ? (2 * (*size)) : 4; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" *array = g_renew (gchar*, *array, (*size) + 1); -#line 7606 "FlickrPublishing.c" +#line 5889 "FlickrPublishing.c" } -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[(*length)++] = value; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" (*array)[*length] = NULL; -#line 7612 "FlickrPublishing.c" +#line 5895 "FlickrPublishing.c" } @@ -7647,25 +5926,25 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GExiv2Metadata* _tmp32_; gboolean _tmp33_; GError * _inner_error_ = NULL; -#line 942 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (PUBLISHING_FLICKR_IS_UPLOADER (self)); -#line 942 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable)); -#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = publishable; -#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = spit_publishing_publishable_get_media_type (_tmp0_); -#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp1_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) { -#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 7642 "FlickrPublishing.c" +#line 5925 "FlickrPublishing.c" } -#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = gexiv2_metadata_new (); -#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishable_metadata = _tmp2_; -#line 7648 "FlickrPublishing.c" +#line 5931 "FlickrPublishing.c" { GExiv2Metadata* _tmp3_; SpitPublishingPublishable* _tmp4_; @@ -7673,27 +5952,27 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GFile* _tmp6_; gchar* _tmp7_; gchar* _tmp8_; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp3_ = publishable_metadata; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = publishable; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = spit_publishing_publishable_get_serialized_file (_tmp4_); -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = _tmp5_; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = g_file_get_path (_tmp6_); -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = _tmp7_; -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_open_path (_tmp3_, _tmp8_, &_inner_error_); -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp8_); -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp6_); -#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 7676 "FlickrPublishing.c" +#line 5959 "FlickrPublishing.c" goto __catch18_g_error; } } @@ -7706,129 +5985,129 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GFile* _tmp11_; gchar* _tmp12_; gchar* _tmp13_; -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" err = _inner_error_; -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp9_ = publishable; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp10_ = spit_publishing_publishable_get_serialized_file (_tmp9_); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp11_ = _tmp10_; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp12_ = g_file_get_path (_tmp11_); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp13_ = _tmp12_; -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_warning ("FlickrPublishing.vala:950: couldn't read metadata from file '%s' for u" \ +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:757: couldn't read metadata from file '%s' for u" \ "pload preprocessing.", _tmp13_); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp13_); -#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp11_); -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 7711 "FlickrPublishing.c" +#line 5994 "FlickrPublishing.c" } __finally18: -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (publishable_metadata); -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 7724 "FlickrPublishing.c" +#line 6007 "FlickrPublishing.c" } -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp14_ = publishable_metadata; -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp15_ = gexiv2_metadata_has_iptc (_tmp14_); -#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (!_tmp15_) { -#line 959 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 766 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (publishable_metadata); -#line 959 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 766 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 7736 "FlickrPublishing.c" +#line 6019 "FlickrPublishing.c" } -#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp16_ = publishable_metadata; -#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp17_ = gexiv2_metadata_has_tag (_tmp16_, "Iptc.Application2.Caption"); -#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp17_) { -#line 7744 "FlickrPublishing.c" +#line 6027 "FlickrPublishing.c" GExiv2Metadata* _tmp18_; GExiv2Metadata* _tmp19_; gchar* _tmp20_; gchar* _tmp21_; gchar* _tmp22_; gchar* _tmp23_; -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp18_ = publishable_metadata; -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp19_ = publishable_metadata; -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp20_ = gexiv2_metadata_get_tag_string (_tmp19_, "Iptc.Application2.Caption"); -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp21_ = _tmp20_; -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp22_ = publishing_rest_support_asciify_string (_tmp21_); -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp23_ = _tmp22_; -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_set_tag_string (_tmp18_, "Iptc.Application2.Caption", _tmp23_); -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp23_); -#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp21_); -#line 7769 "FlickrPublishing.c" +#line 6052 "FlickrPublishing.c" } -#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp24_ = publishable_metadata; -#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp25_ = gexiv2_metadata_has_tag (_tmp24_, "Iptc.Application2.Headline"); -#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp25_) { -#line 7777 "FlickrPublishing.c" +#line 6060 "FlickrPublishing.c" GExiv2Metadata* _tmp26_; GExiv2Metadata* _tmp27_; gchar* _tmp28_; gchar* _tmp29_; gchar* _tmp30_; gchar* _tmp31_; -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp26_ = publishable_metadata; -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp27_ = publishable_metadata; -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp28_ = gexiv2_metadata_get_tag_string (_tmp27_, "Iptc.Application2.Headline"); -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp29_ = _tmp28_; -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp30_ = publishing_rest_support_asciify_string (_tmp29_); -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp31_ = _tmp30_; -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_set_tag_string (_tmp26_, "Iptc.Application2.Headline", _tmp31_); -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp31_); -#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp29_); -#line 7802 "FlickrPublishing.c" +#line 6085 "FlickrPublishing.c" } -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp32_ = publishable_metadata; -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp33_ = gexiv2_metadata_has_tag (_tmp32_, "Iptc.Application2.Keywords"); -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp33_) { -#line 7810 "FlickrPublishing.c" +#line 6093 "FlickrPublishing.c" GeeSet* keyword_set = NULL; GeeHashSet* _tmp34_; gchar** iptc_keywords = NULL; @@ -7868,179 +6147,179 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GExiv2Metadata* _tmp60_; gchar** _tmp61_; gint _tmp61__length1; -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp34_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL); -#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword_set = G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_SET, GeeSet); -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp35_ = publishable_metadata; -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp37_ = _tmp36_ = gexiv2_metadata_get_tag_multiple (_tmp35_, "Iptc.Application2.Keywords"); -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iptc_keywords = _tmp37_; -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iptc_keywords_length1 = _vala_array_length (_tmp36_); -#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _iptc_keywords_size_ = iptc_keywords_length1; -#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp38_ = iptc_keywords; -#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp38__length1 = iptc_keywords_length1; -#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp38_ != NULL) { -#line 7870 "FlickrPublishing.c" +#line 6153 "FlickrPublishing.c" gchar** _tmp39_; gint _tmp39__length1; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp39_ = iptc_keywords; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp39__length1 = iptc_keywords_length1; -#line 7877 "FlickrPublishing.c" +#line 6160 "FlickrPublishing.c" { gchar** keyword_collection = NULL; gint keyword_collection_length1 = 0; gint _keyword_collection_size_ = 0; gint keyword_it = 0; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword_collection = _tmp39_; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword_collection_length1 = _tmp39__length1; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (keyword_it = 0; keyword_it < _tmp39__length1; keyword_it = keyword_it + 1) { -#line 7889 "FlickrPublishing.c" +#line 6172 "FlickrPublishing.c" gchar* _tmp40_; gchar* keyword = NULL; -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp40_ = g_strdup (keyword_collection[keyword_it]); -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword = _tmp40_; -#line 7896 "FlickrPublishing.c" +#line 6179 "FlickrPublishing.c" { GeeSet* _tmp41_; const gchar* _tmp42_; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp41_ = keyword_set; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp42_ = keyword; -#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_COLLECTION, GeeCollection), _tmp42_); -#line 975 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (keyword); -#line 7908 "FlickrPublishing.c" +#line 6191 "FlickrPublishing.c" } } } } -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp43_ = publishable_metadata; -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp45_ = _tmp44_ = gexiv2_metadata_get_tag_multiple (_tmp43_, "Xmp.dc.subject"); -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" xmp_keywords = _tmp45_; -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" xmp_keywords_length1 = _vala_array_length (_tmp44_); -#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _xmp_keywords_size_ = xmp_keywords_length1; -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp46_ = xmp_keywords; -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp46__length1 = xmp_keywords_length1; -#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (_tmp46_ != NULL) { -#line 7929 "FlickrPublishing.c" +#line 6212 "FlickrPublishing.c" gchar** _tmp47_; gint _tmp47__length1; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp47_ = xmp_keywords; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp47__length1 = xmp_keywords_length1; -#line 7936 "FlickrPublishing.c" +#line 6219 "FlickrPublishing.c" { gchar** keyword_collection = NULL; gint keyword_collection_length1 = 0; gint _keyword_collection_size_ = 0; gint keyword_it = 0; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword_collection = _tmp47_; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword_collection_length1 = _tmp47__length1; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" for (keyword_it = 0; keyword_it < _tmp47__length1; keyword_it = keyword_it + 1) { -#line 7948 "FlickrPublishing.c" +#line 6231 "FlickrPublishing.c" gchar* _tmp48_; gchar* keyword = NULL; -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp48_ = g_strdup (keyword_collection[keyword_it]); -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" keyword = _tmp48_; -#line 7955 "FlickrPublishing.c" +#line 6238 "FlickrPublishing.c" { GeeSet* _tmp49_; const gchar* _tmp50_; -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp49_ = keyword_set; -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp50_ = keyword; -#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_COLLECTION, GeeCollection), _tmp50_); -#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (keyword); -#line 7967 "FlickrPublishing.c" +#line 6250 "FlickrPublishing.c" } } } } -#line 983 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp51_ = keyword_set; -#line 983 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp53_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp52_); -#line 983 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" all_keywords = _tmp53_; -#line 983 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" all_keywords_length1 = _tmp52_; -#line 983 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _all_keywords_size_ = all_keywords_length1; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp54_ = all_keywords; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp54__length1 = all_keywords_length1; -#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _vala_array_add31 (&all_keywords, &all_keywords_length1, &_all_keywords_size_, NULL); -#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add30 (&all_keywords, &all_keywords_length1, &_all_keywords_size_, NULL); +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp55_ = g_new0 (gchar*, 1 + 1); -#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" no_keywords = _tmp55_; -#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" no_keywords_length1 = 1; -#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _no_keywords_size_ = no_keywords_length1; -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp56_ = no_keywords; -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp56__length1 = no_keywords_length1; -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp56_[0]); -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp56_[0] = NULL; -#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp57_ = _tmp56_[0]; -#line 997 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp58_ = publishable_metadata; -#line 997 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp59_ = all_keywords; -#line 997 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp59__length1 = all_keywords_length1; -#line 997 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_set_tag_multiple (_tmp58_, "Xmp.dc.subject", _tmp59_); -#line 998 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp60_ = publishable_metadata; -#line 998 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp61_ = no_keywords; -#line 998 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp61__length1 = no_keywords_length1; -#line 998 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_set_tag_multiple (_tmp60_, "Iptc.Application2.Keywords", _tmp61_); -#line 8022 "FlickrPublishing.c" +#line 6305 "FlickrPublishing.c" { GExiv2Metadata* _tmp62_; SpitPublishingPublishable* _tmp63_; @@ -8048,27 +6327,27 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GFile* _tmp65_; gchar* _tmp66_; gchar* _tmp67_; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp62_ = publishable_metadata; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp63_ = publishable; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp64_ = spit_publishing_publishable_get_serialized_file (_tmp63_); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp65_ = _tmp64_; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp66_ = g_file_get_path (_tmp65_); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp67_ = _tmp66_; -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" gexiv2_metadata_save_file (_tmp62_, _tmp67_, &_inner_error_); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp67_); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp65_); -#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 8050 "FlickrPublishing.c" +#line 6333 "FlickrPublishing.c" goto __catch19_g_error; } } @@ -8081,69 +6360,69 @@ static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrU GFile* _tmp70_; gchar* _tmp71_; gchar* _tmp72_; -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" err = _inner_error_; -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _inner_error_ = NULL; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp68_ = publishable; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp69_ = spit_publishing_publishable_get_serialized_file (_tmp68_); -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp70_ = _tmp69_; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp71_ = g_file_get_path (_tmp70_); -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp72_ = _tmp71_; -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - g_warning ("FlickrPublishing.vala:1003: couldn't write metadata to file '%s' for u" \ -"pload preprocessing.", _tmp72_); -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:810: couldn't write metadata to file '%s' for up" \ +"load preprocessing.", _tmp72_); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_free0 (_tmp72_); -#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp70_); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_error_free0 (err); -#line 8085 "FlickrPublishing.c" +#line 6368 "FlickrPublishing.c" } __finally19: -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" no_keywords = (_vala_array_free (no_keywords, no_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" all_keywords = (_vala_array_free (all_keywords, all_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" xmp_keywords = (_vala_array_free (xmp_keywords, xmp_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iptc_keywords = (_vala_array_free (iptc_keywords, iptc_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (keyword_set); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (publishable_metadata); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_clear_error (&_inner_error_); -#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return; -#line 8108 "FlickrPublishing.c" +#line 6391 "FlickrPublishing.c" } -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" no_keywords = (_vala_array_free (no_keywords, no_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" all_keywords = (_vala_array_free (all_keywords, all_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" xmp_keywords = (_vala_array_free (xmp_keywords, xmp_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" iptc_keywords = (_vala_array_free (iptc_keywords, iptc_keywords_length1, (GDestroyNotify) g_free), NULL); -#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (keyword_set); -#line 8120 "FlickrPublishing.c" +#line 6403 "FlickrPublishing.c" } -#line 942 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (publishable_metadata); -#line 8124 "FlickrPublishing.c" +#line 6407 "FlickrPublishing.c" } @@ -8153,79 +6432,79 @@ static PublishingRESTSupportTransaction* publishing_flickr_uploader_real_create_ SpitPublishingPublishable* _tmp0_; SpitPublishingPublishable* _tmp1_; PublishingRESTSupportSession* _tmp2_; - PublishingFlickrSession* _tmp3_; + PublishingRESTSupportOAuth1Session* _tmp3_; PublishingFlickrPublishingParameters* _tmp4_; SpitPublishingPublishable* _tmp5_; SpitPublishingPublishable* _tmp6_; PublishingFlickrUploadTransaction* _tmp7_; PublishingRESTSupportTransaction* _tmp8_; -#line 1009 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploader); -#line 1009 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); -#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp0_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); -#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp1_ = _tmp0_; -#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_uploader_preprocess_publishable (self, _tmp1_); -#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp1_); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp2_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp4_ = self->priv->parameters; -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp5_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp6_ = _tmp5_; -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp7_ = publishing_flickr_upload_transaction_new (_tmp3_, _tmp4_, _tmp6_); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _g_object_unref0 (_tmp6_); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_rest_support_session_unref0 (_tmp3_); -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" result = _tmp8_; -#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" return result; -#line 8174 "FlickrPublishing.c" +#line 6457 "FlickrPublishing.c" } static void publishing_flickr_uploader_class_init (PublishingFlickrUploaderClass * klass) { -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" publishing_flickr_uploader_parent_class = g_type_class_peek_parent (klass); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_flickr_uploader_finalize; -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" g_type_class_add_private (klass, sizeof (PublishingFlickrUploaderPrivate)); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = (PublishingRESTSupportTransaction* (*) (PublishingRESTSupportBatchUploader *, SpitPublishingPublishable*)) publishing_flickr_uploader_real_create_transaction; -#line 8187 "FlickrPublishing.c" +#line 6470 "FlickrPublishing.c" } static void publishing_flickr_uploader_instance_init (PublishingFlickrUploader * self) { -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self->priv = PUBLISHING_FLICKR_UPLOADER_GET_PRIVATE (self); -#line 8194 "FlickrPublishing.c" +#line 6477 "FlickrPublishing.c" } static void publishing_flickr_uploader_finalize (PublishingRESTSupportBatchUploader * obj) { PublishingFlickrUploader * self; -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploader); -#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); -#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_flickr_uploader_parent_class)->finalize (obj); -#line 8206 "FlickrPublishing.c" +#line 6489 "FlickrPublishing.c" } diff --git a/plugins/shotwell-publishing/FlickrPublishing.vala b/plugins/shotwell-publishing/FlickrPublishing.vala index 24b2b61..5a80284 100644 --- a/plugins/shotwell-publishing/FlickrPublishing.vala +++ b/plugins/shotwell-publishing/FlickrPublishing.vala @@ -59,7 +59,6 @@ internal const string SERVICE_NAME = "Flickr"; internal const string ENDPOINT_URL = "https://api.flickr.com/services/rest"; internal const int ORIGINAL_SIZE = -1; internal const string EXPIRED_SESSION_ERROR_CODE = "98"; -internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; internal enum UserKind { PRO, @@ -96,7 +95,7 @@ public class FlickrPublisher : Spit.Publishing.Publisher, GLib.Object { private Spit.Publishing.ProgressCallback progress_reporter = null; private bool running = false; private bool was_started = false; - private Session session = null; + private Publishing.RESTSupport.OAuth1.Session session = null; private PublishingOptionsPane publishing_options_pane = null; private Spit.Publishing.Authenticator authenticator = null; @@ -107,7 +106,7 @@ public class FlickrPublisher : Spit.Publishing.Publisher, GLib.Object { debug("FlickrPublisher instantiated."); this.service = service; this.host = host; - this.session = new Session(); + this.session = new Publishing.RESTSupport.OAuth1.Session(ENDPOINT_URL); this.parameters = new PublishingParameters(); this.authenticator = Publishing.Authenticator.Factory.get_instance().create("flickr", host); @@ -445,37 +444,7 @@ public class FlickrPublisher : Spit.Publishing.Publisher, GLib.Object { } } -internal class Transaction : Publishing.RESTSupport.Transaction { - public Transaction(Session session, Publishing.RESTSupport.HttpMethod method = - Publishing.RESTSupport.HttpMethod.POST) { - base(session, method); - - add_argument("oauth_nonce", session.get_oauth_nonce()); - add_argument("oauth_signature_method", "HMAC-SHA1"); - add_argument("oauth_version", "1.0"); - add_argument("oauth_callback", "oob"); - add_argument("oauth_timestamp", session.get_oauth_timestamp()); - add_argument("oauth_consumer_key", session.get_consumer_key()); - } - - public Transaction.with_uri(Session session, string uri, - Publishing.RESTSupport.HttpMethod method = Publishing.RESTSupport.HttpMethod.POST) { - base.with_endpoint_url(session, uri, method); - - add_argument("oauth_nonce", session.get_oauth_nonce()); - add_argument("oauth_signature_method", "HMAC-SHA1"); - add_argument("oauth_version", "1.0"); - add_argument("oauth_callback", "oob"); - add_argument("oauth_timestamp", session.get_oauth_timestamp()); - add_argument("oauth_consumer_key", session.get_consumer_key()); - } - - public override void execute() throws Spit.Publishing.PublishingError { - ((Session) get_parent_session()).sign_transaction(this); - - base.execute(); - } - +namespace Transaction { public static string? validate_xml(Publishing.RESTSupport.XmlDocument doc) { Xml.Node* root = doc.get_root_node(); string? status = root->get_prop("stat"); @@ -525,35 +494,22 @@ internal class Transaction : Publishing.RESTSupport.Transaction { } } -internal class AccountInfoFetchTransaction : Transaction { - public AccountInfoFetchTransaction(Session session) { +internal class AccountInfoFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction { + public AccountInfoFetchTransaction(Publishing.RESTSupport.OAuth1.Session session) { base(session, Publishing.RESTSupport.HttpMethod.GET); add_argument("method", "flickr.people.getUploadStatus"); - add_argument("oauth_token", session.get_access_phase_token()); } } -private class UploadTransaction : Publishing.RESTSupport.UploadTransaction { +private class UploadTransaction : Publishing.RESTSupport.OAuth1.UploadTransaction { private PublishingParameters parameters; - private Session session; - private Publishing.RESTSupport.Argument[] auth_header_fields; - public UploadTransaction(Session session, PublishingParameters parameters, + public UploadTransaction(Publishing.RESTSupport.OAuth1.Session session, PublishingParameters parameters, Spit.Publishing.Publishable publishable) { - base.with_endpoint_url(session, publishable, "https://api.flickr.com/services/upload"); + base(session, publishable, "https://api.flickr.com/services/upload"); this.parameters = parameters; - this.session = session; - this.auth_header_fields = new Publishing.RESTSupport.Argument[0]; - - add_authorization_header_field("oauth_nonce", session.get_oauth_nonce()); - add_authorization_header_field("oauth_signature_method", "HMAC-SHA1"); - add_authorization_header_field("oauth_version", "1.0"); - add_authorization_header_field("oauth_callback", "oob"); - add_authorization_header_field("oauth_timestamp", session.get_oauth_timestamp()); - add_authorization_header_field("oauth_consumer_key", session.get_consumer_key()); - add_authorization_header_field("oauth_token", session.get_access_phase_token()); - + add_argument("is_public", ("%d".printf(parameters.visibility_specification.everyone_level))); add_argument("is_friend", ("%d".printf(parameters.visibility_specification.friends_level))); add_argument("is_family", ("%d".printf(parameters.visibility_specification.family_level))); @@ -573,162 +529,13 @@ private class UploadTransaction : Publishing.RESTSupport.UploadTransaction { set_binary_disposition_table(disposition_table); } - - public void add_authorization_header_field(string key, string value) { - auth_header_fields += new Publishing.RESTSupport.Argument(key, value); - } - - public Publishing.RESTSupport.Argument[] get_authorization_header_fields() { - return auth_header_fields; - } - - public string get_authorization_header_string() { - string result = "OAuth "; - - for (int i = 0; i < auth_header_fields.length; i++) { - result += auth_header_fields[i].key; - result += "="; - result += ("\"" + auth_header_fields[i].value + "\""); - - if (i < auth_header_fields.length - 1) - result += ", "; - } - - return result; - } - + public override void execute() throws Spit.Publishing.PublishingError { - session.sign_transaction(this); - - string authorization_header = get_authorization_header_string(); - - debug("executing upload transaction: authorization header string = '%s'", - authorization_header); - add_header("Authorization", authorization_header); - + this.authorize(); base.execute(); } } -internal class Session : Publishing.RESTSupport.Session { - private string? access_phase_token = null; - private string? access_phase_token_secret = null; - private string? username = null; - private string? consumer_key = null; - private string? consumer_secret = null; - - public Session() { - base(ENDPOINT_URL); - } - - public override bool is_authenticated() { - return (access_phase_token != null && access_phase_token_secret != null && - username != null); - } - - public void set_api_credentials(string consumer_key, string consumer_secret) { - this.consumer_key = consumer_key; - this.consumer_secret = consumer_secret; - } - - public void sign_transaction(Publishing.RESTSupport.Transaction txn) { - string http_method = txn.get_method().to_string(); - - debug("signing transaction with parameters:"); - debug("HTTP method = " + http_method); - - Publishing.RESTSupport.Argument[] base_string_arguments = txn.get_arguments(); - - UploadTransaction? upload_txn = txn as UploadTransaction; - if (upload_txn != null) { - debug("this transaction is an UploadTransaction; including Authorization header " + - "fields in signature base string"); - - Publishing.RESTSupport.Argument[] auth_header_args = - upload_txn.get_authorization_header_fields(); - - foreach (Publishing.RESTSupport.Argument arg in auth_header_args) - base_string_arguments += arg; - } - - Publishing.RESTSupport.Argument[] sorted_args = - Publishing.RESTSupport.Argument.sort(base_string_arguments); - - string arguments_string = ""; - for (int i = 0; i < sorted_args.length; i++) { - arguments_string += (sorted_args[i].key + "=" + sorted_args[i].value); - if (i < sorted_args.length - 1) - arguments_string += "&"; - } - - string? signing_key = null; - if (access_phase_token_secret != null) { - debug("access phase token secret available; using it as signing key"); - - signing_key = consumer_secret + "&" + access_phase_token_secret; - } else { - debug("neither access phase nor request phase token secrets available; using API " + - "key as signing key"); - - signing_key = consumer_secret + "&"; - } - - string signature_base_string = http_method + "&" + Soup.URI.encode( - txn.get_endpoint_url(), ENCODE_RFC_3986_EXTRA) + "&" + - Soup.URI.encode(arguments_string, ENCODE_RFC_3986_EXTRA); - - debug("signature base string = '%s'", signature_base_string); - - debug("signing key = '%s'", signing_key); - - // compute the signature - string signature = RESTSupport.hmac_sha1(signing_key, signature_base_string); - signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); - - debug("signature = '%s'", signature); - - if (upload_txn != null) - upload_txn.add_authorization_header_field("oauth_signature", signature); - else - txn.add_argument("oauth_signature", signature); - } - - public void set_access_phase_credentials(string token, string secret, string username) { - this.access_phase_token = token; - this.access_phase_token_secret = secret; - this.username = username; - - authenticated(); - } - - public string get_oauth_nonce() { - TimeVal currtime = TimeVal(); - currtime.get_current_time(); - - return Checksum.compute_for_string(ChecksumType.MD5, currtime.tv_sec.to_string() + - currtime.tv_usec.to_string()); - } - - public string get_oauth_timestamp() { - return GLib.get_real_time().to_string().substring(0, 10); - } - - public string get_consumer_key() { - assert(consumer_key != null); - return consumer_key; - } - - public string get_access_phase_token() { - assert(access_phase_token != null); - return access_phase_token; - } - - public string get_username() { - assert(is_authenticated()); - return username; - } -} - internal class PublishingOptionsPane : Spit.Publishing.DialogPane, GLib.Object { private class SizeEntry { public string title; @@ -931,7 +738,7 @@ internal class Uploader : Publishing.RESTSupport.BatchUploader { private PublishingParameters parameters; private bool strip_metadata; - public Uploader(Session session, Spit.Publishing.Publishable[] publishables, + public Uploader(Publishing.RESTSupport.OAuth1.Session session, Spit.Publishing.Publishable[] publishables, PublishingParameters parameters, bool strip_metadata) { base(session, publishables); @@ -1009,7 +816,7 @@ internal class Uploader : Publishing.RESTSupport.BatchUploader { protected override Publishing.RESTSupport.Transaction create_transaction( Spit.Publishing.Publishable publishable) { preprocess_publishable(get_current_publishable()); - return new UploadTransaction((Session) get_session(), parameters, + return new UploadTransaction((Publishing.RESTSupport.OAuth1.Session) get_session(), parameters, get_current_publishable()); } } diff --git a/plugins/shotwell-publishing/PicasaPublishing.c b/plugins/shotwell-publishing/PicasaPublishing.c index 286f53b..2c4cce2 100644 --- a/plugins/shotwell-publishing/PicasaPublishing.c +++ b/plugins/shotwell-publishing/PicasaPublishing.c @@ -372,8 +372,8 @@ GType publishing_picasa_album_get_type (void) G_GNUC_CONST; static PublishingPicasaAlbum** publishing_picasa_picasa_publisher_extract_albums_helper (PublishingPicasaPicasaPublisher* self, xmlNode* document_root, int* result_length1, GError** error); PublishingPicasaAlbum* publishing_picasa_album_new (const gchar* name, const gchar* url); PublishingPicasaAlbum* publishing_picasa_album_construct (GType object_type, const gchar* name, const gchar* url); -static void _vala_array_add12 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value); static void _vala_array_add13 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value); +static void _vala_array_add14 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value); void publishing_picasa_publishing_parameters_set_major_axis_size_selection_id (PublishingPicasaPublishingParameters* self, gint selection_id); void publishing_picasa_publishing_parameters_set_strip_metadata (PublishingPicasaPublishingParameters* self, gboolean strip_metadata); void publishing_picasa_publishing_parameters_set_target_album_name (PublishingPicasaPublishingParameters* self, const gchar* target_album_name); @@ -471,12 +471,12 @@ PublishingPicasaAlbum** publishing_picasa_publishing_parameters_get_albums (Publ void publishing_picasa_publishing_parameters_set_target_album_entry_url (PublishingPicasaPublishingParameters* self, const gchar* target_album_url); static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_new (const gchar* name, gint major_axis_pixels); static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_construct (GType object_type, const gchar* name, gint major_axis_pixels); -static void _vala_array_add14 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); -#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE -1 static void _vala_array_add18 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE -1 +static void _vala_array_add19 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); void publishing_picasa_publishing_options_pane_installed (PublishingPicasaPublishingOptionsPane* self); static GtkWidget* publishing_picasa_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); static SpitPublishingDialogPaneGeometryOptions publishing_picasa_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); @@ -924,7 +924,7 @@ PublishingPicasaPicasaPublisher* publishing_picasa_picasa_publisher_new (SpitPub } -static void _vala_array_add12 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value) { +static void _vala_array_add13 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value) { #line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -941,7 +941,7 @@ static void _vala_array_add12 (PublishingPicasaAlbum** * array, int* length, int } -static void _vala_array_add13 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value) { +static void _vala_array_add14 (PublishingPicasaAlbum** * array, int* length, int* size, PublishingPicasaAlbum* value) { #line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -1052,7 +1052,7 @@ static PublishingPicasaAlbum** publishing_picasa_picasa_publisher_extract_albums #line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp10_ = publishing_picasa_album_new (_ ("Default album"), PUBLISHING_PICASA_PICASA_PUBLISHER_DEFAULT_ALBUM_FEED_URL); #line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add12 (&_result_, &_result__length1, &__result__size_, _tmp10_); + _vala_array_add13 (&_result_, &_result__length1, &__result__size_, _tmp10_); #line 1052 "PicasaPublishing.c" { gboolean _tmp11_ = FALSE; @@ -1233,7 +1233,7 @@ static PublishingPicasaAlbum** publishing_picasa_picasa_publisher_extract_albums #line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp38_ = publishing_picasa_album_new (_tmp36_, _tmp37_); #line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add13 (&_result_, &_result__length1, &__result__size_, _tmp38_); + _vala_array_add14 (&_result_, &_result__length1, &__result__size_, _tmp38_); #line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _g_free0 (url_val); #line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5003,7 +5003,7 @@ static void publishing_picasa_publishing_options_pane_on_logout_clicked (Publish } -static void _vala_array_add14 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { #line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5020,7 +5020,7 @@ static void _vala_array_add14 (PublishingPicasaPublishingOptionsPaneSizeDescript } -static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5037,7 +5037,7 @@ static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescript } -static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5054,7 +5054,7 @@ static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescript } -static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +static void _vala_array_add18 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5071,7 +5071,7 @@ static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescript } -static void _vala_array_add18 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +static void _vala_array_add19 (PublishingPicasaPublishingOptionsPaneSizeDescription** * array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" if ((*length) == (*size)) { #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5128,7 +5128,7 @@ static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_ #line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp2_ = publishing_picasa_publishing_options_pane_size_description_new (_ ("Small (640 × 480 pixels)"), 640); #line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add14 (&_result_, &_result__length1, &__result__size_, _tmp2_); + _vala_array_add15 (&_result_, &_result__length1, &__result__size_, _tmp2_); #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp3_ = _result_; #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5136,7 +5136,7 @@ static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_ #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp4_ = publishing_picasa_publishing_options_pane_size_description_new (_ ("Medium (1024 × 768 pixels)"), 1024); #line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add15 (&_result_, &_result__length1, &__result__size_, _tmp4_); + _vala_array_add16 (&_result_, &_result__length1, &__result__size_, _tmp4_); #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp5_ = _result_; #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5144,7 +5144,7 @@ static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_ #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp6_ = publishing_picasa_publishing_options_pane_size_description_new (_ ("Recommended (1600 × 1200 pixels)"), 1600); #line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add16 (&_result_, &_result__length1, &__result__size_, _tmp6_); + _vala_array_add17 (&_result_, &_result__length1, &__result__size_, _tmp6_); #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp7_ = _result_; #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5152,7 +5152,7 @@ static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_ #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp8_ = publishing_picasa_publishing_options_pane_size_description_new (_ ("Google+ (2048 × 1536 pixels)"), 2048); #line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add17 (&_result_, &_result__length1, &__result__size_, _tmp8_); + _vala_array_add18 (&_result_, &_result__length1, &__result__size_, _tmp8_); #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp9_ = _result_; #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" @@ -5160,7 +5160,7 @@ static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_ #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp10_ = publishing_picasa_publishing_options_pane_size_description_new (_ ("Original Size"), PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE); #line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" - _vala_array_add18 (&_result_, &_result__length1, &__result__size_, _tmp10_); + _vala_array_add19 (&_result_, &_result__length1, &__result__size_, _tmp10_); #line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" _tmp11_ = _result_; #line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" diff --git a/plugins/shotwell-publishing/PiwigoPublishing.c b/plugins/shotwell-publishing/PiwigoPublishing.c index 2323b7f..ed0eee0 100644 --- a/plugins/shotwell-publishing/PiwigoPublishing.c +++ b/plugins/shotwell-publishing/PiwigoPublishing.c @@ -599,7 +599,7 @@ static gint piwigo_service_real_get_pluggable_interface (SpitPluggable* base, gi static const gchar* piwigo_service_real_get_id (SpitPluggable* base); static const gchar* piwigo_service_real_get_pluggable_name (SpitPluggable* base); static void piwigo_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); -static GdkPixbuf** _vala_array_dup10 (GdkPixbuf** self, int length); +static GdkPixbuf** _vala_array_dup12 (GdkPixbuf** self, int length); static void piwigo_service_real_activation (SpitPluggable* base, gboolean enabled); static SpitPublishingPublisher* piwigo_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); PublishingPiwigoPiwigoPublisher* publishing_piwigo_piwigo_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); @@ -753,7 +753,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_error (Publishi static void _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); static void _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); -static void _vala_array_add35 (PublishingPiwigoCategory** * array, int* length, int* size, PublishingPiwigoCategory* value); +static void _vala_array_add38 (PublishingPiwigoCategory** * array, int* length, int* size, PublishingPiwigoCategory* value); static void publishing_piwigo_piwigo_publisher_do_show_publishing_options_pane (PublishingPiwigoPiwigoPublisher* self); GType publishing_piwigo_publishing_options_pane_get_type (void) G_GNUC_CONST; PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane_new (PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoCategory** categories, int categories_length1, gint last_category, gint last_permission_level, gint last_photo_size, gboolean last_title_as_comment, gboolean last_no_upload_tags, gboolean strip_metadata_enabled); @@ -862,7 +862,7 @@ enum { PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_EXISTING_CATEGORIES_PROPERTY, PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_DEFAULT_COMMENT_PROPERTY }; -static PublishingPiwigoCategory** _vala_array_dup11 (PublishingPiwigoCategory** self, int length); +static PublishingPiwigoCategory** _vala_array_dup13 (PublishingPiwigoCategory** self, int length); static gboolean _publishing_piwigo_category_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self); static gchar* publishing_piwigo_publishing_options_pane_get_common_comment_if_possible (PublishingPiwigoPiwigoPublisher* publisher); static void publishing_piwigo_publishing_options_pane_real_constructed (GObject* base); @@ -884,16 +884,16 @@ static void _publishing_piwigo_publishing_options_pane_on_existing_combo_changed static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pane_create_perm_levels (PublishingPiwigoPublishingOptionsPane* self, int* result_length1); static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_create_sizes (PublishingPiwigoPublishingOptionsPane* self, int* result_length1); static const gchar* publishing_piwigo_publishing_options_pane_get_default_comment (PublishingPiwigoPublishingOptionsPane* self); -static void _vala_array_add36 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); -static void _vala_array_add37 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); -static void _vala_array_add38 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); static void _vala_array_add39 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); static void _vala_array_add40 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); -static void _vala_array_add41 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); -static void _vala_array_add42 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); -static void _vala_array_add43 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add41 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add42 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add43 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value); static void _vala_array_add44 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); static void _vala_array_add45 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add46 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add47 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add48 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value); static GeeList* publishing_piwigo_publishing_options_pane_get_existing_categories (PublishingPiwigoPublishingOptionsPane* self); static void publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (PublishingPiwigoPublishingOptionsPane* self); static gboolean publishing_piwigo_publishing_options_pane_category_already_exists (PublishingPiwigoPublishingOptionsPane* self, const gchar* category_name); @@ -1058,7 +1058,7 @@ static gpointer _g_object_ref0 (gpointer self) { } -static GdkPixbuf** _vala_array_dup10 (GdkPixbuf** self, int length) { +static GdkPixbuf** _vala_array_dup12 (GdkPixbuf** self, int length) { GdkPixbuf** result; int i; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -1145,7 +1145,7 @@ static void piwigo_service_real_get_info (SpitPluggable* base, SpitPluggableInfo #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7__length1 = piwigo_service_icon_pixbuf_set_length1; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup10 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); + _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup12 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp8__length1 = _tmp7__length1; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -3472,7 +3472,7 @@ static void publishing_piwigo_piwigo_publisher_do_network_login (PublishingPiwig #line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 3473 "PiwigoPublishing.c" - goto __catch23_spit_publishing_publishing_error; + goto __catch28_spit_publishing_publishing_error; } #line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (login_trans); @@ -3485,8 +3485,8 @@ static void publishing_piwigo_piwigo_publisher_do_network_login (PublishingPiwig #line 3484 "PiwigoPublishing.c" } } - goto __finally23; - __catch23_spit_publishing_publishing_error: + goto __finally28; + __catch28_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp13_; @@ -3521,7 +3521,7 @@ static void publishing_piwigo_piwigo_publisher_do_network_login (PublishingPiwig _g_error_free0 (err); #line 3521 "PiwigoPublishing.c" } - __finally23: + __finally28: #line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -3735,7 +3735,7 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis #line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 3736 "PiwigoPublishing.c" - goto __catch24_spit_publishing_publishing_error; + goto __catch29_spit_publishing_publishing_error; } #line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -3746,8 +3746,8 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis #line 3745 "PiwigoPublishing.c" } } - goto __finally24; - __catch24_spit_publishing_publishing_error: + goto __finally29; + __catch29_spit_publishing_publishing_error: { GError* err = NULL; #line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -3780,7 +3780,7 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis #line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 3781 "PiwigoPublishing.c" - goto __catch25_spit_publishing_publishing_error; + goto __catch30_spit_publishing_publishing_error; } #line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_error_free0 (err); @@ -3793,8 +3793,8 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis #line 3792 "PiwigoPublishing.c" } } - goto __finally25; - __catch25_spit_publishing_publishing_error: + goto __finally30; + __catch30_spit_publishing_publishing_error: { GError* code = NULL; gint code_int = 0; @@ -3837,7 +3837,7 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis _g_error_free0 (code); #line 3837 "PiwigoPublishing.c" } - __finally25: + __finally30: #line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -3858,7 +3858,7 @@ static void publishing_piwigo_piwigo_publisher_on_login_network_complete (Publis return; #line 3858 "PiwigoPublishing.c" } - __finally24: + __finally29: #line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4051,7 +4051,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi #line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4052 "PiwigoPublishing.c" - goto __catch26_spit_publishing_publishing_error; + goto __catch31_spit_publishing_publishing_error; } #line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (status_txn); @@ -4064,8 +4064,8 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi #line 4063 "PiwigoPublishing.c" } } - goto __finally26; - __catch26_spit_publishing_publishing_error: + goto __finally31; + __catch31_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp11_; @@ -4084,7 +4084,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi _g_error_free0 (err); #line 4083 "PiwigoPublishing.c" } - __finally26: + __finally31: #line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4132,7 +4132,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi #line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4132 "PiwigoPublishing.c" - goto __catch27_spit_publishing_publishing_error; + goto __catch32_spit_publishing_publishing_error; } #line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (status_txn); @@ -4145,8 +4145,8 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi #line 4143 "PiwigoPublishing.c" } } - goto __finally27; - __catch27_spit_publishing_publishing_error: + goto __finally32; + __catch32_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp17_; @@ -4165,7 +4165,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (Publishi _g_error_free0 (err); #line 4163 "PiwigoPublishing.c" } - __finally27: + __finally32: #line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4279,7 +4279,7 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P #line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4278 "PiwigoPublishing.c" - goto __catch28_spit_publishing_publishing_error; + goto __catch33_spit_publishing_publishing_error; } #line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_free0 (pwg_id); @@ -4332,7 +4332,7 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P #line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4331 "PiwigoPublishing.c" - goto __catch29_spit_publishing_publishing_error; + goto __catch34_spit_publishing_publishing_error; } #line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_xml_document_unref0 (doc); @@ -4396,8 +4396,8 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P _g_free0 (username); #line 4394 "PiwigoPublishing.c" } - goto __finally29; - __catch29_spit_publishing_publishing_error: + goto __finally34; + __catch34_spit_publishing_publishing_error: { GError* err2 = NULL; GError* _tmp35_; @@ -4424,7 +4424,7 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P return; #line 4421 "PiwigoPublishing.c" } - __finally29: + __finally34: #line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4432,7 +4432,7 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P #line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4430 "PiwigoPublishing.c" - goto __catch28_spit_publishing_publishing_error; + goto __catch33_spit_publishing_publishing_error; } #line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_xml_document_unref0 (doc); @@ -4452,8 +4452,8 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P _publishing_rest_support_xml_document_unref0 (doc); #line 4449 "PiwigoPublishing.c" } - goto __finally28; - __catch28_spit_publishing_publishing_error: + goto __finally33; + __catch33_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp36_; @@ -4478,7 +4478,7 @@ static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (P return; #line 4474 "PiwigoPublishing.c" } - __finally28: + __finally33: #line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4602,7 +4602,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPi #line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4599 "PiwigoPublishing.c" - goto __catch30_spit_publishing_publishing_error; + goto __catch35_spit_publishing_publishing_error; } #line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (cat_trans); @@ -4615,8 +4615,8 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPi #line 4610 "PiwigoPublishing.c" } } - goto __finally30; - __catch30_spit_publishing_publishing_error: + goto __finally35; + __catch35_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp4_; @@ -4634,7 +4634,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPi _g_error_free0 (err); #line 4630 "PiwigoPublishing.c" } - __finally30: + __finally35: #line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4660,7 +4660,7 @@ static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPi * populates the categories list. It then triggers the display of the * publishing options pane. */ -static void _vala_array_add35 (PublishingPiwigoCategory** * array, int* length, int* size, PublishingPiwigoCategory* value) { +static void _vala_array_add38 (PublishingPiwigoCategory** * array, int* length, int* size, PublishingPiwigoCategory* value) { #line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -4777,7 +4777,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi #line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4774 "PiwigoPublishing.c" - goto __catch31_spit_publishing_publishing_error; + goto __catch36_spit_publishing_publishing_error; } #line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -4902,7 +4902,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi #line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4899 "PiwigoPublishing.c" - goto __catch31_spit_publishing_publishing_error; + goto __catch36_spit_publishing_publishing_error; } #line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_object_unref0 (id_map); @@ -4955,7 +4955,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi #line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 4952 "PiwigoPublishing.c" - goto __catch31_spit_publishing_publishing_error; + goto __catch36_spit_publishing_publishing_error; } #line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_object_unref0 (id_map); @@ -5036,7 +5036,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi #line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp51_ = publishing_piwigo_category_new (_tmp48_, _tmp49_, _tmp50_, ""); #line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add35 (&self->priv->categories, &self->priv->categories_length1, &self->priv->_categories_size_, _tmp51_); + _vala_array_add38 (&self->priv->categories, &self->priv->categories_length1, &self->priv->_categories_size_, _tmp51_); #line 5035 "PiwigoPublishing.c" } } @@ -5240,8 +5240,8 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi _publishing_rest_support_xml_document_unref0 (doc); #line 5236 "PiwigoPublishing.c" } - goto __finally31; - __catch31_spit_publishing_publishing_error: + goto __finally36; + __catch36_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp82_; @@ -5261,7 +5261,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (Publi return; #line 5257 "PiwigoPublishing.c" } - __finally31: + __finally36: #line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -5450,7 +5450,7 @@ static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout #line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 5446 "PiwigoPublishing.c" - goto __catch32_spit_publishing_publishing_error; + goto __catch37_spit_publishing_publishing_error; } #line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (logout_trans); @@ -5463,8 +5463,8 @@ static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout #line 5457 "PiwigoPublishing.c" } } - goto __finally32; - __catch32_spit_publishing_publishing_error: + goto __finally37; + __catch37_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp2_; @@ -5483,7 +5483,7 @@ static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout _g_error_free0 (err); #line 5477 "PiwigoPublishing.c" } - __finally32: + __finally37: #line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -5808,7 +5808,7 @@ static void publishing_piwigo_piwigo_publisher_do_create_category (PublishingPiw #line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 5802 "PiwigoPublishing.c" - goto __catch33_spit_publishing_publishing_error; + goto __catch38_spit_publishing_publishing_error; } #line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_transaction_unref0 (creation_trans); @@ -5821,8 +5821,8 @@ static void publishing_piwigo_piwigo_publisher_do_create_category (PublishingPiw #line 5813 "PiwigoPublishing.c" } } - goto __finally33; - __catch33_spit_publishing_publishing_error: + goto __finally38; + __catch38_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp24_; @@ -5840,7 +5840,7 @@ static void publishing_piwigo_piwigo_publisher_do_create_category (PublishingPiw _g_error_free0 (err); #line 5833 "PiwigoPublishing.c" } - __finally33: + __finally38: #line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 780 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -5935,7 +5935,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_add_complete (Publish #line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 5929 "PiwigoPublishing.c" - goto __catch34_spit_publishing_publishing_error; + goto __catch39_spit_publishing_publishing_error; } #line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -5966,7 +5966,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_add_complete (Publish #line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 5960 "PiwigoPublishing.c" - goto __catch34_spit_publishing_publishing_error; + goto __catch39_spit_publishing_publishing_error; } #line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_xml_document_unref0 (doc); @@ -6010,8 +6010,8 @@ static void publishing_piwigo_piwigo_publisher_on_category_add_complete (Publish _publishing_rest_support_xml_document_unref0 (doc); #line 6003 "PiwigoPublishing.c" } - goto __finally34; - __catch34_spit_publishing_publishing_error: + goto __finally39; + __catch39_spit_publishing_publishing_error: { GError* err = NULL; GError* _tmp23_; @@ -6029,7 +6029,7 @@ static void publishing_piwigo_piwigo_publisher_on_category_add_complete (Publish _g_error_free0 (err); #line 6022 "PiwigoPublishing.c" } - __finally34: + __finally39: #line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8284,7 +8284,7 @@ static gpointer _publishing_piwigo_category_ref0 (gpointer self) { } -static PublishingPiwigoCategory** _vala_array_dup11 (PublishingPiwigoCategory** self, int length) { +static PublishingPiwigoCategory** _vala_array_dup13 (PublishingPiwigoCategory** self, int length) { PublishingPiwigoCategory** result; int i; #line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8350,7 +8350,7 @@ PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane #line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp6__length1 = categories_length1; #line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _tmp7_ = (_tmp6_ != NULL) ? _vala_array_dup11 (_tmp6_, _tmp6__length1) : ((gpointer) _tmp6_); + _tmp7_ = (_tmp6_ != NULL) ? _vala_array_dup13 (_tmp6_, _tmp6__length1) : ((gpointer) _tmp6_); #line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7__length1 = _tmp6__length1; #line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8697,7 +8697,7 @@ static void publishing_piwigo_publishing_options_pane_real_constructed (GObject* } -static void _vala_array_add36 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +static void _vala_array_add39 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { #line 1290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8714,7 +8714,7 @@ static void _vala_array_add36 (PublishingPiwigoPermissionLevel** * array, int* l } -static void _vala_array_add37 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +static void _vala_array_add40 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8731,7 +8731,7 @@ static void _vala_array_add37 (PublishingPiwigoPermissionLevel** * array, int* l } -static void _vala_array_add38 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +static void _vala_array_add41 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8748,7 +8748,7 @@ static void _vala_array_add38 (PublishingPiwigoPermissionLevel** * array, int* l } -static void _vala_array_add39 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +static void _vala_array_add42 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8765,7 +8765,7 @@ static void _vala_array_add39 (PublishingPiwigoPermissionLevel** * array, int* l } -static void _vala_array_add40 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +static void _vala_array_add43 (PublishingPiwigoPermissionLevel** * array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8822,7 +8822,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa #line 1290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp2_ = publishing_piwigo_permission_level_new (0, _ ("Everyone")); #line 1290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add36 (&_result_, &_result__length1, &__result__size_, _tmp2_); + _vala_array_add39 (&_result_, &_result__length1, &__result__size_, _tmp2_); #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp3_ = _result_; #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8830,7 +8830,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp4_ = publishing_piwigo_permission_level_new (1, _ ("Admins, Family, Friends, Contacts")); #line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add37 (&_result_, &_result__length1, &__result__size_, _tmp4_); + _vala_array_add40 (&_result_, &_result__length1, &__result__size_, _tmp4_); #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp5_ = _result_; #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8838,7 +8838,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp6_ = publishing_piwigo_permission_level_new (2, _ ("Admins, Family, Friends")); #line 1292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add38 (&_result_, &_result__length1, &__result__size_, _tmp6_); + _vala_array_add41 (&_result_, &_result__length1, &__result__size_, _tmp6_); #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7_ = _result_; #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8846,7 +8846,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp8_ = publishing_piwigo_permission_level_new (4, _ ("Admins, Family")); #line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add39 (&_result_, &_result__length1, &__result__size_, _tmp8_); + _vala_array_add42 (&_result_, &_result__length1, &__result__size_, _tmp8_); #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp9_ = _result_; #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8854,7 +8854,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp10_ = publishing_piwigo_permission_level_new (8, _ ("Admins")); #line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add40 (&_result_, &_result__length1, &__result__size_, _tmp10_); + _vala_array_add43 (&_result_, &_result__length1, &__result__size_, _tmp10_); #line 1296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp11_ = _result_; #line 1296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8873,7 +8873,7 @@ static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pa } -static void _vala_array_add41 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +static void _vala_array_add44 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { #line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8890,7 +8890,7 @@ static void _vala_array_add41 (PublishingPiwigoSizeEntry** * array, int* length, } -static void _vala_array_add42 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +static void _vala_array_add45 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8907,7 +8907,7 @@ static void _vala_array_add42 (PublishingPiwigoSizeEntry** * array, int* length, } -static void _vala_array_add43 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +static void _vala_array_add46 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8924,7 +8924,7 @@ static void _vala_array_add43 (PublishingPiwigoSizeEntry** * array, int* length, } -static void _vala_array_add44 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +static void _vala_array_add47 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8941,7 +8941,7 @@ static void _vala_array_add44 (PublishingPiwigoSizeEntry** * array, int* length, } -static void _vala_array_add45 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +static void _vala_array_add48 (PublishingPiwigoSizeEntry** * array, int* length, int* size, PublishingPiwigoSizeEntry* value) { #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if ((*length) == (*size)) { #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -8998,7 +8998,7 @@ static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_cre #line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp2_ = publishing_piwigo_size_entry_new (500, _ ("500 × 375 pixels")); #line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add41 (&_result_, &_result__length1, &__result__size_, _tmp2_); + _vala_array_add44 (&_result_, &_result__length1, &__result__size_, _tmp2_); #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp3_ = _result_; #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -9006,7 +9006,7 @@ static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_cre #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp4_ = publishing_piwigo_size_entry_new (1024, _ ("1024 × 768 pixels")); #line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add42 (&_result_, &_result__length1, &__result__size_, _tmp4_); + _vala_array_add45 (&_result_, &_result__length1, &__result__size_, _tmp4_); #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp5_ = _result_; #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -9014,7 +9014,7 @@ static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_cre #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp6_ = publishing_piwigo_size_entry_new (2048, _ ("2048 × 1536 pixels")); #line 1304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add43 (&_result_, &_result__length1, &__result__size_, _tmp6_); + _vala_array_add46 (&_result_, &_result__length1, &__result__size_, _tmp6_); #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7_ = _result_; #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -9022,7 +9022,7 @@ static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_cre #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp8_ = publishing_piwigo_size_entry_new (4096, _ ("4096 × 3072 pixels")); #line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add44 (&_result_, &_result__length1, &__result__size_, _tmp8_); + _vala_array_add47 (&_result_, &_result__length1, &__result__size_, _tmp8_); #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp9_ = _result_; #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -9030,7 +9030,7 @@ static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_cre #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp10_ = publishing_piwigo_size_entry_new (PUBLISHING_PIWIGO_ORIGINAL_SIZE, _ ("Original size")); #line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _vala_array_add45 (&_result_, &_result__length1, &__result__size_, _tmp10_); + _vala_array_add48 (&_result_, &_result__length1, &__result__size_, _tmp10_); #line 1308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp11_ = _result_; #line 1308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -11583,7 +11583,7 @@ gchar* publishing_piwigo_transaction_validate_xml (PublishingRESTSupportXmlDocum #line 1618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 11571 "PiwigoPublishing.c" - goto __catch35_spit_publishing_publishing_error; + goto __catch40_spit_publishing_publishing_error; } #line 1618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_free0 (status); @@ -11599,8 +11599,8 @@ gchar* publishing_piwigo_transaction_validate_xml (PublishingRESTSupportXmlDocum errcode = _tmp7_; #line 11586 "PiwigoPublishing.c" } - goto __finally35; - __catch35_spit_publishing_publishing_error: + goto __finally40; + __catch40_spit_publishing_publishing_error: { GError* err = NULL; gchar* _tmp11_; @@ -11620,7 +11620,7 @@ gchar* publishing_piwigo_transaction_validate_xml (PublishingRESTSupportXmlDocum return result; #line 11607 "PiwigoPublishing.c" } - __finally35: + __finally40: #line 1617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -11699,7 +11699,7 @@ gchar* publishing_piwigo_transaction_get_error_code (PublishingRESTSupportXmlDoc #line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { #line 11687 "PiwigoPublishing.c" - goto __catch36_spit_publishing_publishing_error; + goto __catch41_spit_publishing_publishing_error; } #line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); @@ -11713,8 +11713,8 @@ gchar* publishing_piwigo_transaction_get_error_code (PublishingRESTSupportXmlDoc errcode = _tmp2_; #line 11700 "PiwigoPublishing.c" } - goto __finally36; - __catch36_spit_publishing_publishing_error: + goto __finally41; + __catch41_spit_publishing_publishing_error: { GError* err = NULL; gchar* _tmp6_; @@ -11732,7 +11732,7 @@ gchar* publishing_piwigo_transaction_get_error_code (PublishingRESTSupportXmlDoc return result; #line 11719 "PiwigoPublishing.c" } - __finally36: + __finally41: #line 1629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -11791,7 +11791,11 @@ PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transac PublishingPiwigoSession* _tmp0_; const gchar* _tmp1_; const gchar* _tmp2_; - const gchar* _tmp3_; + gchar* _tmp3_; + gchar* _tmp4_; + const gchar* _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; #line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); #line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -11811,28 +11815,40 @@ PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transac #line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp2_ = username; #line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "username", _tmp2_); + _tmp3_ = g_uri_escape_string (_tmp2_, NULL, TRUE); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "username", _tmp4_); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp4_); #line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - _tmp3_ = password; + _tmp5_ = password; +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_uri_escape_string (_tmp5_, NULL, TRUE); +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_; #line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" - publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "password", _tmp3_); + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "password", _tmp7_); +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp7_); #line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 11807 "PiwigoPublishing.c" +#line 11823 "PiwigoPublishing.c" } PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_new (PublishingPiwigoSession* session, const gchar* url, const gchar* username, const gchar* password) { #line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_session_login_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, session, url, username, password); -#line 11814 "PiwigoPublishing.c" +#line 11830 "PiwigoPublishing.c" } static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self ? publishing_rest_support_argument_ref (self) : NULL; -#line 11821 "PiwigoPublishing.c" +#line 11837 "PiwigoPublishing.c" } @@ -11865,7 +11881,7 @@ PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transac _tmp4_ = other; #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp6_ = publishing_rest_support_transaction_get_arguments (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_tmp5_); -#line 11854 "PiwigoPublishing.c" +#line 11870 "PiwigoPublishing.c" { PublishingRESTSupportArgument** argument_collection = NULL; gint argument_collection_length1 = 0; @@ -11877,14 +11893,14 @@ PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transac argument_collection_length1 = _tmp5_; #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" for (argument_it = 0; argument_it < _tmp5_; argument_it = argument_it + 1) { -#line 11866 "PiwigoPublishing.c" +#line 11882 "PiwigoPublishing.c" PublishingRESTSupportArgument* _tmp7_; PublishingRESTSupportArgument* argument = NULL; #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7_ = _publishing_rest_support_argument_ref0 (argument_collection[argument_it]); #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" argument = _tmp7_; -#line 11873 "PiwigoPublishing.c" +#line 11889 "PiwigoPublishing.c" { PublishingRESTSupportArgument* _tmp8_; const gchar* _tmp9_; @@ -11902,30 +11918,30 @@ PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transac publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp9_, _tmp11_); #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _publishing_rest_support_argument_unref0 (argument); -#line 11891 "PiwigoPublishing.c" +#line 11907 "PiwigoPublishing.c" } } #line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" argument_collection = (_vala_array_free (argument_collection, argument_collection_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); -#line 11896 "PiwigoPublishing.c" +#line 11912 "PiwigoPublishing.c" } #line 1650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 11900 "PiwigoPublishing.c" +#line 11916 "PiwigoPublishing.c" } PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_new_from_other (PublishingPiwigoSession* session, PublishingPiwigoTransaction* other) { #line 1650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_session_login_transaction_construct_from_other (PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, session, other); -#line 11907 "PiwigoPublishing.c" +#line 11923 "PiwigoPublishing.c" } static void publishing_piwigo_session_login_transaction_class_init (PublishingPiwigoSessionLoginTransactionClass * klass) { #line 1641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_piwigo_session_login_transaction_parent_class = g_type_class_peek_parent (klass); -#line 11914 "PiwigoPublishing.c" +#line 11930 "PiwigoPublishing.c" } @@ -11989,14 +12005,14 @@ PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_statu publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.getStatus"); #line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 11978 "PiwigoPublishing.c" +#line 11994 "PiwigoPublishing.c" } PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new_unauthenticated (PublishingPiwigoSession* session, const gchar* url, const gchar* pwg_id) { #line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_session_get_status_transaction_construct_unauthenticated (PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, session, url, pwg_id); -#line 11985 "PiwigoPublishing.c" +#line 12001 "PiwigoPublishing.c" } @@ -12013,21 +12029,21 @@ PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_statu publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.getStatus"); #line 1670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 12002 "PiwigoPublishing.c" +#line 12018 "PiwigoPublishing.c" } PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new (PublishingPiwigoSession* session) { #line 1670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_session_get_status_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, session); -#line 12009 "PiwigoPublishing.c" +#line 12025 "PiwigoPublishing.c" } static void publishing_piwigo_session_get_status_transaction_class_init (PublishingPiwigoSessionGetStatusTransactionClass * klass) { #line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_piwigo_session_get_status_transaction_parent_class = g_type_class_peek_parent (klass); -#line 12016 "PiwigoPublishing.c" +#line 12032 "PiwigoPublishing.c" } @@ -12065,21 +12081,21 @@ PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_l publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "recursive", "true"); #line 1681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 12054 "PiwigoPublishing.c" +#line 12070 "PiwigoPublishing.c" } PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_list_transaction_new (PublishingPiwigoSession* session) { #line 1681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_categories_get_list_transaction_construct (PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION, session); -#line 12061 "PiwigoPublishing.c" +#line 12077 "PiwigoPublishing.c" } static void publishing_piwigo_categories_get_list_transaction_class_init (PublishingPiwigoCategoriesGetListTransactionClass * klass) { #line 1680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_piwigo_categories_get_list_transaction_parent_class = g_type_class_peek_parent (klass); -#line 12068 "PiwigoPublishing.c" +#line 12084 "PiwigoPublishing.c" } @@ -12115,21 +12131,21 @@ PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_trans publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.logout"); #line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 12104 "PiwigoPublishing.c" +#line 12120 "PiwigoPublishing.c" } PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_transaction_new (PublishingPiwigoSession* session) { #line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_session_logout_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION, session); -#line 12111 "PiwigoPublishing.c" +#line 12127 "PiwigoPublishing.c" } static void publishing_piwigo_session_logout_transaction_class_init (PublishingPiwigoSessionLogoutTransactionClass * klass) { #line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_piwigo_session_logout_transaction_parent_class = g_type_class_peek_parent (klass); -#line 12118 "PiwigoPublishing.c" +#line 12134 "PiwigoPublishing.c" } @@ -12173,7 +12189,7 @@ PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_trans _tmp2_ = parent_id; #line 1704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp2_ != 0) { -#line 12162 "PiwigoPublishing.c" +#line 12178 "PiwigoPublishing.c" gint _tmp3_; gchar* _tmp4_; gchar* _tmp5_; @@ -12187,37 +12203,37 @@ PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_trans publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "parent", _tmp5_); #line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_free0 (_tmp5_); -#line 12176 "PiwigoPublishing.c" +#line 12192 "PiwigoPublishing.c" } #line 1708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp6_ = comment; #line 1708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (g_strcmp0 (_tmp6_, "") != 0) { -#line 12182 "PiwigoPublishing.c" +#line 12198 "PiwigoPublishing.c" const gchar* _tmp7_; #line 1709 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp7_ = comment; #line 1709 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp7_); -#line 12188 "PiwigoPublishing.c" +#line 12204 "PiwigoPublishing.c" } #line 1698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 12192 "PiwigoPublishing.c" +#line 12208 "PiwigoPublishing.c" } PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_transaction_new (PublishingPiwigoSession* session, const gchar* category, gint parent_id, const gchar* comment) { #line 1698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_categories_add_transaction_construct (PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION, session, category, parent_id, comment); -#line 12199 "PiwigoPublishing.c" +#line 12215 "PiwigoPublishing.c" } static void publishing_piwigo_categories_add_transaction_class_init (PublishingPiwigoCategoriesAddTransactionClass * klass) { #line 1697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_piwigo_categories_add_transaction_parent_class = g_type_class_peek_parent (klass); -#line 12206 "PiwigoPublishing.c" +#line 12222 "PiwigoPublishing.c" } @@ -12250,7 +12266,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s if (_tmp0_ == NULL) { #line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" separator = ""; -#line 12239 "PiwigoPublishing.c" +#line 12255 "PiwigoPublishing.c" } #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp3_ = str_array; @@ -12260,7 +12276,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s if (_tmp3_ != NULL) { #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp2_ = TRUE; -#line 12249 "PiwigoPublishing.c" +#line 12265 "PiwigoPublishing.c" } else { gchar** _tmp4_; gint _tmp4__length1; @@ -12270,13 +12286,13 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp4__length1 = str_array_length1; #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp2_ = _tmp4__length1 > 0; -#line 12259 "PiwigoPublishing.c" +#line 12275 "PiwigoPublishing.c" } #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp2_) { #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp1_ = TRUE; -#line 12265 "PiwigoPublishing.c" +#line 12281 "PiwigoPublishing.c" } else { gboolean _tmp5_ = FALSE; gchar** _tmp6_; @@ -12287,7 +12303,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp6__length1 = str_array_length1; #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp6__length1 == -1) { -#line 12276 "PiwigoPublishing.c" +#line 12292 "PiwigoPublishing.c" gchar** _tmp7_; gint _tmp7__length1; const gchar* _tmp8_; @@ -12299,19 +12315,19 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp8_ = _tmp7_[0]; #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp5_ = _tmp8_ != NULL; -#line 12288 "PiwigoPublishing.c" +#line 12304 "PiwigoPublishing.c" } else { #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp5_ = FALSE; -#line 12292 "PiwigoPublishing.c" +#line 12308 "PiwigoPublishing.c" } #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp1_ = _tmp5_; -#line 12296 "PiwigoPublishing.c" +#line 12312 "PiwigoPublishing.c" } #line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp1_) { -#line 12300 "PiwigoPublishing.c" +#line 12316 "PiwigoPublishing.c" gint i = 0; gsize len = 0UL; gint _tmp31_; @@ -12334,7 +12350,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s const gchar* _tmp62_; #line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" len = (gsize) 1; -#line 12323 "PiwigoPublishing.c" +#line 12339 "PiwigoPublishing.c" { gboolean _tmp9_ = FALSE; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -12343,7 +12359,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp9_ = TRUE; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" while (TRUE) { -#line 12332 "PiwigoPublishing.c" +#line 12348 "PiwigoPublishing.c" gboolean _tmp11_ = FALSE; gboolean _tmp12_ = FALSE; gchar** _tmp13_; @@ -12356,13 +12372,13 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s gsize _tmp30_; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (!_tmp9_) { -#line 12345 "PiwigoPublishing.c" +#line 12361 "PiwigoPublishing.c" gint _tmp10_; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp10_ = i; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" i = _tmp10_ + 1; -#line 12351 "PiwigoPublishing.c" +#line 12367 "PiwigoPublishing.c" } #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp9_ = FALSE; @@ -12372,7 +12388,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp13__length1 = str_array_length1; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp13__length1 != -1) { -#line 12361 "PiwigoPublishing.c" +#line 12377 "PiwigoPublishing.c" gint _tmp14_; gchar** _tmp15_; gint _tmp15__length1; @@ -12384,17 +12400,17 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp15__length1 = str_array_length1; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp12_ = _tmp14_ < _tmp15__length1; -#line 12373 "PiwigoPublishing.c" +#line 12389 "PiwigoPublishing.c" } else { #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp12_ = FALSE; -#line 12377 "PiwigoPublishing.c" +#line 12393 "PiwigoPublishing.c" } #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp12_) { #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp11_ = TRUE; -#line 12383 "PiwigoPublishing.c" +#line 12399 "PiwigoPublishing.c" } else { gboolean _tmp16_ = FALSE; gchar** _tmp17_; @@ -12405,7 +12421,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp17__length1 = str_array_length1; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp17__length1 == -1) { -#line 12394 "PiwigoPublishing.c" +#line 12410 "PiwigoPublishing.c" gchar** _tmp18_; gint _tmp18__length1; gint _tmp19_; @@ -12420,21 +12436,21 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp20_ = _tmp18_[_tmp19_]; #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp16_ = _tmp20_ != NULL; -#line 12409 "PiwigoPublishing.c" +#line 12425 "PiwigoPublishing.c" } else { #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp16_ = FALSE; -#line 12413 "PiwigoPublishing.c" +#line 12429 "PiwigoPublishing.c" } #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp11_ = _tmp16_; -#line 12417 "PiwigoPublishing.c" +#line 12433 "PiwigoPublishing.c" } #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (!_tmp11_) { #line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" break; -#line 12423 "PiwigoPublishing.c" +#line 12439 "PiwigoPublishing.c" } #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp22_ = str_array; @@ -12446,7 +12462,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp24_ = _tmp22_[_tmp23_]; #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp24_ != NULL) { -#line 12435 "PiwigoPublishing.c" +#line 12451 "PiwigoPublishing.c" gchar** _tmp25_; gint _tmp25__length1; gint _tmp26_; @@ -12467,24 +12483,24 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp29_ = _tmp28_; #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp21_ = _tmp29_; -#line 12456 "PiwigoPublishing.c" +#line 12472 "PiwigoPublishing.c" } else { #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp21_ = 0; -#line 12460 "PiwigoPublishing.c" +#line 12476 "PiwigoPublishing.c" } #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp30_ = len; #line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" len = _tmp30_ + _tmp21_; -#line 12466 "PiwigoPublishing.c" +#line 12482 "PiwigoPublishing.c" } } #line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp31_ = i; #line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp31_ == 0) { -#line 12473 "PiwigoPublishing.c" +#line 12489 "PiwigoPublishing.c" gchar* _tmp32_; #line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp32_ = g_strdup (""); @@ -12492,7 +12508,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s result = _tmp32_; #line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 12481 "PiwigoPublishing.c" +#line 12497 "PiwigoPublishing.c" } #line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp33_ = i; @@ -12530,7 +12546,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); #line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" ptr = _tmp45_; -#line 12519 "PiwigoPublishing.c" +#line 12535 "PiwigoPublishing.c" { gboolean _tmp46_ = FALSE; #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -12539,7 +12555,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp46_ = TRUE; #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" while (TRUE) { -#line 12528 "PiwigoPublishing.c" +#line 12544 "PiwigoPublishing.c" gint _tmp48_; gchar** _tmp49_; gint _tmp49__length1; @@ -12555,13 +12571,13 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s void* _tmp61_; #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (!_tmp46_) { -#line 12544 "PiwigoPublishing.c" +#line 12560 "PiwigoPublishing.c" gint _tmp47_; #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp47_ = i; #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" i = _tmp47_ + 1; -#line 12550 "PiwigoPublishing.c" +#line 12566 "PiwigoPublishing.c" } #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp46_ = FALSE; @@ -12575,7 +12591,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s if (!(_tmp48_ < _tmp49__length1)) { #line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" break; -#line 12564 "PiwigoPublishing.c" +#line 12580 "PiwigoPublishing.c" } #line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp50_ = ptr; @@ -12595,7 +12611,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp56_ = _tmp54_[_tmp55_]; #line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (_tmp56_ != NULL) { -#line 12584 "PiwigoPublishing.c" +#line 12600 "PiwigoPublishing.c" gchar** _tmp57_; gint _tmp57__length1; gint _tmp58_; @@ -12610,11 +12626,11 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp59_ = _tmp57_[_tmp58_]; #line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp53_ = (const gchar*) _tmp59_; -#line 12599 "PiwigoPublishing.c" +#line 12615 "PiwigoPublishing.c" } else { #line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp53_ = ""; -#line 12603 "PiwigoPublishing.c" +#line 12619 "PiwigoPublishing.c" } #line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp60_ = ptr; @@ -12622,7 +12638,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); #line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" ptr = _tmp61_; -#line 12611 "PiwigoPublishing.c" +#line 12627 "PiwigoPublishing.c" } } #line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -12633,7 +12649,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s result = (gchar*) _tmp62_; #line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 12622 "PiwigoPublishing.c" +#line 12638 "PiwigoPublishing.c" } else { gchar* _tmp63_; #line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -12642,7 +12658,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s result = _tmp63_; #line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 12631 "PiwigoPublishing.c" +#line 12647 "PiwigoPublishing.c" } } @@ -12650,7 +12666,7 @@ static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int s static void _g_free0_ (gpointer var) { #line 1774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" var = (g_free (var), NULL); -#line 12639 "PiwigoPublishing.c" +#line 12655 "PiwigoPublishing.c" } @@ -12753,7 +12769,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp6_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); #line 1719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp6_) { -#line 12742 "PiwigoPublishing.c" +#line 12758 "PiwigoPublishing.c" PublishingPiwigoSession* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; @@ -12775,7 +12791,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _g_free0 (_tmp11_); #line 1720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_free0 (_tmp9_); -#line 12764 "PiwigoPublishing.c" +#line 12780 "PiwigoPublishing.c" } #line 1722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp12_ = parameters; @@ -12805,7 +12821,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp18__length1 = keywords_length1; #line 1726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp18_ != NULL) { -#line 12794 "PiwigoPublishing.c" +#line 12810 "PiwigoPublishing.c" gchar** _tmp19_; gint _tmp19__length1; gchar* _tmp20_; @@ -12819,7 +12835,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _g_free0 (tags); #line 1727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" tags = _tmp20_; -#line 12808 "PiwigoPublishing.c" +#line 12824 "PiwigoPublishing.c" } #line 1730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp21_ = publishable; @@ -12868,18 +12884,18 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c if (_tmp37_ == NULL) { #line 1736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp36_ = TRUE; -#line 12856 "PiwigoPublishing.c" +#line 12872 "PiwigoPublishing.c" } else { const gchar* _tmp38_; #line 1736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp38_ = name; #line 1736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp36_ = g_strcmp0 (_tmp38_, "") == 0; -#line 12863 "PiwigoPublishing.c" +#line 12879 "PiwigoPublishing.c" } #line 1736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp36_) { -#line 12867 "PiwigoPublishing.c" +#line 12883 "PiwigoPublishing.c" SpitPublishingPublishable* _tmp39_; gchar* _tmp40_; const gchar* _tmp41_; @@ -12901,27 +12917,27 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp43_ = comment; #line 1740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp43_ != NULL) { -#line 12889 "PiwigoPublishing.c" +#line 12905 "PiwigoPublishing.c" const gchar* _tmp44_; #line 1740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp44_ = comment; #line 1740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp42_ = g_strcmp0 (_tmp44_, "") != 0; -#line 12895 "PiwigoPublishing.c" +#line 12911 "PiwigoPublishing.c" } else { #line 1740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp42_ = FALSE; -#line 12899 "PiwigoPublishing.c" +#line 12915 "PiwigoPublishing.c" } #line 1740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp42_) { -#line 12903 "PiwigoPublishing.c" +#line 12919 "PiwigoPublishing.c" const gchar* _tmp45_; #line 1741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp45_ = comment; #line 1741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp45_); -#line 12909 "PiwigoPublishing.c" +#line 12925 "PiwigoPublishing.c" } } else { gboolean _tmp46_ = FALSE; @@ -12930,21 +12946,21 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp47_ = comment; #line 1745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp47_ != NULL) { -#line 12918 "PiwigoPublishing.c" +#line 12934 "PiwigoPublishing.c" const gchar* _tmp48_; #line 1745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp48_ = comment; #line 1745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp46_ = g_strcmp0 (_tmp48_, "") != 0; -#line 12924 "PiwigoPublishing.c" +#line 12940 "PiwigoPublishing.c" } else { #line 1745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp46_ = FALSE; -#line 12928 "PiwigoPublishing.c" +#line 12944 "PiwigoPublishing.c" } #line 1745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp46_) { -#line 12932 "PiwigoPublishing.c" +#line 12948 "PiwigoPublishing.c" const gchar* _tmp49_; const gchar* _tmp50_; #line 1746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -12955,7 +12971,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp50_ = comment; #line 1747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp50_); -#line 12943 "PiwigoPublishing.c" +#line 12959 "PiwigoPublishing.c" } else { PublishingPiwigoPublishingParameters* _tmp51_; gboolean _tmp52_; @@ -12965,20 +12981,20 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp52_ = _tmp51_->title_as_comment; #line 1752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp52_) { -#line 12953 "PiwigoPublishing.c" +#line 12969 "PiwigoPublishing.c" const gchar* _tmp53_; #line 1753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp53_ = name; #line 1753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp53_); -#line 12959 "PiwigoPublishing.c" +#line 12975 "PiwigoPublishing.c" } else { const gchar* _tmp54_; #line 1755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp54_ = name; #line 1755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "name", _tmp54_); -#line 12966 "PiwigoPublishing.c" +#line 12982 "PiwigoPublishing.c" } } } @@ -13018,19 +13034,19 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp66_ = _tmp65_->no_upload_tags; #line 1762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (!_tmp66_) { -#line 13006 "PiwigoPublishing.c" +#line 13022 "PiwigoPublishing.c" const gchar* _tmp67_; #line 1763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp67_ = tags; #line 1763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (g_strcmp0 (_tmp67_, "") != 0) { -#line 13012 "PiwigoPublishing.c" +#line 13028 "PiwigoPublishing.c" const gchar* _tmp68_; #line 1764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp68_ = tags; #line 1764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "tags", _tmp68_); -#line 13018 "PiwigoPublishing.c" +#line 13034 "PiwigoPublishing.c" } } #line 1774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -13061,7 +13077,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _g_free0 (_tmp77_); #line 1777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp79_) { -#line 13049 "PiwigoPublishing.c" +#line 13065 "PiwigoPublishing.c" const gchar* _tmp80_; gchar* _tmp81_; gchar* _tmp82_; @@ -13078,15 +13094,15 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _tmp74_ = !_tmp83_; #line 1778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _g_free0 (_tmp82_); -#line 13066 "PiwigoPublishing.c" +#line 13082 "PiwigoPublishing.c" } else { #line 1777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp74_ = FALSE; -#line 13070 "PiwigoPublishing.c" +#line 13086 "PiwigoPublishing.c" } #line 1777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" if (_tmp74_) { -#line 13074 "PiwigoPublishing.c" +#line 13090 "PiwigoPublishing.c" const gchar* _tmp84_; gchar* _tmp85_; #line 1779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" @@ -13097,7 +13113,7 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c _g_free0 (basename); #line 1779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" basename = _tmp85_; -#line 13085 "PiwigoPublishing.c" +#line 13101 "PiwigoPublishing.c" } #line 1781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" _tmp86_ = disposition_table; @@ -13135,14 +13151,14 @@ PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_c keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); #line 1717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return self; -#line 13123 "PiwigoPublishing.c" +#line 13139 "PiwigoPublishing.c" } PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_new (PublishingPiwigoSession* session, PublishingPiwigoPublishingParameters* parameters, SpitPublishingPublishable* publishable) { #line 1717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" return publishing_piwigo_images_add_transaction_construct (PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, session, parameters, publishable); -#line 13130 "PiwigoPublishing.c" +#line 13146 "PiwigoPublishing.c" } @@ -13153,7 +13169,7 @@ static void publishing_piwigo_images_add_transaction_class_init (PublishingPiwig ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_piwigo_images_add_transaction_finalize; #line 1714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" g_type_class_add_private (klass, sizeof (PublishingPiwigoImagesAddTransactionPrivate)); -#line 13141 "PiwigoPublishing.c" +#line 13157 "PiwigoPublishing.c" } @@ -13162,7 +13178,7 @@ static void publishing_piwigo_images_add_transaction_instance_init (PublishingPi self->priv = PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_GET_PRIVATE (self); #line 1715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" self->priv->parameters = NULL; -#line 13150 "PiwigoPublishing.c" +#line 13166 "PiwigoPublishing.c" } @@ -13174,7 +13190,7 @@ static void publishing_piwigo_images_add_transaction_finalize (PublishingRESTSup _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); #line 1714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_piwigo_images_add_transaction_parent_class)->finalize (obj); -#line 13162 "PiwigoPublishing.c" +#line 13178 "PiwigoPublishing.c" } diff --git a/plugins/shotwell-publishing/PiwigoPublishing.vala b/plugins/shotwell-publishing/PiwigoPublishing.vala index 15d118b..fcd0aee 100644 --- a/plugins/shotwell-publishing/PiwigoPublishing.vala +++ b/plugins/shotwell-publishing/PiwigoPublishing.vala @@ -1643,8 +1643,8 @@ internal class SessionLoginTransaction : Transaction { base.with_endpoint_url(session, url); add_argument("method", "pwg.session.login"); - add_argument("username", username); - add_argument("password", password); + add_argument("username", Uri.escape_string(username)); + add_argument("password", Uri.escape_string(password)); } public SessionLoginTransaction.from_other (Session session, Transaction other) { diff --git a/plugins/shotwell-publishing/TumblrPublishing.c b/plugins/shotwell-publishing/TumblrPublishing.c new file mode 100644 index 0000000..0a3643f --- /dev/null +++ b/plugins/shotwell-publishing/TumblrPublishing.c @@ -0,0 +1,5336 @@ +/* TumblrPublishing.c generated by valac 0.36.6, the Vala compiler + * generated from TumblrPublishing.vala, do not modify */ + +/* Copyright 2012 BJA Electronics + * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include "shotwell-plugin-common.h" +#include <glib/gi18n-lib.h> +#include "shotwell-authenticator.h" +#include <json-glib/json-glib.h> +#include <gee.h> +#include <float.h> +#include <math.h> +#include <gtk/gtk.h> +#include <libsoup/soup.h> +#include <glib/gstdio.h> +#include <gobject/gvaluecollector.h> + + +#define TYPE_TUMBLR_SERVICE (tumblr_service_get_type ()) +#define TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TUMBLR_SERVICE, TumblrService)) +#define TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) +#define IS_TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TUMBLR_SERVICE)) +#define IS_TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TUMBLR_SERVICE)) +#define TUMBLR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) + +typedef struct _TumblrService TumblrService; +typedef struct _TumblrServiceClass TumblrServiceClass; +typedef struct _TumblrServicePrivate TumblrServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER (publishing_tumblr_tumblr_publisher_get_type ()) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherClass)) +#define PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER)) +#define PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherClass)) + +typedef struct _PublishingTumblrTumblrPublisher PublishingTumblrTumblrPublisher; +typedef struct _PublishingTumblrTumblrPublisherClass PublishingTumblrTumblrPublisherClass; + +#define PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY (publishing_tumblr_blog_entry_get_type ()) +#define PUBLISHING_TUMBLR_BLOG_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntry)) +#define PUBLISHING_TUMBLR_BLOG_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntryClass)) +#define PUBLISHING_TUMBLR_IS_BLOG_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)) +#define PUBLISHING_TUMBLR_IS_BLOG_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)) +#define PUBLISHING_TUMBLR_BLOG_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntryClass)) + +typedef struct _PublishingTumblrBlogEntry PublishingTumblrBlogEntry; +typedef struct _PublishingTumblrBlogEntryClass PublishingTumblrBlogEntryClass; +typedef struct _PublishingTumblrBlogEntryPrivate PublishingTumblrBlogEntryPrivate; +typedef struct _PublishingTumblrParamSpecBlogEntry PublishingTumblrParamSpecBlogEntry; + +#define PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY (publishing_tumblr_size_entry_get_type ()) +#define PUBLISHING_TUMBLR_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntry)) +#define PUBLISHING_TUMBLR_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntryClass)) +#define PUBLISHING_TUMBLR_IS_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)) +#define PUBLISHING_TUMBLR_IS_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)) +#define PUBLISHING_TUMBLR_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntryClass)) + +typedef struct _PublishingTumblrSizeEntry PublishingTumblrSizeEntry; +typedef struct _PublishingTumblrSizeEntryClass PublishingTumblrSizeEntryClass; +typedef struct _PublishingTumblrSizeEntryPrivate PublishingTumblrSizeEntryPrivate; +typedef struct _PublishingTumblrParamSpecSizeEntry PublishingTumblrParamSpecSizeEntry; +typedef struct _PublishingTumblrTumblrPublisherPrivate PublishingTumblrTumblrPublisherPrivate; + +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE (publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type ()) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPaneClass)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPaneClass)) + +typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPane PublishingTumblrTumblrPublisherPublishingOptionsPane; +typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPaneClass PublishingTumblrTumblrPublisherPublishingOptionsPaneClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) +#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL))) +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) + +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION (publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type ()) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransaction)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_USER_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_USER_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass)) + +typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransaction PublishingTumblrTumblrPublisherUserInfoFetchTransaction; +typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass; +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) +#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL))) +#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL))) +#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL))) + +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER (publishing_tumblr_tumblr_publisher_uploader_get_type ()) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderClass)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderClass)) + +typedef struct _PublishingTumblrTumblrPublisherUploader PublishingTumblrTumblrPublisherUploader; +typedef struct _PublishingTumblrTumblrPublisherUploaderClass PublishingTumblrTumblrPublisherUploaderClass; +#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) +typedef struct _PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate; +#define _publishing_tumblr_blog_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_tumblr_blog_entry_unref (var), NULL))) +#define _publishing_tumblr_size_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_tumblr_size_entry_unref (var), NULL))) +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL, + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL, + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LAST_SIGNAL +}; +static guint publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LAST_SIGNAL] = {0}; +typedef struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate; + +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION (publishing_tumblr_tumblr_publisher_upload_transaction_get_type ()) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransaction)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransactionClass)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransactionClass)) + +typedef struct _PublishingTumblrTumblrPublisherUploadTransaction PublishingTumblrTumblrPublisherUploadTransaction; +typedef struct _PublishingTumblrTumblrPublisherUploadTransactionClass PublishingTumblrTumblrPublisherUploadTransactionClass; +typedef struct _PublishingTumblrTumblrPublisherUploadTransactionPrivate PublishingTumblrTumblrPublisherUploadTransactionPrivate; +#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) +typedef struct _PublishingTumblrTumblrPublisherUploaderPrivate PublishingTumblrTumblrPublisherUploaderPrivate; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _TumblrService { + GObject parent_instance; + TumblrServicePrivate * priv; +}; + +struct _TumblrServiceClass { + GObjectClass parent_class; +}; + +struct _PublishingTumblrBlogEntry { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingTumblrBlogEntryPrivate * priv; + gchar* blog; + gchar* url; +}; + +struct _PublishingTumblrBlogEntryClass { + GTypeClass parent_class; + void (*finalize) (PublishingTumblrBlogEntry *self); +}; + +struct _PublishingTumblrParamSpecBlogEntry { + GParamSpec parent_instance; +}; + +struct _PublishingTumblrSizeEntry { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingTumblrSizeEntryPrivate * priv; + gchar* title; + gint size; +}; + +struct _PublishingTumblrSizeEntryClass { + GTypeClass parent_class; + void (*finalize) (PublishingTumblrSizeEntry *self); +}; + +struct _PublishingTumblrParamSpecSizeEntry { + GParamSpec parent_instance; +}; + +struct _PublishingTumblrTumblrPublisher { + GObject parent_instance; + PublishingTumblrTumblrPublisherPrivate * priv; +}; + +struct _PublishingTumblrTumblrPublisherClass { + GObjectClass parent_class; +}; + +struct _PublishingTumblrTumblrPublisherPrivate { + SpitPublishingService* service; + SpitPublishingPluginHost* host; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; + gboolean running; + gboolean was_started; + PublishingRESTSupportOAuth1Session* session; + PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_options_pane; + PublishingTumblrSizeEntry** sizes; + gint sizes_length1; + gint _sizes_size_; + PublishingTumblrBlogEntry** blogs; + gint blogs_length1; + gint _blogs_size_; + gchar* username; + SpitPublishingAuthenticator* authenticator; +}; + +struct _PublishingTumblrTumblrPublisherPublishingOptionsPane { + GObject parent_instance; + PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate * priv; +}; + +struct _PublishingTumblrTumblrPublisherPublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate { + GtkBuilder* builder; + GtkBox* pane_widget; + GtkLabel* upload_info_label; + GtkLabel* size_label; + GtkLabel* blog_label; + GtkButton* logout_button; + GtkButton* publish_button; + GtkComboBoxText* size_combo; + GtkComboBoxText* blog_combo; + PublishingTumblrSizeEntry** sizes; + gint sizes_length1; + gint _sizes_size_; + PublishingTumblrBlogEntry** blogs; + gint blogs_length1; + gint _blogs_size_; + gchar* username; + PublishingTumblrTumblrPublisher* publisher; + SpitPublishingPublisherMediaType media_type; +}; + +struct _PublishingTumblrTumblrPublisherUserInfoFetchTransaction { + PublishingRESTSupportOAuth1Transaction parent_instance; + PublishingTumblrTumblrPublisherUserInfoFetchTransactionPrivate * priv; +}; + +struct _PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass { + PublishingRESTSupportOAuth1TransactionClass parent_class; +}; + +struct _PublishingTumblrTumblrPublisherUploadTransaction { + PublishingRESTSupportOAuth1UploadTransaction parent_instance; + PublishingTumblrTumblrPublisherUploadTransactionPrivate * priv; +}; + +struct _PublishingTumblrTumblrPublisherUploadTransactionClass { + PublishingRESTSupportOAuth1UploadTransactionClass parent_class; +}; + +struct _PublishingTumblrTumblrPublisherUploader { + PublishingRESTSupportBatchUploader parent_instance; + PublishingTumblrTumblrPublisherUploaderPrivate * priv; +}; + +struct _PublishingTumblrTumblrPublisherUploaderClass { + PublishingRESTSupportBatchUploaderClass parent_class; +}; + +struct _PublishingTumblrTumblrPublisherUploaderPrivate { + gchar* blog_url; +}; + + +static gpointer tumblr_service_parent_class = NULL; +static GdkPixbuf** tumblr_service_icon_pixbuf_set; +static gint tumblr_service_icon_pixbuf_set_length1; +static GdkPixbuf** tumblr_service_icon_pixbuf_set = NULL; +static gint tumblr_service_icon_pixbuf_set_length1 = 0; +static gint _tumblr_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface * tumblr_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface * tumblr_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_tumblr_blog_entry_parent_class = NULL; +static gpointer publishing_tumblr_size_entry_parent_class = NULL; +static gpointer publishing_tumblr_tumblr_publisher_parent_class = NULL; +static gpointer publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class = NULL; +static SpitPublishingDialogPaneIface * publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_parent_class = NULL; +static gpointer publishing_tumblr_tumblr_publisher_upload_transaction_parent_class = NULL; +static gpointer publishing_tumblr_tumblr_publisher_uploader_parent_class = NULL; +static SpitPublishingPublisherIface * publishing_tumblr_tumblr_publisher_spit_publishing_publisher_parent_iface = NULL; + +GType tumblr_service_get_type (void) G_GNUC_CONST; +enum { + TUMBLR_SERVICE_DUMMY_PROPERTY +}; +#define TUMBLR_SERVICE_ICON_FILENAME "tumblr.png" +TumblrService* tumblr_service_new (GFile* resource_directory); +TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory); +static gint tumblr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* tumblr_service_real_get_id (SpitPluggable* base); +static const gchar* tumblr_service_real_get_pluggable_name (SpitPluggable* base); +static void tumblr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup8 (GdkPixbuf** self, int length); +static void tumblr_service_real_activation (SpitPluggable* base, gboolean enabled); +static SpitPublishingPublisher* tumblr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_tumblr_tumblr_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType tumblr_service_real_get_supported_media (SpitPublishingService* base); +static void tumblr_service_finalize (GObject * obj); +#define PUBLISHING_TUMBLR_SERVICE_NAME "Tumblr" +#define PUBLISHING_TUMBLR_ENDPOINT_URL "https://www.tumblr.com/" +#define PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" +#define PUBLISHING_TUMBLR_ORIGINAL_SIZE -1 +gpointer publishing_tumblr_blog_entry_ref (gpointer instance); +void publishing_tumblr_blog_entry_unref (gpointer instance); +GParamSpec* publishing_tumblr_param_spec_blog_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_tumblr_value_set_blog_entry (GValue* value, gpointer v_object); +void publishing_tumblr_value_take_blog_entry (GValue* value, gpointer v_object); +gpointer publishing_tumblr_value_get_blog_entry (const GValue* value); +GType publishing_tumblr_blog_entry_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_TUMBLR_BLOG_ENTRY_DUMMY_PROPERTY +}; +PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_new (const gchar* creator_blog, const gchar* creator_url); +PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_construct (GType object_type, const gchar* creator_blog, const gchar* creator_url); +static void publishing_tumblr_blog_entry_finalize (PublishingTumblrBlogEntry * obj); +gpointer publishing_tumblr_size_entry_ref (gpointer instance); +void publishing_tumblr_size_entry_unref (gpointer instance); +GParamSpec* publishing_tumblr_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_tumblr_value_set_size_entry (GValue* value, gpointer v_object); +void publishing_tumblr_value_take_size_entry (GValue* value, gpointer v_object); +gpointer publishing_tumblr_value_get_size_entry (const GValue* value); +GType publishing_tumblr_size_entry_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_TUMBLR_SIZE_ENTRY_DUMMY_PROPERTY +}; +PublishingTumblrSizeEntry* publishing_tumblr_size_entry_new (const gchar* creator_title, gint creator_size); +PublishingTumblrSizeEntry* publishing_tumblr_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size); +static void publishing_tumblr_size_entry_finalize (PublishingTumblrSizeEntry * obj); +GType publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type (void) G_GNUC_CONST; +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisherPrivate)) +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_DUMMY_PROPERTY +}; +static void publishing_tumblr_tumblr_publisher_on_authenticator_authenticated (PublishingTumblrTumblrPublisher* self); +static void _publishing_tumblr_tumblr_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender, gpointer self); +static PublishingTumblrSizeEntry** publishing_tumblr_tumblr_publisher_create_sizes (PublishingTumblrTumblrPublisher* self, int* result_length1); +static void _vala_array_add31 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); +static void _vala_array_add32 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); +static void _vala_array_add33 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value); +static PublishingTumblrBlogEntry** publishing_tumblr_tumblr_publisher_create_blogs (PublishingTumblrTumblrPublisher* self, int* result_length1); +static SpitPublishingService* publishing_tumblr_tumblr_publisher_real_get_service (SpitPublishingPublisher* base); +SpitPublishingPluginHost* publishing_tumblr_tumblr_publisher_get_host (PublishingTumblrTumblrPublisher* self); +static gboolean publishing_tumblr_tumblr_publisher_real_is_running (SpitPublishingPublisher* base); +gint publishing_tumblr_tumblr_publisher_get_persistent_default_size (PublishingTumblrTumblrPublisher* self); +void publishing_tumblr_tumblr_publisher_set_persistent_default_size (PublishingTumblrTumblrPublisher* self, gint size); +gint publishing_tumblr_tumblr_publisher_get_persistent_default_blog (PublishingTumblrTumblrPublisher* self); +void publishing_tumblr_tumblr_publisher_set_persistent_default_blog (PublishingTumblrTumblrPublisher* self, gint blog); +static void publishing_tumblr_tumblr_publisher_do_get_blogs (PublishingTumblrTumblrPublisher* self); +GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type (void) G_GNUC_CONST; +PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session); +PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session); +static void publishing_tumblr_tumblr_publisher_on_info_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_on_info_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); +static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (PublishingTumblrTumblrPublisher* self, const gchar* response); +static void publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (PublishingTumblrTumblrPublisher* self); +static void _vala_array_add34 (PublishingTumblrBlogEntry** * array, int* length, int* size, PublishingTumblrBlogEntry* value); +PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_new (PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username); +PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username); +static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish (PublishingTumblrTumblrPublisher* self); +static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout (PublishingTumblrTumblrPublisher* self); +static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_do_publish (PublishingTumblrTumblrPublisher* self); +static void publishing_tumblr_tumblr_publisher_do_logout (PublishingTumblrTumblrPublisher* self); +gint publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b); +static gint _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); +GType publishing_tumblr_tumblr_publisher_uploader_get_type (void) G_GNUC_CONST; +PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url); +PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url); +static void publishing_tumblr_tumblr_publisher_on_upload_complete (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); +static void _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_tumblr_tumblr_publisher_on_upload_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); +static void _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); +static void publishing_tumblr_tumblr_publisher_on_upload_status_updated (PublishingTumblrTumblrPublisher* self, gint file_number, gdouble completed_fraction); +static void _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +static void publishing_tumblr_tumblr_publisher_do_show_success_pane (PublishingTumblrTumblrPublisher* self); +void publishing_tumblr_tumblr_publisher_attempt_start (PublishingTumblrTumblrPublisher* self); +static void publishing_tumblr_tumblr_publisher_real_start (SpitPublishingPublisher* base); +static void publishing_tumblr_tumblr_publisher_real_stop (SpitPublishingPublisher* base); +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate)) +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +static PublishingTumblrSizeEntry** _vala_array_dup9 (PublishingTumblrSizeEntry** self, int length); +static PublishingTumblrBlogEntry** _vala_array_dup10 (PublishingTumblrBlogEntry** self, int length); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* self); +static GtkWidget* publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize (GObject * obj); +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_USER_INFO_FETCH_TRANSACTION_DUMMY_PROPERTY +}; +GType publishing_tumblr_tumblr_publisher_upload_transaction_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOAD_TRANSACTION_DUMMY_PROPERTY +}; +static gchar* publishing_tumblr_tumblr_publisher_upload_transaction_encode (PublishingTumblrTumblrPublisherUploadTransaction* self, guint8* data, int data_length1); +PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* blog_url); +PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* blog_url); +static void publishing_tumblr_tumblr_publisher_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); +#define PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploaderPrivate)) +enum { + PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_DUMMY_PROPERTY +}; +static PublishingRESTSupportTransaction* publishing_tumblr_tumblr_publisher_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); +static void publishing_tumblr_tumblr_publisher_uploader_finalize (PublishingRESTSupportBatchUploader * obj); +static void publishing_tumblr_tumblr_publisher_finalize (GObject * obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory) { + TumblrService * self = NULL; + GdkPixbuf** _tmp0_; + gint _tmp0__length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (TumblrService*) g_object_new (object_type, NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = tumblr_service_icon_pixbuf_set; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0__length1 = tumblr_service_icon_pixbuf_set_length1; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_ == NULL) { +#line 462 "TumblrPublishing.c" + gint _tmp1_; + GdkPixbuf** _tmp2_; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" TUMBLR_SERVICE_ICON_FILENAME, &_tmp1_); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_icon_pixbuf_set = (_vala_array_free (tumblr_service_icon_pixbuf_set, tumblr_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_icon_pixbuf_set = _tmp2_; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_icon_pixbuf_set_length1 = _tmp1_; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tumblr_service_icon_pixbuf_set_size_ = tumblr_service_icon_pixbuf_set_length1; +#line 475 "TumblrPublishing.c" + } +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 479 "TumblrPublishing.c" +} + + +TumblrService* tumblr_service_new (GFile* resource_directory) { +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return tumblr_service_construct (TYPE_TUMBLR_SERVICE, resource_directory); +#line 486 "TumblrPublishing.c" +} + + +static gint tumblr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + TumblrService * self; + gint result = 0; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = min_host_interface; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = max_host_interface; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp2_; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 508 "TumblrPublishing.c" +} + + +static const gchar* tumblr_service_real_get_id (SpitPluggable* base) { + TumblrService * self; + const gchar* result = NULL; +#line 25 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = "org.yorba.shotwell.publishing.tumblr"; +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 521 "TumblrPublishing.c" +} + + +static const gchar* tumblr_service_real_get_pluggable_name (SpitPluggable* base) { + TumblrService * self; + const gchar* result = NULL; +#line 29 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = "Tumblr"; +#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 534 "TumblrPublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 541 "TumblrPublishing.c" +} + + +static GdkPixbuf** _vala_array_dup8 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (i = 0; i < length; i++) { +#line 552 "TumblrPublishing.c" + GdkPixbuf* _tmp0_; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result[i] = _tmp0_; +#line 558 "TumblrPublishing.c" + } +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 562 "TumblrPublishing.c" +} + + +static void tumblr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + TumblrService * self; + gchar* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; + gchar* _tmp6_; + GdkPixbuf** _tmp7_; + gint _tmp7__length1; + GdkPixbuf** _tmp8_; + gint _tmp8__length1; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (info != NULL); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_strdup ("Jeroen Arnoldus"); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).authors); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).authors = _tmp0_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = g_strdup (_ ("Copyright 2012 BJA Electronics")); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).copyright); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).copyright = _tmp1_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = g_strdup (RESOURCES_TRANSLATORS); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).translators); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).translators = _tmp2_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = g_strdup (_VERSION); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).version); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).version = _tmp3_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).website_name); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).website_name = _tmp4_; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).website_url); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).website_url = _tmp5_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = g_strdup (RESOURCES_LICENSE); +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 ((*info).license); +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).license = _tmp6_; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = tumblr_service_icon_pixbuf_set; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7__length1 = tumblr_service_icon_pixbuf_set_length1; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup8 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8__length1 = _tmp7__length1; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).icons = _tmp8_; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*info).icons_length1 = _tmp8__length1; +#line 641 "TumblrPublishing.c" +} + + +static void tumblr_service_real_activation (SpitPluggable* base, gboolean enabled) { + TumblrService * self; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 649 "TumblrPublishing.c" +} + + +static SpitPublishingPublisher* tumblr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + TumblrService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_; + PublishingTumblrTumblrPublisher* _tmp1_; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = host; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = publishing_tumblr_tumblr_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 670 "TumblrPublishing.c" +} + + +static SpitPublishingPublisherMediaType tumblr_service_real_get_supported_media (SpitPublishingService* base) { + TumblrService * self; + SpitPublishingPublisherMediaType result = 0; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TUMBLR_SERVICE, TumblrService); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 683 "TumblrPublishing.c" +} + + +static void tumblr_service_class_init (TumblrServiceClass * klass) { +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_parent_class = g_type_class_peek_parent (klass); +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = tumblr_service_finalize; +#line 692 "TumblrPublishing.c" +} + + +static void tumblr_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_pluggable_interface = (gint (*) (SpitPluggable *, gint, gint)) tumblr_service_real_get_pluggable_interface; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_id = (const gchar* (*) (SpitPluggable *)) tumblr_service_real_get_id; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_pluggable_name = (const gchar* (*) (SpitPluggable *)) tumblr_service_real_get_pluggable_name; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_info = (void (*) (SpitPluggable *, SpitPluggableInfo*)) tumblr_service_real_get_info; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->activation = (void (*) (SpitPluggable *, gboolean)) tumblr_service_real_activation; +#line 709 "TumblrPublishing.c" +} + + +static void tumblr_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tumblr_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*) (SpitPublishingService *, SpitPublishingPluginHost*)) tumblr_service_real_create_publisher; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*) (SpitPublishingService *)) tumblr_service_real_get_supported_media; +#line 720 "TumblrPublishing.c" +} + + +static void tumblr_service_instance_init (TumblrService * self) { +} + + +static void tumblr_service_finalize (GObject * obj) { + TumblrService * self; +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TUMBLR_SERVICE, TumblrService); +#line 8 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (tumblr_service_parent_class)->finalize (obj); +#line 734 "TumblrPublishing.c" +} + + +GType tumblr_service_get_type (void) { + static volatile gsize tumblr_service_type_id__volatile = 0; + if (g_once_init_enter (&tumblr_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (TumblrServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tumblr_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TumblrService), 0, (GInstanceInitFunc) tumblr_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) tumblr_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) tumblr_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType tumblr_service_type_id; + tumblr_service_type_id = g_type_register_static (G_TYPE_OBJECT, "TumblrService", &g_define_type_info, 0); + g_type_add_interface_static (tumblr_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (tumblr_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&tumblr_service_type_id__volatile, tumblr_service_type_id); + } + return tumblr_service_type_id__volatile; +} + + +PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_construct (GType object_type, const gchar* creator_blog, const gchar* creator_url) { + PublishingTumblrBlogEntry* self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (creator_blog != NULL, NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (creator_url != NULL, NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrBlogEntry*) g_type_create_instance (object_type); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = creator_blog; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->blog); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->blog = _tmp1_; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = creator_url; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->url); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->url = _tmp3_; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 784 "TumblrPublishing.c" +} + + +PublishingTumblrBlogEntry* publishing_tumblr_blog_entry_new (const gchar* creator_blog, const gchar* creator_url) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_blog_entry_construct (PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, creator_blog, creator_url); +#line 791 "TumblrPublishing.c" +} + + +static void publishing_tumblr_value_blog_entry_init (GValue* value) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 798 "TumblrPublishing.c" +} + + +static void publishing_tumblr_value_blog_entry_free_value (GValue* value) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (value->data[0].v_pointer) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_blog_entry_unref (value->data[0].v_pointer); +#line 807 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_value_blog_entry_copy_value (const GValue* src_value, GValue* dest_value) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + dest_value->data[0].v_pointer = publishing_tumblr_blog_entry_ref (src_value->data[0].v_pointer); +#line 817 "TumblrPublishing.c" + } else { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 821 "TumblrPublishing.c" + } +} + + +static gpointer publishing_tumblr_value_blog_entry_peek_pointer (const GValue* value) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return value->data[0].v_pointer; +#line 829 "TumblrPublishing.c" +} + + +static gchar* publishing_tumblr_value_blog_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 836 "TumblrPublishing.c" + PublishingTumblrBlogEntry * object; + object = collect_values[0].v_pointer; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 843 "TumblrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 847 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = publishing_tumblr_blog_entry_ref (object); +#line 851 "TumblrPublishing.c" + } else { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 855 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return NULL; +#line 859 "TumblrPublishing.c" +} + + +static gchar* publishing_tumblr_value_blog_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingTumblrBlogEntry ** object_p; + object_p = collect_values[0].v_pointer; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!object_p) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 870 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = NULL; +#line 876 "TumblrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 880 "TumblrPublishing.c" + } else { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = publishing_tumblr_blog_entry_ref (value->data[0].v_pointer); +#line 884 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return NULL; +#line 888 "TumblrPublishing.c" +} + + +GParamSpec* publishing_tumblr_param_spec_blog_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingTumblrParamSpecBlogEntry* spec; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY), NULL); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 902 "TumblrPublishing.c" +} + + +gpointer publishing_tumblr_value_get_blog_entry (const GValue* value) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY), NULL); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return value->data[0].v_pointer; +#line 911 "TumblrPublishing.c" +} + + +void publishing_tumblr_value_set_blog_entry (GValue* value, gpointer v_object) { + PublishingTumblrBlogEntry * old; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + old = value->data[0].v_pointer; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (v_object) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_blog_entry_ref (value->data[0].v_pointer); +#line 931 "TumblrPublishing.c" + } else { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 935 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (old) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_blog_entry_unref (old); +#line 941 "TumblrPublishing.c" + } +} + + +void publishing_tumblr_value_take_blog_entry (GValue* value, gpointer v_object) { + PublishingTumblrBlogEntry * old; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + old = value->data[0].v_pointer; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (v_object) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY)); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 960 "TumblrPublishing.c" + } else { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 964 "TumblrPublishing.c" + } +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (old) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_blog_entry_unref (old); +#line 970 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_blog_entry_class_init (PublishingTumblrBlogEntryClass * klass) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_blog_entry_parent_class = g_type_class_peek_parent (klass); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + ((PublishingTumblrBlogEntryClass *) klass)->finalize = publishing_tumblr_blog_entry_finalize; +#line 980 "TumblrPublishing.c" +} + + +static void publishing_tumblr_blog_entry_instance_init (PublishingTumblrBlogEntry * self) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->ref_count = 1; +#line 987 "TumblrPublishing.c" +} + + +static void publishing_tumblr_blog_entry_finalize (PublishingTumblrBlogEntry * obj) { + PublishingTumblrBlogEntry * self; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_BLOG_ENTRY, PublishingTumblrBlogEntry); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_destroy (self); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->blog); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->url); +#line 1001 "TumblrPublishing.c" +} + + +GType publishing_tumblr_blog_entry_get_type (void) { + static volatile gsize publishing_tumblr_blog_entry_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_blog_entry_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_tumblr_value_blog_entry_init, publishing_tumblr_value_blog_entry_free_value, publishing_tumblr_value_blog_entry_copy_value, publishing_tumblr_value_blog_entry_peek_pointer, "p", publishing_tumblr_value_blog_entry_collect_value, "p", publishing_tumblr_value_blog_entry_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrBlogEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_blog_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrBlogEntry), 0, (GInstanceInitFunc) publishing_tumblr_blog_entry_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType publishing_tumblr_blog_entry_type_id; + publishing_tumblr_blog_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingTumblrBlogEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_tumblr_blog_entry_type_id__volatile, publishing_tumblr_blog_entry_type_id); + } + return publishing_tumblr_blog_entry_type_id__volatile; +} + + +gpointer publishing_tumblr_blog_entry_ref (gpointer instance) { + PublishingTumblrBlogEntry * self; + self = instance; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return instance; +#line 1026 "TumblrPublishing.c" +} + + +void publishing_tumblr_blog_entry_unref (gpointer instance) { + PublishingTumblrBlogEntry * self; + self = instance; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + PUBLISHING_TUMBLR_BLOG_ENTRY_GET_CLASS (self)->finalize (self); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1039 "TumblrPublishing.c" + } +} + + +PublishingTumblrSizeEntry* publishing_tumblr_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size) { + PublishingTumblrSizeEntry* self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + gint _tmp2_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (creator_title != NULL, NULL); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrSizeEntry*) g_type_create_instance (object_type); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = creator_title; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->title); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->title = _tmp1_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = creator_size; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->size = _tmp2_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 1067 "TumblrPublishing.c" +} + + +PublishingTumblrSizeEntry* publishing_tumblr_size_entry_new (const gchar* creator_title, gint creator_size) { +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_size_entry_construct (PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, creator_title, creator_size); +#line 1074 "TumblrPublishing.c" +} + + +static void publishing_tumblr_value_size_entry_init (GValue* value) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1081 "TumblrPublishing.c" +} + + +static void publishing_tumblr_value_size_entry_free_value (GValue* value) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (value->data[0].v_pointer) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_size_entry_unref (value->data[0].v_pointer); +#line 1090 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_value_size_entry_copy_value (const GValue* src_value, GValue* dest_value) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + dest_value->data[0].v_pointer = publishing_tumblr_size_entry_ref (src_value->data[0].v_pointer); +#line 1100 "TumblrPublishing.c" + } else { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1104 "TumblrPublishing.c" + } +} + + +static gpointer publishing_tumblr_value_size_entry_peek_pointer (const GValue* value) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return value->data[0].v_pointer; +#line 1112 "TumblrPublishing.c" +} + + +static gchar* publishing_tumblr_value_size_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1119 "TumblrPublishing.c" + PublishingTumblrSizeEntry * object; + object = collect_values[0].v_pointer; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1126 "TumblrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1130 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = publishing_tumblr_size_entry_ref (object); +#line 1134 "TumblrPublishing.c" + } else { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1138 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return NULL; +#line 1142 "TumblrPublishing.c" +} + + +static gchar* publishing_tumblr_value_size_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingTumblrSizeEntry ** object_p; + object_p = collect_values[0].v_pointer; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!object_p) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1153 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = NULL; +#line 1159 "TumblrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1163 "TumblrPublishing.c" + } else { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *object_p = publishing_tumblr_size_entry_ref (value->data[0].v_pointer); +#line 1167 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return NULL; +#line 1171 "TumblrPublishing.c" +} + + +GParamSpec* publishing_tumblr_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingTumblrParamSpecSizeEntry* spec; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY), NULL); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1185 "TumblrPublishing.c" +} + + +gpointer publishing_tumblr_value_get_size_entry (const GValue* value) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY), NULL); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return value->data[0].v_pointer; +#line 1194 "TumblrPublishing.c" +} + + +void publishing_tumblr_value_set_size_entry (GValue* value, gpointer v_object) { + PublishingTumblrSizeEntry * old; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + old = value->data[0].v_pointer; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (v_object) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_size_entry_ref (value->data[0].v_pointer); +#line 1214 "TumblrPublishing.c" + } else { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1218 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (old) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_size_entry_unref (old); +#line 1224 "TumblrPublishing.c" + } +} + + +void publishing_tumblr_value_take_size_entry (GValue* value, gpointer v_object) { + PublishingTumblrSizeEntry * old; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + old = value->data[0].v_pointer; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (v_object) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY)); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1243 "TumblrPublishing.c" + } else { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1247 "TumblrPublishing.c" + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (old) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_size_entry_unref (old); +#line 1253 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_size_entry_class_init (PublishingTumblrSizeEntryClass * klass) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_size_entry_parent_class = g_type_class_peek_parent (klass); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + ((PublishingTumblrSizeEntryClass *) klass)->finalize = publishing_tumblr_size_entry_finalize; +#line 1263 "TumblrPublishing.c" +} + + +static void publishing_tumblr_size_entry_instance_init (PublishingTumblrSizeEntry * self) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->ref_count = 1; +#line 1270 "TumblrPublishing.c" +} + + +static void publishing_tumblr_size_entry_finalize (PublishingTumblrSizeEntry * obj) { + PublishingTumblrSizeEntry * self; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_SIZE_ENTRY, PublishingTumblrSizeEntry); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_destroy (self); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->title); +#line 1282 "TumblrPublishing.c" +} + + +GType publishing_tumblr_size_entry_get_type (void) { + static volatile gsize publishing_tumblr_size_entry_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_size_entry_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_tumblr_value_size_entry_init, publishing_tumblr_value_size_entry_free_value, publishing_tumblr_value_size_entry_copy_value, publishing_tumblr_value_size_entry_peek_pointer, "p", publishing_tumblr_value_size_entry_collect_value, "p", publishing_tumblr_value_size_entry_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrSizeEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_size_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrSizeEntry), 0, (GInstanceInitFunc) publishing_tumblr_size_entry_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType publishing_tumblr_size_entry_type_id; + publishing_tumblr_size_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingTumblrSizeEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_tumblr_size_entry_type_id__volatile, publishing_tumblr_size_entry_type_id); + } + return publishing_tumblr_size_entry_type_id__volatile; +} + + +gpointer publishing_tumblr_size_entry_ref (gpointer instance) { + PublishingTumblrSizeEntry * self; + self = instance; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return instance; +#line 1307 "TumblrPublishing.c" +} + + +void publishing_tumblr_size_entry_unref (gpointer instance) { + PublishingTumblrSizeEntry * self; + self = instance; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + PUBLISHING_TUMBLR_SIZE_ENTRY_GET_CLASS (self)->finalize (self); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1320 "TumblrPublishing.c" + } +} + + +static void _publishing_tumblr_tumblr_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated (SpitPublishingAuthenticator* _sender, gpointer self) { +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_authenticator_authenticated ((PublishingTumblrTumblrPublisher*) self); +#line 1328 "TumblrPublishing.c" +} + + +static void _vala_array_add31 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if ((*length) == (*size)) { +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); +#line 1339 "TumblrPublishing.c" + } +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[(*length)++] = value; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[*length] = NULL; +#line 1345 "TumblrPublishing.c" +} + + +static void _vala_array_add32 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if ((*length) == (*size)) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); +#line 1356 "TumblrPublishing.c" + } +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[(*length)++] = value; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[*length] = NULL; +#line 1362 "TumblrPublishing.c" +} + + +static void _vala_array_add33 (PublishingTumblrSizeEntry** * array, int* length, int* size, PublishingTumblrSizeEntry* value) { +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if ((*length) == (*size)) { +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *array = g_renew (PublishingTumblrSizeEntry*, *array, (*size) + 1); +#line 1373 "TumblrPublishing.c" + } +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[(*length)++] = value; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[*length] = NULL; +#line 1379 "TumblrPublishing.c" +} + + +static PublishingTumblrSizeEntry** publishing_tumblr_tumblr_publisher_create_sizes (PublishingTumblrTumblrPublisher* self, int* result_length1) { + PublishingTumblrSizeEntry** result = NULL; + PublishingTumblrSizeEntry** _result_ = NULL; + PublishingTumblrSizeEntry** _tmp0_; + gint _result__length1; + gint __result__size_; + PublishingTumblrSizeEntry** _tmp1_; + gint _tmp1__length1; + PublishingTumblrSizeEntry* _tmp2_; + PublishingTumblrSizeEntry** _tmp3_; + gint _tmp3__length1; + PublishingTumblrSizeEntry* _tmp4_; + PublishingTumblrSizeEntry** _tmp5_; + gint _tmp5__length1; + PublishingTumblrSizeEntry* _tmp6_; + PublishingTumblrSizeEntry** _tmp7_; + gint _tmp7__length1; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_new0 (PublishingTumblrSizeEntry*, 0 + 1); +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _result_ = _tmp0_; +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _result__length1 = 0; +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + __result__size_ = _result__length1; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _result_; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1__length1 = _result__length1; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = publishing_tumblr_size_entry_new (_ ("500 × 375 pixels"), 500); +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_array_add31 (&_result_, &_result__length1, &__result__size_, _tmp2_); +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = _result_; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3__length1 = _result__length1; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = publishing_tumblr_size_entry_new (_ ("1024 × 768 pixels"), 1024); +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_array_add32 (&_result_, &_result__length1, &__result__size_, _tmp4_); +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _result_; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5__length1 = _result__length1; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = publishing_tumblr_size_entry_new (_ ("1280 × 853 pixels"), 1280); +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_array_add33 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = _result_; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7__length1 = _result__length1; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (result_length1) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *result_length1 = _tmp7__length1; +#line 1442 "TumblrPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp7_; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1448 "TumblrPublishing.c" +} + + +static PublishingTumblrBlogEntry** publishing_tumblr_tumblr_publisher_create_blogs (PublishingTumblrTumblrPublisher* self, int* result_length1) { + PublishingTumblrBlogEntry** result = NULL; + PublishingTumblrBlogEntry** _result_ = NULL; + PublishingTumblrBlogEntry** _tmp0_; + gint _result__length1; + gint __result__size_; + PublishingTumblrBlogEntry** _tmp1_; + gint _tmp1__length1; +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_new0 (PublishingTumblrBlogEntry*, 0 + 1); +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _result_ = _tmp0_; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _result__length1 = 0; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + __result__size_ = _result__length1; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _result_; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1__length1 = _result__length1; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (result_length1) { +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *result_length1 = _tmp1__length1; +#line 1478 "TumblrPublishing.c" + } +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1484 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingTumblrTumblrPublisher * self = NULL; + SpitPublishingService* _tmp0_; + SpitPublishingService* _tmp1_; + SpitPublishingPluginHost* _tmp2_; + SpitPublishingPluginHost* _tmp3_; + PublishingRESTSupportOAuth1Session* _tmp4_; + gint _tmp5_; + PublishingTumblrSizeEntry** _tmp6_; + gint _tmp7_; + PublishingTumblrBlogEntry** _tmp8_; + PublishingAuthenticatorFactory* _tmp9_; + PublishingAuthenticatorFactory* _tmp10_; + SpitPublishingPluginHost* _tmp11_; + SpitPublishingAuthenticator* _tmp12_; + SpitPublishingAuthenticator* _tmp13_; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrTumblrPublisher*) g_object_new (object_type, NULL); +#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:123: TumblrPublisher instantiated."); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = service; +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->service = _tmp1_; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = host; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->host = _tmp3_; +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = publishing_rest_support_oauth1_session_new (PUBLISHING_TUMBLR_ENDPOINT_URL); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->session = _tmp4_; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = publishing_tumblr_tumblr_publisher_create_sizes (self, &_tmp5_); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = _tmp6_; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes_length1 = _tmp5_; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = publishing_tumblr_tumblr_publisher_create_blogs (self, &_tmp7_); +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = _tmp8_; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs_length1 = _tmp7_; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_blogs_size_ = self->priv->blogs_length1; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = publishing_authenticator_factory_get_instance (); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = _tmp9_; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = host; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = spit_publishing_authenticator_factory_create (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR_FACTORY, SpitPublishingAuthenticatorFactory), "tumblr", _tmp11_); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->authenticator); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->authenticator = _tmp12_; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (_tmp10_); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = self->priv->authenticator; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (_tmp13_, "authenticated", (GCallback) _publishing_tumblr_tumblr_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated, self, 0); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 1574 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisher* publishing_tumblr_tumblr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_tumblr_publisher_construct (PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, service, host); +#line 1581 "TumblrPublishing.c" +} + + +static SpitPublishingService* publishing_tumblr_tumblr_publisher_real_get_service (SpitPublishingPublisher* base) { + PublishingTumblrTumblrPublisher * self; + SpitPublishingService* result = NULL; + SpitPublishingService* _tmp0_; + SpitPublishingService* _tmp1_; +#line 140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->service; +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1600 "TumblrPublishing.c" +} + + +SpitPublishingPluginHost* publishing_tumblr_tumblr_publisher_get_host (PublishingTumblrTumblrPublisher* self) { + SpitPublishingPluginHost* result = NULL; + SpitPublishingPluginHost* _tmp0_; + SpitPublishingPluginHost* _tmp1_; +#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), NULL); +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1618 "TumblrPublishing.c" +} + + +static gboolean publishing_tumblr_tumblr_publisher_real_is_running (SpitPublishingPublisher* base) { + PublishingTumblrTumblrPublisher * self; + gboolean result = FALSE; + gboolean _tmp0_; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->running; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp0_; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1634 "TumblrPublishing.c" +} + + +gint publishing_tumblr_tumblr_publisher_get_persistent_default_size (PublishingTumblrTumblrPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_; + gint _tmp1_; +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), 0); +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", 1); +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1652 "TumblrPublishing.c" +} + + +void publishing_tumblr_tumblr_publisher_set_persistent_default_size (PublishingTumblrTumblrPublisher* self, gint size) { + SpitPublishingPluginHost* _tmp0_; + gint _tmp1_; +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = size; +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", _tmp1_); +#line 1667 "TumblrPublishing.c" +} + + +gint publishing_tumblr_tumblr_publisher_get_persistent_default_blog (PublishingTumblrTumblrPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_; + gint _tmp1_; +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self), 0); +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_blog", 0); +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 1685 "TumblrPublishing.c" +} + + +void publishing_tumblr_tumblr_publisher_set_persistent_default_blog (PublishingTumblrTumblrPublisher* self, gint blog) { + SpitPublishingPluginHost* _tmp0_; + gint _tmp1_; +#line 164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = blog; +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_blog", _tmp1_); +#line 1700 "TumblrPublishing.c" +} + + +static gpointer _g_variant_ref0 (gpointer self) { +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self ? g_variant_ref (self) : NULL; +#line 1707 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_authenticator_authenticated (PublishingTumblrTumblrPublisher* self) { + gboolean _tmp0_; + GHashTable* params = NULL; + SpitPublishingAuthenticator* _tmp1_; + GHashTable* _tmp2_; + GVariant* consumer_key = NULL; + GVariant* consumer_secret = NULL; + GVariant* auth_token = NULL; + GVariant* auth_token_secret = NULL; + GHashTable* _tmp3_; + gconstpointer _tmp4_ = NULL; + GVariant* _tmp5_; + GHashTable* _tmp6_; + gconstpointer _tmp7_ = NULL; + GVariant* _tmp8_; + PublishingRESTSupportOAuth1Session* _tmp9_; + GVariant* _tmp10_; + const gchar* _tmp11_; + GVariant* _tmp12_; + const gchar* _tmp13_; + GHashTable* _tmp14_; + gconstpointer _tmp15_ = NULL; + GVariant* _tmp16_; + GHashTable* _tmp17_; + gconstpointer _tmp18_ = NULL; + GVariant* _tmp19_; + PublishingRESTSupportOAuth1Session* _tmp20_; + GVariant* _tmp21_; + const gchar* _tmp22_; + GVariant* _tmp23_; + const gchar* _tmp24_; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp0_) { +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 1750 "TumblrPublishing.c" + } +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:174: EVENT: a fully authenticated session has be" \ +"come available"); +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->authenticator; +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = spit_publishing_authenticator_get_authentication_parameter (_tmp1_); +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + params = _tmp2_; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + consumer_key = NULL; +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + consumer_secret = NULL; +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + auth_token = NULL; +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + auth_token_secret = NULL; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = params; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_hash_table_lookup_extended (_tmp3_, "ConsumerKey", NULL, &_tmp4_); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (consumer_key); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _g_variant_ref0 (_tmp4_); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + consumer_key = _tmp5_; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = params; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_hash_table_lookup_extended (_tmp6_, "ConsumerSecret", NULL, &_tmp7_); +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (consumer_secret); +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = _g_variant_ref0 (_tmp7_); +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + consumer_secret = _tmp8_; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = self->priv->session; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = consumer_key; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = g_variant_get_string (_tmp10_, NULL); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = consumer_secret; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = g_variant_get_string (_tmp12_, NULL); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_oauth1_session_set_api_credentials (_tmp9_, _tmp11_, _tmp13_); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14_ = params; +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_hash_table_lookup_extended (_tmp14_, "AuthToken", NULL, &_tmp15_); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (auth_token); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = _g_variant_ref0 (_tmp15_); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + auth_token = _tmp16_; +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17_ = params; +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_hash_table_lookup_extended (_tmp17_, "AuthTokenSecret", NULL, &_tmp18_); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (auth_token_secret); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19_ = _g_variant_ref0 (_tmp18_); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + auth_token_secret = _tmp19_; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp20_ = self->priv->session; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp21_ = auth_token; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp22_ = g_variant_get_string (_tmp21_, NULL); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp23_ = auth_token_secret; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp24_ = g_variant_get_string (_tmp23_, NULL); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp20_, _tmp22_, _tmp24_, ""); +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_get_blogs (self); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (auth_token_secret); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (auth_token); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (consumer_secret); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_variant_unref0 (consumer_key); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_hash_table_unref0 (params); +#line 1844 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_info_request_txn_completed ((PublishingTumblrTumblrPublisher*) self, _sender); +#line 1851 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_info_request_txn_error ((PublishingTumblrTumblrPublisher*) self, _sender, err); +#line 1858 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_get_blogs (PublishingTumblrTumblrPublisher* self) { + PublishingTumblrTumblrPublisherUserInfoFetchTransaction* txn = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; + PublishingTumblrTumblrPublisherUserInfoFetchTransaction* _tmp1_; + GError * _inner_error_ = NULL; +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:196: ACTION: obtain all blogs of the tumblr user"); +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->session; +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (_tmp0_); +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + txn = _tmp1_; +#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); +#line 1881 "TumblrPublishing.c" + { +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 1889 "TumblrPublishing.c" + goto __catch20_spit_publishing_publishing_error; + } +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 1900 "TumblrPublishing.c" + } + } + goto __finally20; + __catch20_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp2_; + GError* _tmp3_; +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + err = _inner_error_; +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _inner_error_ = NULL; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = self->priv->host; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = err; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp2_, _tmp3_); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_error_free0 (err); +#line 1921 "TumblrPublishing.c" + } + __finally20: +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 1934 "TumblrPublishing.c" + } +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 1938 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_info_request_txn_completed (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_; + guint _tmp1_; + PublishingRESTSupportTransaction* _tmp2_; + guint _tmp3_; + gboolean _tmp4_; + PublishingRESTSupportTransaction* _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + PublishingRESTSupportTransaction* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = txn; +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = txn; +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp4_) { +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 1976 "TumblrPublishing.c" + } +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = txn; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = _tmp6_; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:218: EVENT: user info request transaction comple" \ +"ted; response = '%s'", _tmp7_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp7_); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = txn; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = publishing_rest_support_transaction_get_response (_tmp8_); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = _tmp9_; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (self, _tmp10_); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp10_); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (self); +#line 2000 "TumblrPublishing.c" +} + + +static gpointer _json_object_ref0 (gpointer self) { +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self ? json_object_ref (self) : NULL; +#line 2007 "TumblrPublishing.c" +} + + +static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GError * _inner_error_ = NULL; +#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (old != NULL, NULL); +#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (replacement != NULL, NULL); +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if ((*((gchar*) self)) == '\0') { +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = TRUE; +#line 2026 "TumblrPublishing.c" + } else { + const gchar* _tmp2_; +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = old; +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = (*((gchar*) _tmp2_)) == '\0'; +#line 2033 "TumblrPublishing.c" + } +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp1_) { +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = TRUE; +#line 2039 "TumblrPublishing.c" + } else { + const gchar* _tmp3_; + const gchar* _tmp4_; +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = old; +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4_ = replacement; +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0; +#line 2049 "TumblrPublishing.c" + } +#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp0_) { +#line 2053 "TumblrPublishing.c" + gchar* _tmp5_; +#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp5_ = g_strdup (self); +#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp5_; +#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 2061 "TumblrPublishing.c" + } + { + GRegex* regex = NULL; + const gchar* _tmp6_; + gchar* _tmp7_; + gchar* _tmp8_; + GRegex* _tmp9_; + GRegex* _tmp10_; + gchar* _tmp11_ = NULL; + GRegex* _tmp12_; + const gchar* _tmp13_; + gchar* _tmp14_; + gchar* _tmp15_; +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp6_ = old; +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp7_ = g_regex_escape_string (_tmp6_, -1); +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp8_ = _tmp7_; +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_); +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp10_ = _tmp9_; +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_free0 (_tmp8_); +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + regex = _tmp10_; +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 2093 "TumblrPublishing.c" + goto __catch22_g_regex_error; + } +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return NULL; +#line 2102 "TumblrPublishing.c" + } +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp12_ = regex; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp13_ = replacement; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp11_ = _tmp14_; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 2118 "TumblrPublishing.c" + goto __catch22_g_regex_error; + } +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return NULL; +#line 2129 "TumblrPublishing.c" + } +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp15_ = _tmp11_; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp11_ = NULL; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp15_; +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_free0 (_tmp11_); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 2143 "TumblrPublishing.c" + } + goto __finally22; + __catch22_g_regex_error: + { + GError* e = NULL; +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + e = _inner_error_; +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _inner_error_ = NULL; +#line 1415 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_assert_not_reached (); +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _g_error_free0 (e); +#line 2157 "TumblrPublishing.c" + } + __finally22: +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return NULL; +#line 2168 "TumblrPublishing.c" + } +} + + +static void _vala_array_add34 (PublishingTumblrBlogEntry** * array, int* length, int* size, PublishingTumblrBlogEntry* value) { +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if ((*length) == (*size)) { +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + *array = g_renew (PublishingTumblrBlogEntry*, *array, (*size) + 1); +#line 2180 "TumblrPublishing.c" + } +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[(*length)++] = value; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (*array)[*length] = NULL; +#line 2186 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (PublishingTumblrTumblrPublisher* self, const gchar* response) { + const gchar* _tmp0_; + GError * _inner_error_ = NULL; +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (response != NULL); +#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = response; +#line 226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:226: ACTION: parsing info request response '%s' " \ +"into list of available blogs", _tmp0_); +#line 2201 "TumblrPublishing.c" + { + JsonParser* parser = NULL; + JsonParser* _tmp1_; + const gchar* _tmp2_; + JsonObject* root_object = NULL; + JsonNode* _tmp3_; + JsonObject* _tmp4_; + JsonObject* _tmp5_; + JsonObject* _tmp6_; + JsonObject* _tmp7_; + JsonObject* _tmp8_; + const gchar* _tmp9_; + gchar* _tmp10_; + const gchar* _tmp11_; + JsonObject* _tmp12_; + JsonObject* _tmp13_; + JsonObject* _tmp14_; + JsonArray* _tmp15_; + GList* _tmp16_; +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = json_parser_new (); +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + parser = _tmp1_; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = response; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + json_parser_load_from_data (parser, _tmp2_, (gssize) -1, &_inner_error_); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (parser); +#line 2233 "TumblrPublishing.c" + goto __catch21_g_error; + } +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = json_parser_get_root (parser); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = json_node_get_object (_tmp3_); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _json_object_ref0 (_tmp4_); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + root_object = _tmp5_; +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = root_object; +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = json_object_get_object_member (_tmp6_, "response"); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = json_object_get_object_member (_tmp7_, "user"); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = json_object_get_string_member (_tmp8_, "name"); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = g_strdup (_tmp9_); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->username); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->username = _tmp10_; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = self->priv->username; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:232: Got user name: %s", _tmp11_); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = root_object; +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = json_object_get_object_member (_tmp12_, "response"); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14_ = json_object_get_object_member (_tmp13_, "user"); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp15_ = json_object_get_array_member (_tmp14_, "blogs"); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = json_array_get_elements (_tmp15_); +#line 2272 "TumblrPublishing.c" + { + GList* blognode_collection = NULL; + GList* blognode_it = NULL; +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + blognode_collection = _tmp16_; +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (blognode_it = blognode_collection; blognode_it != NULL; blognode_it = blognode_it->next) { +#line 2280 "TumblrPublishing.c" + JsonNode* blognode = NULL; +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + blognode = (JsonNode*) blognode_it->data; +#line 2284 "TumblrPublishing.c" + { + JsonObject* blog = NULL; + JsonNode* _tmp17_; + JsonObject* _tmp18_; + JsonObject* _tmp19_; + gchar* name = NULL; + JsonObject* _tmp20_; + const gchar* _tmp21_; + gchar* _tmp22_; + gchar* url = NULL; + JsonObject* _tmp23_; + const gchar* _tmp24_; + gchar* _tmp25_; + gchar* _tmp26_; + gchar* _tmp27_; + gchar* _tmp28_; + const gchar* _tmp29_; + const gchar* _tmp30_; + PublishingTumblrBlogEntry** _tmp31_; + gint _tmp31__length1; + const gchar* _tmp32_; + const gchar* _tmp33_; + PublishingTumblrBlogEntry* _tmp34_; +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17_ = blognode; +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp18_ = json_node_get_object (_tmp17_); +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19_ = _json_object_ref0 (_tmp18_); +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + blog = _tmp19_; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp20_ = blog; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp21_ = json_object_get_string_member (_tmp20_, "name"); +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp22_ = g_strdup (_tmp21_); +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + name = _tmp22_; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp23_ = blog; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp24_ = json_object_get_string_member (_tmp23_, "url"); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp25_ = string_replace (_tmp24_, "http://", ""); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp26_ = _tmp25_; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp27_ = string_replace (_tmp26_, "/", ""); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28_ = _tmp27_; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp26_); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + url = _tmp28_; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp29_ = name; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp30_ = url; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:237: Got blog name: %s and url: %s", _tmp29_, _tmp30_); +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp31_ = self->priv->blogs; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp31__length1 = self->priv->blogs_length1; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp32_ = name; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp33_ = url; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp34_ = publishing_tumblr_blog_entry_new (_tmp32_, _tmp33_); +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_array_add34 (&self->priv->blogs, &self->priv->blogs_length1, &self->priv->_blogs_size_, _tmp34_); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (url); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (name); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _json_object_unref0 (blog); +#line 2364 "TumblrPublishing.c" + } + } +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_list_free0 (blognode_collection); +#line 2369 "TumblrPublishing.c" + } +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _json_object_unref0 (root_object); +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (parser); +#line 2375 "TumblrPublishing.c" + } + goto __finally21; + __catch21_g_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp35_; + GError* _tmp36_; +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + err = _inner_error_; +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _inner_error_ = NULL; +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp35_ = self->priv->host; +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp36_ = err; +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp35_, _tmp36_); +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_error_free0 (err); +#line 2395 "TumblrPublishing.c" + } + __finally21: +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2406 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_tumblr_publisher_on_info_request_txn_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_; + guint _tmp1_; + PublishingRESTSupportTransaction* _tmp2_; + guint _tmp3_; + gboolean _tmp4_; + PublishingRESTSupportOAuth1Session* _tmp5_; + SpitPublishingPluginHost* _tmp6_; + GError* _tmp7_; +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = txn; +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = txn; +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_info_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp4_) { +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2442 "TumblrPublishing.c" + } +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = self->priv->session; +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_oauth1_session_deauthenticate (_tmp5_); +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:255: EVENT: user info request transaction caused" \ +" a network error"); +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = self->priv->host; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = err; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp6_, _tmp7_); +#line 2456 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish ((PublishingTumblrTumblrPublisher*) self); +#line 2463 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout ((PublishingTumblrTumblrPublisher*) self); +#line 2470 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (PublishingTumblrTumblrPublisher* self) { + SpitPublishingPluginHost* _tmp0_; + PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_options_pane = NULL; + SpitPublishingPluginHost* _tmp1_; + SpitPublishingPublisherMediaType _tmp2_; + PublishingTumblrSizeEntry** _tmp3_; + gint _tmp3__length1; + PublishingTumblrBlogEntry** _tmp4_; + gint _tmp4__length1; + const gchar* _tmp5_; + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp6_; + SpitPublishingPluginHost* _tmp7_; +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:260: ACTION: displaying publishing options pane"); +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->host; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = spit_publishing_plugin_host_get_publishable_media_type (_tmp1_); +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->sizes; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3__length1 = self->priv->sizes_length1; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = self->priv->blogs; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4__length1 = self->priv->blogs_length1; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = self->priv->username; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = publishing_tumblr_tumblr_publisher_publishing_options_pane_new (self, _tmp2_, _tmp3_, _tmp3__length1, _tmp4_, _tmp4__length1, _tmp5_); +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_options_pane = _tmp6_; +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (publishing_options_pane, "publish", (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self, 0); +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (publishing_options_pane, "logout", (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self, 0); +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = self->priv->host; +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (publishing_options_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (publishing_options_pane); +#line 2522 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish (PublishingTumblrTumblrPublisher* self) { + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; + gboolean _tmp5_; +#line 271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_ != NULL) { +#line 2535 "TumblrPublishing.c" + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp1_; + guint _tmp2_; + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp3_; + guint _tmp4_; +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->publishing_options_pane; +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp2_, NULL, FALSE); +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->publishing_options_pane; +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp4_, NULL, FALSE); +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); +#line 2552 "TumblrPublishing.c" + } +#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp5_) { +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2560 "TumblrPublishing.c" + } +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:280: EVENT: user clicked the 'Publish' button in" \ +" the publishing options pane"); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_publish (self); +#line 2566 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout (PublishingTumblrTumblrPublisher* self) { + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; + gboolean _tmp5_; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_ != NULL) { +#line 2579 "TumblrPublishing.c" + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp1_; + guint _tmp2_; + PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp3_; + guint _tmp4_; +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->publishing_options_pane; +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp2_, NULL, FALSE); +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); +#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->publishing_options_pane; +#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp4_, NULL, FALSE); +#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); +#line 2596 "TumblrPublishing.c" + } +#line 290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp5_) { +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2604 "TumblrPublishing.c" + } +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:293: EVENT: user clicked the 'Logout' button in " \ +"the publishing options pane"); +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_logout (self); +#line 2610 "TumblrPublishing.c" +} + + +gint publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b) { + gint result = 0; + SpitPublishingPublishable* _tmp0_; + GDateTime* _tmp1_; + GDateTime* _tmp2_; + SpitPublishingPublishable* _tmp3_; + GDateTime* _tmp4_; + GDateTime* _tmp5_; + gint _tmp6_; + gint _tmp7_; +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (a), 0); +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (b), 0); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = a; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = spit_publishing_publishable_get_exposure_date_time (_tmp0_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = _tmp1_; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = b; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = spit_publishing_publishable_get_exposure_date_time (_tmp3_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _tmp4_; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = g_date_time_compare (_tmp2_, _tmp5_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = _tmp6_; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_date_time_unref0 (_tmp5_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_date_time_unref0 (_tmp2_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp7_; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 2652 "TumblrPublishing.c" +} + + +static gint _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { + gint result; + result = publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func ((SpitPublishingPublishable*) a, (SpitPublishingPublishable*) b); +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 2661 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_upload_complete ((PublishingTumblrTumblrPublisher*) self, _sender, num_photos_published); +#line 2668 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_upload_error ((PublishingTumblrTumblrPublisher*) self, _sender, err); +#line 2675 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_on_upload_status_updated ((PublishingTumblrTumblrPublisher*) self, file_number, fraction_complete); +#line 2682 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_publish (PublishingTumblrTumblrPublisher* self) { + SpitPublishingPluginHost* _tmp0_; + SpitPublishingPluginHost* _tmp1_; + PublishingTumblrSizeEntry** _tmp2_; + gint _tmp2__length1; + gint _tmp3_; + PublishingTumblrSizeEntry* _tmp4_; + gint _tmp5_; + void* _tmp6_; + GDestroyNotify _tmp7_; + SpitPublishingProgressCallback _tmp8_; + gboolean _tmp9_; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp10_; + gint _tmp11_; + SpitPublishingPublishable** _tmp12_; + gint publishables_length1; + gint _publishables_size_; + GeeArrayList* sorted_list = NULL; + GeeArrayList* _tmp13_; + SpitPublishingPublishable** _tmp14_; + gint _tmp14__length1; + GeeArrayList* _tmp18_; + gchar* blog_url = NULL; + PublishingTumblrBlogEntry** _tmp19_; + gint _tmp19__length1; + gint _tmp20_; + PublishingTumblrBlogEntry* _tmp21_; + const gchar* _tmp22_; + gchar* _tmp23_; + PublishingTumblrTumblrPublisherUploader* uploader = NULL; + PublishingRESTSupportOAuth1Session* _tmp24_; + GeeArrayList* _tmp25_; + gint _tmp26_; + gpointer* _tmp27_; + SpitPublishingPublishable** _tmp28_; + gint _tmp28__length1; + const gchar* _tmp29_; + PublishingTumblrTumblrPublisherUploader* _tmp30_; + PublishingTumblrTumblrPublisherUploader* _tmp31_; + PublishingTumblrTumblrPublisherUploader* _tmp32_; + PublishingTumblrTumblrPublisherUploader* _tmp33_; + PublishingTumblrTumblrPublisherUploader* _tmp34_; +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:304: ACTION: uploading media items to remote ser" \ +"ver."); +#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->host; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = self->priv->sizes; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2__length1 = self->priv->sizes_length1; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = publishing_tumblr_tumblr_publisher_get_persistent_default_size (self); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = _tmp2_[_tmp3_]; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _tmp4_->size; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = spit_publishing_plugin_host_serialize_publishables (_tmp1_, _tmp5_, FALSE, &_tmp6_, &_tmp7_); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter = _tmp8_; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target = _tmp6_; +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp7_; +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp9_) { +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2771 "TumblrPublishing.c" + } +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = self->priv->host; +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = spit_publishing_plugin_host_get_publishables (_tmp10_, &_tmp11_); +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishables = _tmp12_; +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishables_length1 = _tmp11_; +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishables_size_ = publishables_length1; +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = gee_array_list_new (SPIT_PUBLISHING_TYPE_PUBLISHABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + sorted_list = _tmp13_; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14_ = publishables; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14__length1 = publishables_length1; +#line 2791 "TumblrPublishing.c" + { + SpitPublishingPublishable** p_collection = NULL; + gint p_collection_length1 = 0; + gint _p_collection_size_ = 0; + gint p_it = 0; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + p_collection = _tmp14_; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + p_collection_length1 = _tmp14__length1; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (p_it = 0; p_it < _tmp14__length1; p_it = p_it + 1) { +#line 2803 "TumblrPublishing.c" + SpitPublishingPublishable* _tmp15_; + SpitPublishingPublishable* p = NULL; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp15_ = _g_object_ref0 (p_collection[p_it]); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + p = _tmp15_; +#line 2810 "TumblrPublishing.c" + { + GeeArrayList* _tmp16_; + SpitPublishingPublishable* _tmp17_; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:322: ACTION: add publishable"); +#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = sorted_list; +#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17_ = p; +#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (p); +#line 2824 "TumblrPublishing.c" + } + } + } +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp18_ = sorted_list; +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gee_list_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_LIST, GeeList), _publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func_gcompare_data_func, NULL, NULL); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19_ = self->priv->blogs; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19__length1 = self->priv->blogs_length1; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp20_ = publishing_tumblr_tumblr_publisher_get_persistent_default_blog (self); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp21_ = _tmp19_[_tmp20_]; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp22_ = _tmp21_->url; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp23_ = g_strdup (_tmp22_); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + blog_url = _tmp23_; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp24_ = self->priv->session; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp25_ = sorted_list; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp27_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp26_); +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28_ = _tmp27_; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28__length1 = _tmp26_; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp29_ = blog_url; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp30_ = publishing_tumblr_tumblr_publisher_uploader_new (_tmp24_, _tmp28_, _tmp26_, _tmp29_); +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp31_ = _tmp30_; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28_ = (_vala_array_free (_tmp28_, _tmp28__length1, (GDestroyNotify) g_object_unref), NULL); +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + uploader = _tmp31_; +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp32_ = uploader; +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp33_ = uploader; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp34_ = uploader; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_tumblr_tumblr_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_batch_uploader_unref0 (uploader); +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (blog_url); +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (sorted_list); +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 2886 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_show_success_pane (PublishingTumblrTumblrPublisher* self) { + SpitPublishingPluginHost* _tmp0_; + SpitPublishingPluginHost* _tmp1_; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:335: ACTION: showing success pane."); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->host; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->host; +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 2905 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_upload_status_updated (PublishingTumblrTumblrPublisher* self, gint file_number, gdouble completed_fraction) { + gboolean _tmp0_; + gdouble _tmp1_; + SpitPublishingProgressCallback _tmp2_; + void* _tmp2__target; + SpitPublishingProgressCallback _tmp3_; + void* _tmp3__target; + gint _tmp4_; + gdouble _tmp5_; +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp0_) { +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2926 "TumblrPublishing.c" + } +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = completed_fraction; +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:346: EVENT: uploader reports upload %.2f percent" \ +" complete.", 100.0 * _tmp1_); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = self->priv->progress_reporter; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2__target = self->priv->progress_reporter_target; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = file_number; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = completed_fraction; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 2948 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_upload_complete (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { + gboolean _tmp0_; + gint _tmp1_; + PublishingRESTSupportBatchUploader* _tmp2_; + guint _tmp3_; + PublishingRESTSupportBatchUploader* _tmp4_; + guint _tmp5_; +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp0_) { +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 2969 "TumblrPublishing.c" + } +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = num_published; +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:358: EVENT: uploader reports upload complete; %d" \ +" items published.", _tmp1_); +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = uploader; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = uploader; +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp5_, NULL, FALSE); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_do_show_success_pane (self); +#line 2989 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_on_upload_error (PublishingTumblrTumblrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { + gboolean _tmp0_; + GError* _tmp1_; + const gchar* _tmp2_; + PublishingRESTSupportBatchUploader* _tmp3_; + guint _tmp4_; + PublishingRESTSupportBatchUploader* _tmp5_; + guint _tmp6_; + SpitPublishingPluginHost* _tmp7_; + GError* _tmp8_; +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp0_) { +#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 3013 "TumblrPublishing.c" + } +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = err; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = _tmp1_->message; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:371: EVENT: uploader reports upload error = '%s'" \ +".", _tmp2_); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = uploader; +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp4_, NULL, FALSE); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = uploader; +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp6_, NULL, FALSE); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = self->priv->host; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = err; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 3039 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_do_logout (PublishingTumblrTumblrPublisher* self) { + SpitPublishingAuthenticator* _tmp0_; + gboolean _tmp1_; +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:381: ACTION: logging user out, deauthenticating " \ +"session, and erasing stored credentials"); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->authenticator; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = spit_publishing_authenticator_can_logout (_tmp0_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp1_) { +#line 3056 "TumblrPublishing.c" + SpitPublishingAuthenticator* _tmp2_; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = self->priv->authenticator; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_authenticator_logout (_tmp2_); +#line 3062 "TumblrPublishing.c" + } +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->running = FALSE; +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_attempt_start (self); +#line 3068 "TumblrPublishing.c" +} + + +void publishing_tumblr_tumblr_publisher_attempt_start (PublishingTumblrTumblrPublisher* self) { + gboolean _tmp0_; + SpitPublishingAuthenticator* _tmp1_; +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (self)); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_) { +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 3083 "TumblrPublishing.c" + } +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:396: TumblrPublisher: starting interaction."); +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->running = TRUE; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->authenticator; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + spit_publishing_authenticator_authenticate (_tmp1_); +#line 3093 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_real_start (SpitPublishingPublisher* base) { + PublishingTumblrTumblrPublisher * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_) { +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 3109 "TumblrPublishing.c" + } +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->was_started; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp1_) { +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_error ("TumblrPublishing.vala:407: %s", _ ("TumblrPublisher: start( ): can’t start; this publisher is not restarta" \ +"ble.")); +#line 3117 "TumblrPublishing.c" + } +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:409: TumblrPublisher: starting interaction."); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_attempt_start (self); +#line 3123 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_real_stop (SpitPublishingPublisher* base) { + PublishingTumblrTumblrPublisher * self; +#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); +#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:415: TumblrPublisher: stop( ) invoked."); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->running = FALSE; +#line 3135 "TumblrPublishing.c" +} + + +static gpointer _publishing_tumblr_size_entry_ref0 (gpointer self) { +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self ? publishing_tumblr_size_entry_ref (self) : NULL; +#line 3142 "TumblrPublishing.c" +} + + +static PublishingTumblrSizeEntry** _vala_array_dup9 (PublishingTumblrSizeEntry** self, int length) { + PublishingTumblrSizeEntry** result; + int i; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = g_new0 (PublishingTumblrSizeEntry*, length + 1); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (i = 0; i < length; i++) { +#line 3153 "TumblrPublishing.c" + PublishingTumblrSizeEntry* _tmp0_; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = _publishing_tumblr_size_entry_ref0 (self[i]); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result[i] = _tmp0_; +#line 3159 "TumblrPublishing.c" + } +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 3163 "TumblrPublishing.c" +} + + +static gpointer _publishing_tumblr_blog_entry_ref0 (gpointer self) { +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self ? publishing_tumblr_blog_entry_ref (self) : NULL; +#line 3170 "TumblrPublishing.c" +} + + +static PublishingTumblrBlogEntry** _vala_array_dup10 (PublishingTumblrBlogEntry** self, int length) { + PublishingTumblrBlogEntry** result; + int i; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = g_new0 (PublishingTumblrBlogEntry*, length + 1); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (i = 0; i < length; i++) { +#line 3181 "TumblrPublishing.c" + PublishingTumblrBlogEntry* _tmp0_; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = _publishing_tumblr_blog_entry_ref0 (self[i]); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result[i] = _tmp0_; +#line 3187 "TumblrPublishing.c" + } +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 3191 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3198 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3205 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3212 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3219 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (GType object_type, PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self = NULL; + GtkBox* _tmp0_; + const gchar* _tmp1_; + gchar* _tmp2_; + PublishingTumblrTumblrPublisher* _tmp3_; + PublishingTumblrTumblrPublisher* _tmp4_; + SpitPublishingPublisherMediaType _tmp5_; + PublishingTumblrSizeEntry** _tmp6_; + gint _tmp6__length1; + PublishingTumblrSizeEntry** _tmp7_; + gint _tmp7__length1; + PublishingTumblrBlogEntry** _tmp8_; + gint _tmp8__length1; + PublishingTumblrBlogEntry** _tmp9_; + gint _tmp9__length1; + GError * _inner_error_ = NULL; +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_IS_TUMBLR_PUBLISHER (publisher), NULL); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (username != NULL, NULL); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrTumblrPublisherPublishingOptionsPane*) g_object_new (object_type, NULL); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_object_ref_sink (_tmp0_); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->pane_widget = _tmp0_; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = username; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->username); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->username = _tmp2_; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = publisher; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = _g_object_ref0 (_tmp3_); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->publisher = _tmp4_; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = media_type; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->media_type = _tmp5_; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = sizes; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6__length1 = sizes_length1; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = (_tmp6_ != NULL) ? _vala_array_dup9 (_tmp6_, _tmp6__length1) : ((gpointer) _tmp6_); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7__length1 = _tmp6__length1; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = _tmp7_; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes_length1 = _tmp7__length1; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = blogs; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8__length1 = blogs_length1; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup10 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = _tmp9_; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs_length1 = _tmp9__length1; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_blogs_size_ = self->priv->blogs_length1; +#line 3306 "TumblrPublishing.c" + { + GtkBuilder* _tmp10_; + GtkBuilder* _tmp11_; + GtkBuilder* _tmp12_; + GtkBuilder* _tmp13_; + GObject* _tmp14_; + GtkBox* _tmp15_; + GtkBuilder* _tmp16_; + GObject* _tmp17_; + GtkLabel* _tmp18_; + GtkBuilder* _tmp19_; + GObject* _tmp20_; + GtkButton* _tmp21_; + GtkBuilder* _tmp22_; + GObject* _tmp23_; + GtkButton* _tmp24_; + GtkBuilder* _tmp25_; + GObject* _tmp26_; + GtkComboBoxText* _tmp27_; + GtkBuilder* _tmp28_; + GObject* _tmp29_; + GtkLabel* _tmp30_; + GtkBuilder* _tmp31_; + GObject* _tmp32_; + GtkComboBoxText* _tmp33_; + GtkBuilder* _tmp34_; + GObject* _tmp35_; + GtkLabel* _tmp36_; + gchar* upload_label_text = NULL; + const gchar* _tmp37_; + gchar* _tmp38_; + GtkLabel* _tmp39_; + const gchar* _tmp40_; + GtkComboBoxText* _tmp41_; + SpitPublishingPublisherMediaType _tmp42_; + GtkButton* _tmp46_; + GtkButton* _tmp47_; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = gtk_builder_new (); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->builder = _tmp10_; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = self->priv->builder; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_builder_add_from_resource (_tmp11_, PLUGIN_RESOURCE_PATH "/tumblr_publishing_options_pane.ui", &_inner_error_); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 3356 "TumblrPublishing.c" + goto __catch23_g_error; + } +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = self->priv->builder; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_builder_connect_signals (_tmp12_, NULL); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = self->priv->builder; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14_ = gtk_builder_get_object (_tmp13_, "tumblr_pane"); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_box_get_type (), GtkBox)); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->pane_widget = _tmp15_; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = self->priv->builder; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17_ = gtk_builder_get_object (_tmp16_, "upload_info_label"); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_label_get_type (), GtkLabel)); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->upload_info_label); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->upload_info_label = _tmp18_; +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19_ = self->priv->builder; +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp20_ = gtk_builder_get_object (_tmp19_, "logout_button"); +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_button_get_type (), GtkButton)); +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->logout_button = _tmp21_; +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp22_ = self->priv->builder; +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp23_ = gtk_builder_get_object (_tmp22_, "publish_button"); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_button_get_type (), GtkButton)); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->publish_button = _tmp24_; +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp25_ = self->priv->builder; +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp26_ = gtk_builder_get_object (_tmp25_, "size_combo"); +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->size_combo = _tmp27_; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28_ = self->priv->builder; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp29_ = gtk_builder_get_object (_tmp28_, "size_label"); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_label_get_type (), GtkLabel)); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->size_label); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->size_label = _tmp30_; +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp31_ = self->priv->builder; +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp32_ = gtk_builder_get_object (_tmp31_, "blog_combo"); +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->blog_combo); +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_combo = _tmp33_; +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp34_ = self->priv->builder; +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp35_ = gtk_builder_get_object (_tmp34_, "blog_label"); +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp36_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_label_get_type (), GtkLabel)); +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->blog_label); +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_label = _tmp36_; +#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp37_ = self->priv->username; +#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp38_ = g_strdup_printf (_ ("You are logged into Tumblr as %s.\n\n"), _tmp37_); +#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + upload_label_text = _tmp38_; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp39_ = self->priv->upload_info_label; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp40_ = upload_label_text; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_label_set_label (_tmp39_, _tmp40_); +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (self); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp41_ = self->priv->blog_combo; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed_gtk_combo_box_changed, self, 0); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp42_ = media_type; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp42_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 3465 "TumblrPublishing.c" + GtkComboBoxText* _tmp43_; +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (self); +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp43_ = self->priv->size_combo; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed_gtk_combo_box_changed, self, 0); +#line 3473 "TumblrPublishing.c" + } else { + GtkComboBoxText* _tmp44_; + GtkLabel* _tmp45_; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp44_ = self->priv->size_combo; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp45_ = self->priv->size_label; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 3485 "TumblrPublishing.c" + } +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp46_ = self->priv->logout_button; +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (_tmp46_, "clicked", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp47_ = self->priv->publish_button; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (_tmp47_, "clicked", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (upload_label_text); +#line 3497 "TumblrPublishing.c" + } + goto __finally23; + __catch23_g_error: + { + GError* e = NULL; + GError* _tmp48_; + const gchar* _tmp49_; +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + e = _inner_error_; +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _inner_error_ = NULL; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp48_ = e; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp49_ = _tmp48_->message; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_warning (_ ("Could not load UI: %s"), _tmp49_); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_error_free0 (e); +#line 3517 "TumblrPublishing.c" + } + __finally23: +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return NULL; +#line 3528 "TumblrPublishing.c" + } +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 3532 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_tumblr_tumblr_publisher_publishing_options_pane_new (PublishingTumblrTumblrPublisher* publisher, SpitPublishingPublisherMediaType media_type, PublishingTumblrSizeEntry** sizes, int sizes_length1, PublishingTumblrBlogEntry** blogs, int blogs_length1, const gchar* username) { +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_tumblr_publisher_publishing_options_pane_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, publisher, media_type, sizes, sizes_length1, blogs, blogs_length1, username); +#line 3539 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_logout_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { +#line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); +#line 3548 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_publish_clicked (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0); +#line 3557 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_blog_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { + PublishingTumblrBlogEntry** _tmp0_; + gint _tmp0__length1; +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->blogs; +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0__length1 = self->priv->blogs_length1; +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_ != NULL) { +#line 3572 "TumblrPublishing.c" + PublishingTumblrBlogEntry** _tmp1_; + gint _tmp1__length1; + GtkComboBoxText* _tmp6_; + PublishingTumblrTumblrPublisher* _tmp7_; + gint _tmp8_; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->blogs; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1__length1 = self->priv->blogs_length1; +#line 3582 "TumblrPublishing.c" + { + PublishingTumblrBlogEntry** b_collection = NULL; + gint b_collection_length1 = 0; + gint _b_collection_size_ = 0; + gint b_it = 0; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + b_collection = _tmp1_; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + b_collection_length1 = _tmp1__length1; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (b_it = 0; b_it < _tmp1__length1; b_it = b_it + 1) { +#line 3594 "TumblrPublishing.c" + PublishingTumblrBlogEntry* _tmp2_; + PublishingTumblrBlogEntry* b = NULL; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = _publishing_tumblr_blog_entry_ref0 (b_collection[b_it]); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + b = _tmp2_; +#line 3601 "TumblrPublishing.c" + { + GtkComboBoxText* _tmp3_; + PublishingTumblrBlogEntry* _tmp4_; + const gchar* _tmp5_; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->blog_combo; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = b; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _tmp4_->blog; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_combo_box_text_append_text (_tmp3_, _tmp5_); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_tumblr_blog_entry_unref0 (b); +#line 3616 "TumblrPublishing.c" + } + } + } +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = self->priv->blog_combo; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = self->priv->publisher; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = publishing_tumblr_tumblr_publisher_get_persistent_default_blog (_tmp7_); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), _tmp8_); +#line 3628 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { + PublishingTumblrTumblrPublisher* _tmp0_; + GtkComboBoxText* _tmp1_; + gint _tmp2_; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->publisher; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->blog_combo; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_set_persistent_default_blog (_tmp0_, _tmp2_); +#line 3647 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_populate_size_combo (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { + PublishingTumblrSizeEntry** _tmp0_; + gint _tmp0__length1; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->sizes; +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0__length1 = self->priv->sizes_length1; +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp0_ != NULL) { +#line 3662 "TumblrPublishing.c" + PublishingTumblrSizeEntry** _tmp1_; + gint _tmp1__length1; + GtkComboBoxText* _tmp6_; + PublishingTumblrTumblrPublisher* _tmp7_; + gint _tmp8_; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->sizes; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1__length1 = self->priv->sizes_length1; +#line 3672 "TumblrPublishing.c" + { + PublishingTumblrSizeEntry** e_collection = NULL; + gint e_collection_length1 = 0; + gint _e_collection_size_ = 0; + gint e_it = 0; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + e_collection = _tmp1_; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + e_collection_length1 = _tmp1__length1; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (e_it = 0; e_it < _tmp1__length1; e_it = e_it + 1) { +#line 3684 "TumblrPublishing.c" + PublishingTumblrSizeEntry* _tmp2_; + PublishingTumblrSizeEntry* e = NULL; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = _publishing_tumblr_size_entry_ref0 (e_collection[e_it]); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + e = _tmp2_; +#line 3691 "TumblrPublishing.c" + { + GtkComboBoxText* _tmp3_; + PublishingTumblrSizeEntry* _tmp4_; + const gchar* _tmp5_; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = self->priv->size_combo; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = e; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = _tmp4_->title; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_combo_box_text_append_text (_tmp3_, _tmp5_); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_tumblr_size_entry_unref0 (e); +#line 3706 "TumblrPublishing.c" + } + } + } +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = self->priv->size_combo; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = self->priv->publisher; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = publishing_tumblr_tumblr_publisher_get_persistent_default_size (_tmp7_); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), _tmp8_); +#line 3718 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { + PublishingTumblrTumblrPublisher* _tmp0_; + GtkComboBoxText* _tmp1_; + gint _tmp2_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->publisher; +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = self->priv->size_combo; +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_set_persistent_default_size (_tmp0_, _tmp2_); +#line 3737 "TumblrPublishing.c" +} + + +void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { +#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL], 0); +#line 3746 "TumblrPublishing.c" +} + + +void publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) { +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_emit (self, publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL], 0); +#line 3755 "TumblrPublishing.c" +} + + +static GtkWidget* publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_; + GtkWidget* _tmp1_; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp1_; +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 3774 "TumblrPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 3787 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3794 "TumblrPublishing.c" +} + + +static void _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout (PublishingTumblrTumblrPublisherPublishingOptionsPane* _sender, gpointer self) { +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout ((PublishingTumblrTumblrPublisherPublishingOptionsPane*) self); +#line 3801 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self; +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (self, "publish", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self, 0); +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_connect_object (self, "logout", (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self, 0); +#line 3813 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self; + guint _tmp0_; + guint _tmp1_; +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); +#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp0_, NULL, FALSE); +#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_publish_publishing_tumblr_tumblr_publisher_publishing_options_pane_publish, self); +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_publishing_options_pane_notify_logout_publishing_tumblr_tumblr_publisher_publishing_options_pane_logout, self); +#line 3831 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_class_init (PublishingTumblrTumblrPublisherPublishingOptionsPaneClass * klass) { +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPanePrivate)); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_PUBLISH_SIGNAL] = g_signal_new ("publish", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_LOGOUT_SIGNAL] = g_signal_new ("logout", PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 3846 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_widget = (GtkWidget* (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_widget; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_get_preferred_geometry; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->on_pane_installed = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_installed; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->on_pane_uninstalled = (void (*) (SpitPublishingDialogPane *)) publishing_tumblr_tumblr_publisher_publishing_options_pane_real_on_pane_uninstalled; +#line 3861 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_instance_init (PublishingTumblrTumblrPublisherPublishingOptionsPane * self) { + gchar* _tmp0_; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->pane_widget = NULL; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->upload_info_label = NULL; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->size_label = NULL; +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_label = NULL; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->logout_button = NULL; +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->publish_button = NULL; +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->size_combo = NULL; +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_combo = NULL; +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = NULL; +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes_length1 = 0; +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = NULL; +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs_length1 = 0; +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_blogs_size_ = self->priv->blogs_length1; +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_strdup (""); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->username = _tmp0_; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->publisher = NULL; +#line 3903 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_publishing_options_pane_finalize (GObject * obj) { + PublishingTumblrTumblrPublisherPublishingOptionsPane * self; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_PUBLISHING_OPTIONS_PANE, PublishingTumblrTumblrPublisherPublishingOptionsPane); +#line 436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->upload_info_label); +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->size_label); +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->blog_label); +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->blog_combo); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->username); +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (publishing_tumblr_tumblr_publisher_publishing_options_pane_parent_class)->finalize (obj); +#line 3939 "TumblrPublishing.c" +} + + +/** + * The publishing options pane. + */ +GType publishing_tumblr_tumblr_publisher_publishing_options_pane_get_type (void) { + static volatile gsize publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_tumblr_tumblr_publisher_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id; + publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingTumblrTumblrPublisherPublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile, publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id); + } + return publishing_tumblr_tumblr_publisher_publishing_options_pane_type_id__volatile; +} + + +PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session) { + PublishingTumblrTumblrPublisherUserInfoFetchTransaction* self = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = session; +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrTumblrPublisherUserInfoFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, _tmp0_, "https://api.tumblr.com/v2/user/info", PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 3971 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherUserInfoFetchTransaction* publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_new (PublishingRESTSupportOAuth1Session* session) { +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_USER_INFO_FETCH_TRANSACTION, session); +#line 3978 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_class_init (PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass * klass) { +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_parent_class = g_type_class_peek_parent (klass); +#line 3985 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_instance_init (PublishingTumblrTumblrPublisherUserInfoFetchTransaction * self) { +} + + +GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_get_type (void) { + static volatile gsize publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUserInfoFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUserInfoFetchTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_instance_init, NULL }; + GType publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id; + publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_TRANSACTION, "PublishingTumblrTumblrPublisherUserInfoFetchTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id); + } + return publishing_tumblr_tumblr_publisher_user_info_fetch_transaction_type_id__volatile; +} + + +static gchar* publishing_tumblr_tumblr_publisher_upload_transaction_encode (PublishingTumblrTumblrPublisherUploadTransaction* self, guint8* data, int data_length1) { + gchar* result = NULL; + GString* s = NULL; + GString* _tmp0_; + gchar* bytes = NULL; + gchar* _tmp1_; + gint bytes_length1; + gint _bytes_size_; + gchar* _tmp2_; + gint _tmp2__length1; + gchar _tmp3_; + guint8* _tmp4_; + gint _tmp4__length1; + GString* _tmp14_; + const gchar* _tmp15_; + gchar* _tmp16_; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_IS_UPLOAD_TRANSACTION (self), NULL); +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_string_new (""); +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + s = _tmp0_; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = g_new0 (gchar, 2); +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + bytes = _tmp1_; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + bytes_length1 = 2; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _bytes_size_ = bytes_length1; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = bytes; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2__length1 = bytes_length1; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_[1] = (gchar) 0; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = _tmp2_[1]; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = data; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4__length1 = data_length1; +#line 4047 "TumblrPublishing.c" + { + guint8* byte_collection = NULL; + gint byte_collection_length1 = 0; + gint _byte_collection_size_ = 0; + gint byte_it = 0; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + byte_collection = _tmp4_; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + byte_collection_length1 = _tmp4__length1; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + for (byte_it = 0; byte_it < _tmp4__length1; byte_it = byte_it + 1) { +#line 4059 "TumblrPublishing.c" + guint8 byte = 0U; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + byte = byte_collection[byte_it]; +#line 4063 "TumblrPublishing.c" + { + guint8 _tmp5_; +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = byte; +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (((gint) _tmp5_) == 0) { +#line 4070 "TumblrPublishing.c" + GString* _tmp6_; +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = s; +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_string_append (_tmp6_, "%00"); +#line 4076 "TumblrPublishing.c" + } else { + gchar* _tmp7_; + gint _tmp7__length1; + guint8 _tmp8_; + gchar _tmp9_; + GString* _tmp10_; + gchar* _tmp11_; + gint _tmp11__length1; + gchar* _tmp12_; + gchar* _tmp13_; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = bytes; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7__length1 = bytes_length1; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = byte; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_[0] = (gchar) _tmp8_; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = _tmp7_[0]; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = s; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = bytes; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11__length1 = bytes_length1; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = soup_uri_encode ((const gchar*) _tmp11_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = _tmp12_; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_string_append (_tmp10_, _tmp13_); +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp13_); +#line 4111 "TumblrPublishing.c" + } + } + } + } +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp14_ = s; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp15_ = _tmp14_->str; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = g_strdup (_tmp15_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp16_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + bytes = (g_free (bytes), NULL); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_string_free0 (s); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 4130 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* blog_url) { + PublishingTumblrTumblrPublisherUploadTransaction* self = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; + SpitPublishingPublishable* _tmp1_; + const gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (blog_url != NULL, NULL); +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:596: Init upload transaction"); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = session; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = publishable; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = blog_url; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = g_strdup_printf ("https://api.tumblr.com/v2/blog/%s/post", _tmp2_); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = _tmp3_; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrTumblrPublisherUploadTransaction*) publishing_rest_support_oauth1_upload_transaction_construct (object_type, _tmp0_, _tmp1_, _tmp4_); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp4_); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 4165 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherUploadTransaction* publishing_tumblr_tumblr_publisher_upload_transaction_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable* publishable, const gchar* blog_url) { +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_tumblr_publisher_upload_transaction_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, session, publishable, blog_url); +#line 4172 "TumblrPublishing.c" +} + + +static guint8* string_get_data (const gchar* self, int* result_length1) { + guint8* result; + guint8* res = NULL; + gint res_length1; + gint _res_size_; + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint8* _tmp3_; + gint _tmp3__length1; + guint8* _tmp4_; + gint _tmp4__length1; +#line 1428 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res = (guint8*) self; +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res_length1 = -1; +#line 1429 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _res_size_ = res_length1; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res_length1 = (gint) _tmp1_; +#line 1430 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = res_length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = res; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3__length1 = res_length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4__length1 = _tmp3__length1; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (result_length1) { +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + *result_length1 = _tmp4__length1; +#line 4216 "TumblrPublishing.c" + } +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1431 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 4222 "TumblrPublishing.c" +} + + +static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { + gchar* result = NULL; + const gchar* _tmp0_; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gchar** _tmp3_; + gint _tmp3__length1; +#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = separator; +#line 1078 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp0_ == NULL) { +#line 1079 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + separator = ""; +#line 4239 "TumblrPublishing.c" + } +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = str_array; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3__length1 = str_array_length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp3_ != NULL) { +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = TRUE; +#line 4249 "TumblrPublishing.c" + } else { + gchar** _tmp4_; + gint _tmp4__length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4_ = str_array; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4__length1 = str_array_length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = _tmp4__length1 > 0; +#line 4259 "TumblrPublishing.c" + } +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp2_) { +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = TRUE; +#line 4265 "TumblrPublishing.c" + } else { + gboolean _tmp5_ = FALSE; + gchar** _tmp6_; + gint _tmp6__length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp6_ = str_array; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp6__length1 = str_array_length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp6__length1 == -1) { +#line 4276 "TumblrPublishing.c" + gchar** _tmp7_; + gint _tmp7__length1; + const gchar* _tmp8_; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp7_ = str_array; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp7__length1 = str_array_length1; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp8_ = _tmp7_[0]; +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_ != NULL; +#line 4288 "TumblrPublishing.c" + } else { +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp5_ = FALSE; +#line 4292 "TumblrPublishing.c" + } +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = _tmp5_; +#line 4296 "TumblrPublishing.c" + } +#line 1081 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp1_) { +#line 4300 "TumblrPublishing.c" + gint i = 0; + gsize len = 0UL; + gint _tmp31_; + gint _tmp33_; + gint _tmp34_; + gsize _tmp35_; + const gchar* _tmp36_; + gint _tmp37_; + gint _tmp38_; + gint _tmp39_; + const gchar* res = NULL; + gsize _tmp40_; + void* _tmp41_; + void* ptr = NULL; + const gchar* _tmp42_; + gchar** _tmp43_; + gint _tmp43__length1; + const gchar* _tmp44_; + void* _tmp45_; + const gchar* _tmp62_; +#line 1083 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + len = (gsize) 1; +#line 4323 "TumblrPublishing.c" + { + gboolean _tmp9_ = FALSE; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + i = 0; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp9_ = TRUE; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + while (TRUE) { +#line 4332 "TumblrPublishing.c" + gboolean _tmp11_ = FALSE; + gboolean _tmp12_ = FALSE; + gchar** _tmp13_; + gint _tmp13__length1; + gint _tmp21_ = 0; + gchar** _tmp22_; + gint _tmp22__length1; + gint _tmp23_; + const gchar* _tmp24_; + gsize _tmp30_; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (!_tmp9_) { +#line 4345 "TumblrPublishing.c" + gint _tmp10_; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp10_ = i; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + i = _tmp10_ + 1; +#line 4351 "TumblrPublishing.c" + } +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp9_ = FALSE; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp13_ = str_array; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp13__length1 = str_array_length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp13__length1 != -1) { +#line 4361 "TumblrPublishing.c" + gint _tmp14_; + gchar** _tmp15_; + gint _tmp15__length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp14_ = i; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp15_ = str_array; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp15__length1 = str_array_length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ < _tmp15__length1; +#line 4373 "TumblrPublishing.c" + } else { +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 4377 "TumblrPublishing.c" + } +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp12_) { +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp11_ = TRUE; +#line 4383 "TumblrPublishing.c" + } else { + gboolean _tmp16_ = FALSE; + gchar** _tmp17_; + gint _tmp17__length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp17_ = str_array; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp17__length1 = str_array_length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp17__length1 == -1) { +#line 4394 "TumblrPublishing.c" + gchar** _tmp18_; + gint _tmp18__length1; + gint _tmp19_; + const gchar* _tmp20_; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp18_ = str_array; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp18__length1 = str_array_length1; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp19_ = i; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp20_ = _tmp18_[_tmp19_]; +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp16_ = _tmp20_ != NULL; +#line 4409 "TumblrPublishing.c" + } else { +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp16_ = FALSE; +#line 4413 "TumblrPublishing.c" + } +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp11_ = _tmp16_; +#line 4417 "TumblrPublishing.c" + } +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (!_tmp11_) { +#line 1084 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + break; +#line 4423 "TumblrPublishing.c" + } +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp22_ = str_array; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp22__length1 = str_array_length1; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp23_ = i; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp24_ = _tmp22_[_tmp23_]; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp24_ != NULL) { +#line 4435 "TumblrPublishing.c" + gchar** _tmp25_; + gint _tmp25__length1; + gint _tmp26_; + const gchar* _tmp27_; + gint _tmp28_; + gint _tmp29_; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp25_ = str_array; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp25__length1 = str_array_length1; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp26_ = i; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp27_ = _tmp25_[_tmp26_]; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp28_ = strlen ((const gchar*) _tmp27_); +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp29_ = _tmp28_; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp21_ = _tmp29_; +#line 4456 "TumblrPublishing.c" + } else { +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp21_ = 0; +#line 4460 "TumblrPublishing.c" + } +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp30_ = len; +#line 1085 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + len = _tmp30_ + _tmp21_; +#line 4466 "TumblrPublishing.c" + } + } +#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp31_ = i; +#line 1087 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp31_ == 0) { +#line 4473 "TumblrPublishing.c" + gchar* _tmp32_; +#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp32_ = g_strdup (""); +#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp32_; +#line 1088 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 4481 "TumblrPublishing.c" + } +#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp33_ = i; +#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + str_array_length1 = _tmp33_; +#line 1090 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp34_ = str_array_length1; +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp35_ = len; +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp36_ = separator; +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp37_ = strlen ((const gchar*) _tmp36_); +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp38_ = _tmp37_; +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp39_ = i; +#line 1091 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); +#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp40_ = len; +#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp41_ = g_malloc (_tmp40_); +#line 1093 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res = _tmp41_; +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp42_ = res; +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp43_ = str_array; +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp43__length1 = str_array_length1; +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp44_ = _tmp43_[0]; +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); +#line 1094 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + ptr = _tmp45_; +#line 4519 "TumblrPublishing.c" + { + gboolean _tmp46_ = FALSE; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + i = 1; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp46_ = TRUE; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + while (TRUE) { +#line 4528 "TumblrPublishing.c" + gint _tmp48_; + gchar** _tmp49_; + gint _tmp49__length1; + void* _tmp50_; + const gchar* _tmp51_; + void* _tmp52_; + const gchar* _tmp53_ = NULL; + gchar** _tmp54_; + gint _tmp54__length1; + gint _tmp55_; + const gchar* _tmp56_; + void* _tmp60_; + void* _tmp61_; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (!_tmp46_) { +#line 4544 "TumblrPublishing.c" + gint _tmp47_; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp47_ = i; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + i = _tmp47_ + 1; +#line 4550 "TumblrPublishing.c" + } +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp46_ = FALSE; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp48_ = i; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp49_ = str_array; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp49__length1 = str_array_length1; +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (!(_tmp48_ < _tmp49__length1)) { +#line 1095 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + break; +#line 4564 "TumblrPublishing.c" + } +#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp50_ = ptr; +#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp51_ = separator; +#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); +#line 1096 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + ptr = _tmp52_; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp54_ = str_array; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp54__length1 = str_array_length1; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp55_ = i; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp56_ = _tmp54_[_tmp55_]; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + if (_tmp56_ != NULL) { +#line 4584 "TumblrPublishing.c" + gchar** _tmp57_; + gint _tmp57__length1; + gint _tmp58_; + const gchar* _tmp59_; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp57_ = str_array; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp57__length1 = str_array_length1; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp58_ = i; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp59_ = _tmp57_[_tmp58_]; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp53_ = (const gchar*) _tmp59_; +#line 4599 "TumblrPublishing.c" + } else { +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp53_ = ""; +#line 4603 "TumblrPublishing.c" + } +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp60_ = ptr; +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); +#line 1097 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + ptr = _tmp61_; +#line 4611 "TumblrPublishing.c" + } + } +#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp62_ = res; +#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + res = NULL; +#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = (gchar*) _tmp62_; +#line 1100 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 4622 "TumblrPublishing.c" + } else { + gchar* _tmp63_; +#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp63_ = g_strdup (""); +#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp63_; +#line 1102 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 4631 "TumblrPublishing.c" + } +} + + +static void publishing_tumblr_tumblr_publisher_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingTumblrTumblrPublisherUploadTransaction * self; + gchar* payload = NULL; + gsize payload_length = 0UL; + PublishingRESTSupportArgument** request_arguments = NULL; + gint _tmp24_; + PublishingRESTSupportArgument** _tmp25_; + gint request_arguments_length1; + gint _request_arguments_size_; + PublishingRESTSupportArgument** _tmp26_; + gint _tmp26__length1; + gchar* request_data = NULL; + PublishingRESTSupportArgument** _tmp27_; + gint _tmp27__length1; + gchar* _tmp28_; + SoupMessage* outbound_message = NULL; + gchar* _tmp29_; + gchar* _tmp30_; + SoupMessage* _tmp31_; + SoupMessage* _tmp32_; + SoupMessage* _tmp33_; + const gchar* _tmp34_; + guint8* _tmp35_; + gint _tmp35__length1; + guint8* _tmp36_; + gint _tmp36__length1; + GeeMapIterator* i = NULL; + GeeHashMap* _tmp37_; + GeeMapIterator* _tmp38_; + gboolean cont = FALSE; + GeeMapIterator* _tmp39_; + gboolean _tmp40_; + SoupMessage* _tmp52_; + GError * _inner_error_ = NULL; +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOAD_TRANSACTION, PublishingTumblrTumblrPublisherUploadTransaction); +#line 4672 "TumblrPublishing.c" + { + SpitPublishingPublishable* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_ = NULL; + gsize _tmp6_ = 0UL; + gchar* reqdata = NULL; + const gchar* _tmp7_; + guint8* _tmp8_; + gint _tmp8__length1; + guint8* _tmp9_; + gint _tmp9__length1; + gsize _tmp10_; + gchar* _tmp11_; + const gchar* _tmp12_; + gchar** keywords = NULL; + SpitPublishingPublishable* _tmp13_; + gint _tmp14_; + gchar** _tmp15_; + gint keywords_length1; + gint _keywords_size_; + gchar* tags = NULL; + gchar* _tmp16_; + gchar** _tmp17_; + gint _tmp17__length1; + const gchar* _tmp20_; + gchar* _tmp21_; + gchar* _tmp22_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->publishable; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = spit_publishing_publishable_get_serialized_file (_tmp0_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = _tmp1_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = g_file_get_path (_tmp2_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = _tmp3_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_file_get_contents (_tmp4_, &_tmp5_, &_tmp6_, &_inner_error_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + payload = _tmp5_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + payload_length = _tmp6_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp4_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (_tmp2_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_inner_error_->domain == G_FILE_ERROR) { +#line 4729 "TumblrPublishing.c" + goto __catch24_g_file_error; + } +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 4740 "TumblrPublishing.c" + } +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp7_ = payload; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp8_ = string_get_data (_tmp7_, &_tmp8__length1); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9_ = _tmp8_; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp10_ = payload_length; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp11_ = publishing_tumblr_tumblr_publisher_upload_transaction_encode (self, _tmp9_ + 0, ((gint) _tmp10_) - 0); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + reqdata = _tmp11_; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp12_ = reqdata; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "data[0]", _tmp12_); +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "type", "photo"); +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->publishable; +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp15_ = spit_publishing_publishable_get_publishing_keywords (_tmp13_, &_tmp14_); +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + keywords = _tmp15_; +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + keywords_length1 = _tmp14_; +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _keywords_size_ = keywords_length1; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp16_ = g_strdup (""); +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tags = _tmp16_; +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17_ = keywords; +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp17__length1 = keywords_length1; +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_tmp17_ != NULL) { +#line 4782 "TumblrPublishing.c" + gchar** _tmp18_; + gint _tmp18__length1; + gchar* _tmp19_; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp18_ = keywords; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp18__length1 = keywords_length1; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp19_ = _vala_g_strjoinv (",", _tmp18_, _tmp18__length1); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (tags); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + tags = _tmp19_; +#line 4796 "TumblrPublishing.c" + } +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp20_ = tags; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp21_ = soup_uri_encode (_tmp20_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp22_ = _tmp21_; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "tags", _tmp22_); +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp22_); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (tags); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (reqdata); +#line 4814 "TumblrPublishing.c" + } + goto __finally24; + __catch24_g_file_error: + { + GError* e = NULL; + GError* _tmp23_; +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + e = _inner_error_; +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _inner_error_ = NULL; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp23_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _ ("A temporary file needed for publishing is unavailable")); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _inner_error_ = _tmp23_; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_error_free0 (e); +#line 4831 "TumblrPublishing.c" + goto __finally24; + } + __finally24: +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 4845 "TumblrPublishing.c" + } else { +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 4855 "TumblrPublishing.c" + } + } +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_oauth1_upload_transaction_authorize (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction)); +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp25_ = publishing_rest_support_transaction_get_arguments (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_tmp24_); +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_arguments = _tmp25_; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_arguments_length1 = _tmp24_; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _request_arguments_size_ = request_arguments_length1; +#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp26_ = request_arguments; +#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp26__length1 = request_arguments_length1; +#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _vala_assert (_tmp26__length1 > 0, "request_arguments.length > 0"); +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp27_ = request_arguments; +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp27__length1 = request_arguments_length1; +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp28_ = publishing_rest_support_argument_serialize_list (_tmp27_, _tmp27__length1, FALSE, "&"); +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_data = _tmp28_; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp29_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp30_ = _tmp29_; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp31_ = soup_message_new ("POST", _tmp30_); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp32_ = _tmp31_; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp30_); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + outbound_message = _tmp32_; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp33_ = outbound_message; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp34_ = request_data; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp35_ = string_get_data (_tmp34_, &_tmp35__length1); +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp36_ = _tmp35_; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp36__length1 = _tmp35__length1; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + soup_message_set_request (_tmp33_, "application/x-www-form-urlencoded", SOUP_MEMORY_COPY, _tmp36_, (gsize) _tmp36__length1); +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp37_ = G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportOAuth1UploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction)->message_headers; +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp38_ = gee_abstract_map_map_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + i = _tmp38_; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp39_ = i; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp40_ = gee_map_iterator_next (_tmp39_); +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + cont = _tmp40_; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + while (TRUE) { +#line 4920 "TumblrPublishing.c" + gboolean _tmp41_; + SoupMessage* _tmp42_; + SoupMessageHeaders* _tmp43_; + GeeMapIterator* _tmp44_; + gpointer _tmp45_; + gchar* _tmp46_; + GeeMapIterator* _tmp47_; + gpointer _tmp48_; + gchar* _tmp49_; + GeeMapIterator* _tmp50_; + gboolean _tmp51_; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp41_ = cont; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (!_tmp41_) { +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + break; +#line 4938 "TumblrPublishing.c" + } +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp42_ = outbound_message; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp43_ = _tmp42_->request_headers; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp44_ = i; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp45_ = gee_map_iterator_get_key (_tmp44_); +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp46_ = (gchar*) _tmp45_; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp47_ = i; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp48_ = gee_map_iterator_get_value (_tmp47_); +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp49_ = (gchar*) _tmp48_; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + soup_message_headers_append (_tmp43_, _tmp46_, _tmp49_); +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp49_); +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (_tmp46_); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp50_ = i; +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp51_ = gee_map_iterator_next (_tmp50_); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + cont = _tmp51_; +#line 4968 "TumblrPublishing.c" + } +#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp52_ = outbound_message; +#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp52_); +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (i); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (outbound_message); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (request_data); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 4996 "TumblrPublishing.c" + } else { +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (i); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (outbound_message); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (request_data); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_clear_error (&_inner_error_); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return; +#line 5014 "TumblrPublishing.c" + } + } +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (i); +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (outbound_message); +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (request_data); +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + request_arguments = (_vala_array_free (request_arguments, request_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (payload); +#line 5027 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_upload_transaction_class_init (PublishingTumblrTumblrPublisherUploadTransactionClass * klass) { +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_upload_transaction_parent_class = g_type_class_peek_parent (klass); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->execute = (void (*) (PublishingRESTSupportTransaction *, GError**)) publishing_tumblr_tumblr_publisher_upload_transaction_real_execute; +#line 5036 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_upload_transaction_instance_init (PublishingTumblrTumblrPublisherUploadTransaction * self) { +} + + +GType publishing_tumblr_tumblr_publisher_upload_transaction_get_type (void) { + static volatile gsize publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUploadTransaction), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_upload_transaction_instance_init, NULL }; + GType publishing_tumblr_tumblr_publisher_upload_transaction_type_id; + publishing_tumblr_tumblr_publisher_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_UPLOAD_TRANSACTION, "PublishingTumblrTumblrPublisherUploadTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile, publishing_tumblr_tumblr_publisher_upload_transaction_type_id); + } + return publishing_tumblr_tumblr_publisher_upload_transaction_type_id__volatile; +} + + +PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_construct (GType object_type, PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url) { + PublishingTumblrTumblrPublisherUploader* self = NULL; + PublishingRESTSupportOAuth1Session* _tmp0_; + SpitPublishingPublishable** _tmp1_; + gint _tmp1__length1; + const gchar* _tmp2_; + gchar* _tmp3_; +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_OAUTH1_IS_SESSION (session), NULL); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (blog_url != NULL, NULL); +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = session; +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = publishables; +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1__length1 = publishables_length1; +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = (PublishingTumblrTumblrPublisherUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = blog_url; +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->blog_url); +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_url = _tmp3_; +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return self; +#line 5085 "TumblrPublishing.c" +} + + +PublishingTumblrTumblrPublisherUploader* publishing_tumblr_tumblr_publisher_uploader_new (PublishingRESTSupportOAuth1Session* session, SpitPublishingPublishable** publishables, int publishables_length1, const gchar* blog_url) { +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return publishing_tumblr_tumblr_publisher_uploader_construct (PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, session, publishables, publishables_length1, blog_url); +#line 5092 "TumblrPublishing.c" +} + + +static PublishingRESTSupportTransaction* publishing_tumblr_tumblr_publisher_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { + PublishingTumblrTumblrPublisherUploader * self; + PublishingRESTSupportTransaction* result = NULL; + PublishingRESTSupportSession* _tmp0_; + PublishingRESTSupportOAuth1Session* _tmp1_; + SpitPublishingPublishable* _tmp2_; + SpitPublishingPublishable* _tmp3_; + const gchar* _tmp4_; + PublishingTumblrTumblrPublisherUploadTransaction* _tmp5_; + PublishingRESTSupportTransaction* _tmp6_; +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader); +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_debug ("TumblrPublishing.vala:665: Create upload transaction"); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_OAUTH1_TYPE_SESSION, PublishingRESTSupportOAuth1Session); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp2_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp3_ = _tmp2_; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp4_ = self->priv->blog_url; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp5_ = publishing_tumblr_tumblr_publisher_upload_transaction_new (_tmp1_, _tmp3_, _tmp4_); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (_tmp3_); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + result = _tmp6_; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + return result; +#line 5134 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_uploader_class_init (PublishingTumblrTumblrPublisherUploaderClass * klass) { +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_uploader_parent_class = g_type_class_peek_parent (klass); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_tumblr_tumblr_publisher_uploader_finalize; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherUploaderPrivate)); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = (PublishingRESTSupportTransaction* (*) (PublishingRESTSupportBatchUploader *, SpitPublishingPublishable*)) publishing_tumblr_tumblr_publisher_uploader_real_create_transaction; +#line 5147 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_uploader_instance_init (PublishingTumblrTumblrPublisherUploader * self) { + gchar* _tmp0_; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_UPLOADER_GET_PRIVATE (self); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_strdup (""); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blog_url = _tmp0_; +#line 5159 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_uploader_finalize (PublishingRESTSupportBatchUploader * obj) { + PublishingTumblrTumblrPublisherUploader * self; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_TYPE_UPLOADER, PublishingTumblrTumblrPublisherUploader); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->blog_url); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_tumblr_tumblr_publisher_uploader_parent_class)->finalize (obj); +#line 5171 "TumblrPublishing.c" +} + + +GType publishing_tumblr_tumblr_publisher_uploader_get_type (void) { + static volatile gsize publishing_tumblr_tumblr_publisher_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_uploader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisherUploader), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_uploader_instance_init, NULL }; + GType publishing_tumblr_tumblr_publisher_uploader_type_id; + publishing_tumblr_tumblr_publisher_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingTumblrTumblrPublisherUploader", &g_define_type_info, 0); + g_once_init_leave (&publishing_tumblr_tumblr_publisher_uploader_type_id__volatile, publishing_tumblr_tumblr_publisher_uploader_type_id); + } + return publishing_tumblr_tumblr_publisher_uploader_type_id__volatile; +} + + +static void publishing_tumblr_tumblr_publisher_class_init (PublishingTumblrTumblrPublisherClass * klass) { +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_parent_class = g_type_class_peek_parent (klass); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingTumblrTumblrPublisherPrivate)); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_tumblr_tumblr_publisher_finalize; +#line 5194 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + publishing_tumblr_tumblr_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->get_service = (SpitPublishingService* (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_get_service; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->is_running = (gboolean (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_is_running; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->start = (void (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_start; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + iface->stop = (void (*) (SpitPublishingPublisher *)) publishing_tumblr_tumblr_publisher_real_stop; +#line 5209 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_instance_init (PublishingTumblrTumblrPublisher * self) { + gchar* _tmp0_; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv = PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_GET_PRIVATE (self); +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target = self; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->running = FALSE; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->was_started = FALSE; +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->session = NULL; +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->publishing_options_pane = NULL; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = NULL; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes_length1 = 0; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = NULL; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs_length1 = 0; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->_blogs_size_ = self->priv->blogs_length1; +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = g_strdup (""); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->username = _tmp0_; +#line 5247 "TumblrPublishing.c" +} + + +static void publishing_tumblr_tumblr_publisher_finalize (GObject * obj) { + PublishingTumblrTumblrPublisher * self; + SpitPublishingAuthenticator* _tmp0_; + guint _tmp1_; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_TUMBLR_TYPE_TUMBLR_PUBLISHER, PublishingTumblrTumblrPublisher); +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _tmp0_ = self->priv->authenticator; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_parse_name ("authenticated", SPIT_PUBLISHING_TYPE_AUTHENTICATOR, &_tmp1_, NULL, FALSE); +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_tumblr_tumblr_publisher_on_authenticator_authenticated_spit_publishing_authenticator_authenticated, self); +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->publishing_options_pane); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_tumblr_size_entry_unref), NULL); +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + self->priv->blogs = (_vala_array_free (self->priv->blogs, self->priv->blogs_length1, (GDestroyNotify) publishing_tumblr_blog_entry_unref), NULL); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_free0 (self->priv->username); +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + _g_object_unref0 (self->priv->authenticator); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" + G_OBJECT_CLASS (publishing_tumblr_tumblr_publisher_parent_class)->finalize (obj); +#line 5289 "TumblrPublishing.c" +} + + +GType publishing_tumblr_tumblr_publisher_get_type (void) { + static volatile gsize publishing_tumblr_tumblr_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_tumblr_tumblr_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingTumblrTumblrPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_tumblr_tumblr_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingTumblrTumblrPublisher), 0, (GInstanceInitFunc) publishing_tumblr_tumblr_publisher_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_tumblr_tumblr_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_tumblr_tumblr_publisher_type_id; + publishing_tumblr_tumblr_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingTumblrTumblrPublisher", &g_define_type_info, 0); + g_type_add_interface_static (publishing_tumblr_tumblr_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info); + g_once_init_leave (&publishing_tumblr_tumblr_publisher_type_id__volatile, publishing_tumblr_tumblr_publisher_type_id); + } + return publishing_tumblr_tumblr_publisher_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-publishing/TumblrPublishing.vala b/plugins/shotwell-publishing/TumblrPublishing.vala new file mode 100644 index 0000000..1da9c61 --- /dev/null +++ b/plugins/shotwell-publishing/TumblrPublishing.vala @@ -0,0 +1,673 @@ +/* Copyright 2012 BJA Electronics + * Author: Jeroen Arnoldus (b.j.arnoldus@bja-electronics.nl) + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +public class TumblrService : Object, Spit.Pluggable, Spit.Publishing.Service { + private const string ICON_FILENAME = "tumblr.png"; + + private static Gdk.Pixbuf[] icon_pixbuf_set = null; + + public TumblrService(GLib.File resource_directory) { + if (icon_pixbuf_set == null) + icon_pixbuf_set = + Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + + ICON_FILENAME); + } + + public int get_pluggable_interface(int min_host_interface, int max_host_interface) { + return Spit.negotiate_interfaces(min_host_interface, max_host_interface, + Spit.Publishing.CURRENT_INTERFACE); + } + + public unowned string get_id() { + return "org.yorba.shotwell.publishing.tumblr"; + } + + public unowned string get_pluggable_name() { + return "Tumblr"; + } + + public void get_info(ref Spit.PluggableInfo info) { + info.authors = "Jeroen Arnoldus"; + info.copyright = _("Copyright 2012 BJA Electronics"); + info.translators = Resources.TRANSLATORS; + info.version = _VERSION; + info.website_name = Resources.WEBSITE_NAME; + info.website_url = Resources.WEBSITE_URL; + info.is_license_wordwrapped = false; + info.license = Resources.LICENSE; + info.icons = icon_pixbuf_set; + } + + public void activation(bool enabled) { + } + + public Spit.Publishing.Publisher create_publisher(Spit.Publishing.PluginHost host) { + return new Publishing.Tumblr.TumblrPublisher(this, host); + } + + public Spit.Publishing.Publisher.MediaType get_supported_media() { + return (Spit.Publishing.Publisher.MediaType.PHOTO | + Spit.Publishing.Publisher.MediaType.VIDEO); + } +} + +namespace Publishing.Tumblr { + + internal const string SERVICE_NAME = "Tumblr"; + internal const string ENDPOINT_URL = "https://www.tumblr.com/"; + internal const string ENCODE_RFC_3986_EXTRA = "!*'();:@&=+$,/?%#[] \\"; + internal const int ORIGINAL_SIZE = -1; + + + + private class BlogEntry { + public string blog; + public string url; + public BlogEntry(string creator_blog, string creator_url) { + blog = creator_blog; + url = creator_url; + } + } + + private class SizeEntry { + public string title; + public int size; + + public SizeEntry(string creator_title, int creator_size) { + title = creator_title; + size = creator_size; + } + } + + public class TumblrPublisher : Spit.Publishing.Publisher, GLib.Object { + private Spit.Publishing.Service service; + private Spit.Publishing.PluginHost host; + private Spit.Publishing.ProgressCallback progress_reporter = null; + private bool running = false; + private bool was_started = false; + private Publishing.RESTSupport.OAuth1.Session session = null; + private PublishingOptionsPane publishing_options_pane = null; + private SizeEntry[] sizes = null; + private BlogEntry[] blogs = null; + private string username = ""; + private Spit.Publishing.Authenticator authenticator; + + + private SizeEntry[] create_sizes() { + SizeEntry[] result = new SizeEntry[0]; + + result += new SizeEntry(_("500 × 375 pixels"), 500); + result += new SizeEntry(_("1024 × 768 pixels"), 1024); + result += new SizeEntry(_("1280 × 853 pixels"), 1280); + //Larger images make no sense for Tumblr + // result += new SizeEntry(_("2048 × 1536 pixels"), 2048); + // result += new SizeEntry(_("4096 × 3072 pixels"), 4096); + // result += new SizeEntry(_("Original size"), ORIGINAL_SIZE); + + return result; + } + + private BlogEntry[] create_blogs() { + BlogEntry[] result = new BlogEntry[0]; + + + return result; + } + + public TumblrPublisher(Spit.Publishing.Service service, + Spit.Publishing.PluginHost host) { + debug("TumblrPublisher instantiated."); + this.service = service; + this.host = host; + this.session = new Publishing.RESTSupport.OAuth1.Session(ENDPOINT_URL); + this.sizes = this.create_sizes(); + this.blogs = this.create_blogs(); + + this.authenticator = Publishing.Authenticator.Factory.get_instance().create("tumblr", host); + this.authenticator.authenticated.connect(on_authenticator_authenticated); + } + + ~TumblrPublisher() { + this.authenticator.authenticated.disconnect(on_authenticator_authenticated); + } + + // Publisher interface implementation + + public Spit.Publishing.Service get_service() { + return service; + } + + public Spit.Publishing.PluginHost get_host() { + return host; + } + + public bool is_running() { + return running; + } + + internal int get_persistent_default_size() { + return host.get_config_int("default_size", 1); + } + + internal void set_persistent_default_size(int size) { + host.set_config_int("default_size", size); + } + + internal int get_persistent_default_blog() { + return host.get_config_int("default_blog", 0); + } + + internal void set_persistent_default_blog(int blog) { + host.set_config_int("default_blog", blog); + } + + // Actions and events implementation + + private void on_authenticator_authenticated() { + if (!is_running()) + return; + + debug("EVENT: a fully authenticated session has become available"); + + var params = this.authenticator.get_authentication_parameter(); + Variant consumer_key = null; + Variant consumer_secret = null; + Variant auth_token = null; + Variant auth_token_secret = null; + + params.lookup_extended("ConsumerKey", null, out consumer_key); + params.lookup_extended("ConsumerSecret", null, out consumer_secret); + session.set_api_credentials(consumer_key.get_string(), consumer_secret.get_string()); + + params.lookup_extended("AuthToken", null, out auth_token); + params.lookup_extended("AuthTokenSecret", null, out auth_token_secret); + session.set_access_phase_credentials(auth_token.get_string(), + auth_token_secret.get_string(), ""); + + + do_get_blogs(); + } + + private void do_get_blogs() { + debug("ACTION: obtain all blogs of the tumblr user"); + UserInfoFetchTransaction txn = new UserInfoFetchTransaction(session); + txn.completed.connect(on_info_request_txn_completed); + txn.network_error.connect(on_info_request_txn_error); + + try { + txn.execute(); + } catch (Spit.Publishing.PublishingError err) { + host.post_error(err); + } + + + } + + + private void on_info_request_txn_completed(Publishing.RESTSupport.Transaction txn) { + txn.completed.disconnect(on_info_request_txn_completed); + txn.network_error.disconnect(on_info_request_txn_error); + + if (!is_running()) + return; + + debug("EVENT: user info request transaction completed; response = '%s'", + txn.get_response()); + do_parse_token_info_from_user_request(txn.get_response()); + do_show_publishing_options_pane(); + } + + + private void do_parse_token_info_from_user_request(string response) { + debug("ACTION: parsing info request response '%s' into list of available blogs", response); + try { + var parser = new Json.Parser(); + parser.load_from_data (response, -1); + var root_object = parser.get_root().get_object(); + this.username = root_object.get_object_member("response").get_object_member("user").get_string_member ("name"); + debug("Got user name: %s",username); + foreach (var blognode in root_object.get_object_member("response").get_object_member("user").get_array_member("blogs").get_elements ()) { + var blog = blognode.get_object (); + string name = blog.get_string_member ("name"); + string url = blog.get_string_member ("url").replace("http://","").replace("/",""); + debug("Got blog name: %s and url: %s", name, url); + this.blogs += new BlogEntry(name,url); + } + } catch (Error err) { + host.post_error(err); + } + } + + private void on_info_request_txn_error(Publishing.RESTSupport.Transaction txn, + Spit.Publishing.PublishingError err) { + txn.completed.disconnect(on_info_request_txn_completed); + txn.network_error.disconnect(on_info_request_txn_error); + + if (!is_running()) + return; + + session.deauthenticate(); + //invalidate_persistent_session(); + debug("EVENT: user info request transaction caused a network error"); + host.post_error(err); + } + + private void do_show_publishing_options_pane() { + debug("ACTION: displaying publishing options pane"); + host.set_service_locked(false); + PublishingOptionsPane publishing_options_pane = + new PublishingOptionsPane(this, host.get_publishable_media_type(), this.sizes, this.blogs, this.username); + publishing_options_pane.publish.connect(on_publishing_options_pane_publish); + publishing_options_pane.logout.connect(on_publishing_options_pane_logout); + host.install_dialog_pane(publishing_options_pane); + } + + + + private void on_publishing_options_pane_publish() { + if (publishing_options_pane != null) { + publishing_options_pane.publish.disconnect(on_publishing_options_pane_publish); + publishing_options_pane.logout.disconnect(on_publishing_options_pane_logout); + } + + if (!is_running()) + return; + + debug("EVENT: user clicked the 'Publish' button in the publishing options pane"); + do_publish(); + } + + private void on_publishing_options_pane_logout() { + if (publishing_options_pane != null) { + publishing_options_pane.publish.disconnect(on_publishing_options_pane_publish); + publishing_options_pane.logout.disconnect(on_publishing_options_pane_logout); + } + + if (!is_running()) + return; + + debug("EVENT: user clicked the 'Logout' button in the publishing options pane"); + + do_logout(); + } + + public static int tumblr_date_time_compare_func(Spit.Publishing.Publishable a, + Spit.Publishing.Publishable b) { + return a.get_exposure_date_time().compare(b.get_exposure_date_time()); + } + + private void do_publish() { + debug("ACTION: uploading media items to remote server."); + + host.set_service_locked(true); + + progress_reporter = host.serialize_publishables(sizes[get_persistent_default_size()].size); + + // Serialization is a long and potentially cancellable operation, so before we use + // the publishables, make sure that the publishing interaction is still running. If it + // isn't the publishing environment may be partially torn down so do a short-circuit + // return + if (!is_running()) + return; + + // Sort publishables in reverse-chronological order. + Spit.Publishing.Publishable[] publishables = host.get_publishables(); + Gee.ArrayList<Spit.Publishing.Publishable> sorted_list = + new Gee.ArrayList<Spit.Publishing.Publishable>(); + foreach (Spit.Publishing.Publishable p in publishables) { + debug("ACTION: add publishable"); + sorted_list.add(p); + } + sorted_list.sort(tumblr_date_time_compare_func); + string blog_url = this.blogs[get_persistent_default_blog()].url; + + Uploader uploader = new Uploader(session, sorted_list.to_array(),blog_url); + uploader.upload_complete.connect(on_upload_complete); + uploader.upload_error.connect(on_upload_error); + uploader.upload(on_upload_status_updated); + } + + private void do_show_success_pane() { + debug("ACTION: showing success pane."); + + host.set_service_locked(false); + host.install_success_pane(); + } + + + private void on_upload_status_updated(int file_number, double completed_fraction) { + if (!is_running()) + return; + + debug("EVENT: uploader reports upload %.2f percent complete.", 100.0 * completed_fraction); + + assert(progress_reporter != null); + + progress_reporter(file_number, completed_fraction); + } + + private void on_upload_complete(Publishing.RESTSupport.BatchUploader uploader, + int num_published) { + if (!is_running()) + return; + + debug("EVENT: uploader reports upload complete; %d items published.", num_published); + + uploader.upload_complete.disconnect(on_upload_complete); + uploader.upload_error.disconnect(on_upload_error); + + do_show_success_pane(); + } + + private void on_upload_error(Publishing.RESTSupport.BatchUploader uploader, + Spit.Publishing.PublishingError err) { + if (!is_running()) + return; + + debug("EVENT: uploader reports upload error = '%s'.", err.message); + + uploader.upload_complete.disconnect(on_upload_complete); + uploader.upload_error.disconnect(on_upload_error); + + host.post_error(err); + } + + + private void do_logout() { + debug("ACTION: logging user out, deauthenticating session, and erasing stored credentials"); + + if (this.authenticator.can_logout()) { + this.authenticator.logout(); + } + + running = false; + + attempt_start(); + } + + public void attempt_start() { + if (is_running()) + return; + + debug("TumblrPublisher: starting interaction."); + + running = true; + this.authenticator.authenticate(); + } + + public void start() { + if (is_running()) + return; + + if (was_started) + error(_("TumblrPublisher: start( ): can’t start; this publisher is not restartable.")); + + debug("TumblrPublisher: starting interaction."); + + attempt_start(); + } + + public void stop() { + debug("TumblrPublisher: stop( ) invoked."); + + // if (session != null) + // session.stop_transactions(); + + running = false; + } + + + // UI elements + + + /** + * The publishing options pane. + */ + + + internal class PublishingOptionsPane : Spit.Publishing.DialogPane, GLib.Object { + + + + private Gtk.Builder builder; + private Gtk.Box pane_widget = null; + private Gtk.Label upload_info_label = null; + private Gtk.Label size_label = null; + private Gtk.Label blog_label = null; + private Gtk.Button logout_button = null; + private Gtk.Button publish_button = null; + private Gtk.ComboBoxText size_combo = null; + private Gtk.ComboBoxText blog_combo = null; + private SizeEntry[] sizes = null; + private BlogEntry[] blogs = null; + private string username = ""; + private TumblrPublisher publisher = null; + private Spit.Publishing.Publisher.MediaType media_type; + + public signal void publish(); + public signal void logout(); + + public PublishingOptionsPane(TumblrPublisher publisher, Spit.Publishing.Publisher.MediaType media_type, SizeEntry[] sizes, BlogEntry[] blogs, string username) { + + this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); + this.username = username; + this.publisher = publisher; + this.media_type = media_type; + this.sizes = sizes; + this.blogs=blogs; + + try { + builder = new Gtk.Builder(); + builder.add_from_resource (Resources.RESOURCE_PATH + + "/tumblr_publishing_options_pane.ui"); + builder.connect_signals(null); + + // pull in the necessary widgets from the glade file + pane_widget = (Gtk.Box) this.builder.get_object("tumblr_pane"); + upload_info_label = (Gtk.Label) this.builder.get_object("upload_info_label"); + logout_button = (Gtk.Button) this.builder.get_object("logout_button"); + publish_button = (Gtk.Button) this.builder.get_object("publish_button"); + size_combo = (Gtk.ComboBoxText) this.builder.get_object("size_combo"); + size_label = (Gtk.Label) this.builder.get_object("size_label"); + blog_combo = (Gtk.ComboBoxText) this.builder.get_object("blog_combo"); + blog_label = (Gtk.Label) this.builder.get_object("blog_label"); + + + string upload_label_text = _("You are logged into Tumblr as %s.\n\n").printf(this.username); + upload_info_label.set_label(upload_label_text); + + populate_blog_combo(); + blog_combo.changed.connect(on_blog_changed); + + if ((media_type != Spit.Publishing.Publisher.MediaType.VIDEO)) { + populate_size_combo(); + size_combo.changed.connect(on_size_changed); + } else { + // publishing -only- video - don't let the user manipulate the photo size choices. + size_combo.set_sensitive(false); + size_label.set_sensitive(false); + } + + logout_button.clicked.connect(on_logout_clicked); + publish_button.clicked.connect(on_publish_clicked); + } catch (Error e) { + warning(_("Could not load UI: %s"), e.message); + } + } + + + + + + private void on_logout_clicked() { + logout(); + } + + private void on_publish_clicked() { + + + publish(); + } + + + private void populate_blog_combo() { + if (blogs != null) { + foreach (BlogEntry b in blogs) + blog_combo.append_text(b.blog); + blog_combo.set_active(publisher.get_persistent_default_blog()); + } + } + + private void on_blog_changed() { + publisher.set_persistent_default_blog(blog_combo.get_active()); + } + + private void populate_size_combo() { + if (sizes != null) { + foreach (SizeEntry e in sizes) + size_combo.append_text(e.title); + size_combo.set_active(publisher.get_persistent_default_size()); + } + } + + private void on_size_changed() { + publisher.set_persistent_default_size(size_combo.get_active()); + } + + + protected void notify_publish() { + publish(); + } + + protected void notify_logout() { + logout(); + } + + public Gtk.Widget get_widget() { + return pane_widget; + } + + public Spit.Publishing.DialogPane.GeometryOptions get_preferred_geometry() { + return Spit.Publishing.DialogPane.GeometryOptions.NONE; + } + + public void on_pane_installed() { + publish.connect(notify_publish); + logout.connect(notify_logout); + } + + public void on_pane_uninstalled() { + publish.disconnect(notify_publish); + logout.disconnect(notify_logout); + } + } + + internal class UserInfoFetchTransaction : Publishing.RESTSupport.OAuth1.Transaction { + public UserInfoFetchTransaction(Publishing.RESTSupport.OAuth1.Session session) { + base.with_uri(session, "https://api.tumblr.com/v2/user/info", + Publishing.RESTSupport.HttpMethod.POST); + } + } + + internal class UploadTransaction : Publishing.RESTSupport.OAuth1.UploadTransaction { + //Workaround for Soup.URI.encode() to support binary data (i.e. string with \0) + private string encode( uint8[] data ){ + var s = new StringBuilder(); + char[] bytes = new char[2]; + bytes[1] = 0; + foreach( var byte in data ) + { + if(byte == 0) { + s.append( "%00" ); + } else { + bytes[0] = (char)byte; + s.append( Soup.URI.encode((string) bytes, ENCODE_RFC_3986_EXTRA) ); + } + } + return s.str; + } + + + public UploadTransaction(Publishing.RESTSupport.OAuth1.Session session,Spit.Publishing.Publishable publishable, string blog_url) { + debug("Init upload transaction"); + base(session, publishable,"https://api.tumblr.com/v2/blog/%s/post".printf(blog_url) ); + + } + + public override void execute() throws Spit.Publishing.PublishingError { + string payload; + size_t payload_length; + try { + FileUtils.get_contents(base.publishable.get_serialized_file().get_path(), out payload, + out payload_length); + + string reqdata = this.encode(payload.data[0:payload_length]); + + + + add_argument("data[0]", reqdata); + add_argument("type", "photo"); + string[] keywords = base.publishable.get_publishing_keywords(); + string tags = ""; + if (keywords != null) { + tags = string.joinv (",", keywords); + } + add_argument("tags", Soup.URI.encode(tags, ENCODE_RFC_3986_EXTRA)); + + } catch (FileError e) { + throw new Spit.Publishing.PublishingError.LOCAL_FILE_ERROR( + _("A temporary file needed for publishing is unavailable")); + + } + + this.authorize(); + + Publishing.RESTSupport.Argument[] request_arguments = get_arguments(); + assert(request_arguments.length > 0); + + var request_data = Publishing.RESTSupport.Argument.serialize_list(request_arguments); + + Soup.Message outbound_message = new Soup.Message( "POST", get_endpoint_url()); + outbound_message.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, request_data.data); + + // TODO: there must be a better way to iterate over a map + Gee.MapIterator<string, string> i = base.message_headers.map_iterator(); + bool cont = i.next(); + while(cont) { + outbound_message.request_headers.append(i.get_key(), i.get_value()); + cont = i.next(); + } + set_message(outbound_message); + + set_is_executed(true); + + send(); + } + } + + + + internal class Uploader : Publishing.RESTSupport.BatchUploader { + private string blog_url = ""; + public Uploader(Publishing.RESTSupport.OAuth1.Session session, Spit.Publishing.Publishable[] publishables, string blog_url) { + base(session, publishables); + this.blog_url=blog_url; + + } + + + protected override Publishing.RESTSupport.Transaction create_transaction( + Spit.Publishing.Publishable publishable) { + debug("Create upload transaction"); + return new UploadTransaction((Publishing.RESTSupport.OAuth1.Session) get_session(), get_current_publishable(), this.blog_url); + + } + } + + } //class TumblrPublisher + +} //namespace Publishing.Tumblr diff --git a/plugins/shotwell-publishing/YouTubePublishing.c b/plugins/shotwell-publishing/YouTubePublishing.c index 4be28b4..c94360b 100644 --- a/plugins/shotwell-publishing/YouTubePublishing.c +++ b/plugins/shotwell-publishing/YouTubePublishing.c @@ -349,7 +349,7 @@ static gint you_tube_service_real_get_pluggable_interface (SpitPluggable* base, static const gchar* you_tube_service_real_get_id (SpitPluggable* base); static const gchar* you_tube_service_real_get_pluggable_name (SpitPluggable* base); static void you_tube_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); -static GdkPixbuf** _vala_array_dup9 (GdkPixbuf** self, int length); +static GdkPixbuf** _vala_array_dup11 (GdkPixbuf** self, int length); static SpitPublishingPublisher* you_tube_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); @@ -437,9 +437,9 @@ static void _publishing_you_tube_publishing_options_pane_on_publish_clicked_gtk_ static void publishing_you_tube_publishing_options_pane_update_publish_button_sensitivity (PublishingYouTubePublishingOptionsPane* self); static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_new (const gchar* description, PublishingYouTubePrivacySetting privacy_setting); static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, PublishingYouTubePrivacySetting privacy_setting); -static void _vala_array_add32 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); -static void _vala_array_add33 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); -static void _vala_array_add34 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add35 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add36 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add37 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); static GtkWidget* publishing_you_tube_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); static SpitPublishingDialogPaneGeometryOptions publishing_you_tube_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); static void publishing_you_tube_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); @@ -576,7 +576,7 @@ static gpointer _g_object_ref0 (gpointer self) { } -static GdkPixbuf** _vala_array_dup9 (GdkPixbuf** self, int length) { +static GdkPixbuf** _vala_array_dup11 (GdkPixbuf** self, int length) { GdkPixbuf** result; int i; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -663,7 +663,7 @@ static void you_tube_service_real_get_info (SpitPluggable* base, SpitPluggableIn #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp7__length1 = you_tube_service_icon_pixbuf_set_length1; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" - _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup9 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); + _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup11 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp8__length1 = _tmp7__length1; #line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -1742,11 +1742,11 @@ static void publishing_you_tube_you_tube_publisher_do_show_publishing_options_pa #line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1740 "YouTubePublishing.c" - goto __catch20_g_error; + goto __catch25_g_error; } } - goto __finally20; - __catch20_g_error: + goto __finally25; + __catch25_g_error: { GError* e = NULL; GError* _tmp2_; @@ -1783,7 +1783,7 @@ static void publishing_you_tube_you_tube_publisher_do_show_publishing_options_pa return; #line 1779 "YouTubePublishing.c" } - __finally20: + __finally25: #line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2469,7 +2469,7 @@ static void publishing_you_tube_publishing_options_pane_update_publish_button_se } -static void _vala_array_add32 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add35 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { #line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if ((*length) == (*size)) { #line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2486,7 +2486,7 @@ static void _vala_array_add32 (PublishingYouTubePublishingOptionsPanePrivacyDesc } -static void _vala_array_add33 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add36 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if ((*length) == (*size)) { #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2503,7 +2503,7 @@ static void _vala_array_add33 (PublishingYouTubePublishingOptionsPanePrivacyDesc } -static void _vala_array_add34 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +static void _vala_array_add37 (PublishingYouTubePublishingOptionsPanePrivacyDescription** * array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if ((*length) == (*size)) { #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2554,7 +2554,7 @@ static PublishingYouTubePublishingOptionsPanePrivacyDescription** publishing_you #line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp2_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_ ("Public listed"), PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC); #line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" - _vala_array_add32 (&_result_, &_result__length1, &__result__size_, _tmp2_); + _vala_array_add35 (&_result_, &_result__length1, &__result__size_, _tmp2_); #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp3_ = _result_; #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2562,7 +2562,7 @@ static PublishingYouTubePublishingOptionsPanePrivacyDescription** publishing_you #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp4_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_ ("Public unlisted"), PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED); #line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" - _vala_array_add33 (&_result_, &_result__length1, &__result__size_, _tmp4_); + _vala_array_add36 (&_result_, &_result__length1, &__result__size_, _tmp4_); #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp5_ = _result_; #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -2570,7 +2570,7 @@ static PublishingYouTubePublishingOptionsPanePrivacyDescription** publishing_you #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp6_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_ ("Private"), PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE); #line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" - _vala_array_add34 (&_result_, &_result__length1, &__result__size_, _tmp6_); + _vala_array_add37 (&_result_, &_result__length1, &__result__size_, _tmp6_); #line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp7_ = _result_; #line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -3143,11 +3143,11 @@ static void ___lambda4_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res) { #line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 3139 "YouTubePublishing.c" - goto __catch22_g_error; + goto __catch27_g_error; } } - goto __finally22; - __catch22_g_error: + goto __finally27; + __catch27_g_error: { GError* _error_ = NULL; GError* _tmp1_; @@ -3166,7 +3166,7 @@ static void ___lambda4_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res) { _g_error_free0 (_error_); #line 3161 "YouTubePublishing.c" } - __finally22: + __finally27: #line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" @@ -3350,7 +3350,7 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS #line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _data1_ = NULL; #line 3346 "YouTubePublishing.c" - goto __catch21_g_error; + goto __catch26_g_error; } #line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp24_ = self->priv->youtube_service; @@ -3375,7 +3375,7 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS #line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _data1_ = NULL; #line 3371 "YouTubePublishing.c" - goto __catch21_g_error; + goto __catch26_g_error; } #line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp30_ = file; @@ -3394,7 +3394,7 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS #line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _data1_ = NULL; #line 3390 "YouTubePublishing.c" - goto __catch21_g_error; + goto __catch26_g_error; } #line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp32_ = g_main_loop_new (NULL, FALSE); @@ -3433,7 +3433,7 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS #line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _data1_ = NULL; #line 3429 "YouTubePublishing.c" - goto __catch21_g_error; + goto __catch26_g_error; } #line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" _tmp41_ = _tmp37_; @@ -3457,8 +3457,8 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS _data1_ = NULL; #line 3452 "YouTubePublishing.c" } - goto __finally21; - __catch21_g_error: + goto __finally26; + __catch26_g_error: { GError* _error_ = NULL; GError* _tmp42_; @@ -3477,7 +3477,7 @@ static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTS _g_error_free0 (_error_); #line 3472 "YouTubePublishing.c" } - __finally21: + __finally26: #line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" diff --git a/plugins/shotwell-publishing/meson.build b/plugins/shotwell-publishing/meson.build new file mode 100644 index 0000000..45058b8 --- /dev/null +++ b/plugins/shotwell-publishing/meson.build @@ -0,0 +1,25 @@ +shotwell_publishing_sources = [ + 'shotwell-publishing.vala', + 'FacebookPublishing.vala', + 'PicasaPublishing.vala', + 'FlickrPublishing.vala', + 'TumblrPublishing.vala', + 'YouTubePublishing.vala', + 'PiwigoPublishing.vala'] + +shotwell_publishing_resources = gnome.compile_resources('publishing-resource', + 'org.gnome.Shotwell.Publishing.gresource.xml', + source_dir : meson.source_root()) + +shared_module('shotwell-publishing', + shotwell_publishing_sources + shotwell_publishing_resources, + dependencies : [gtk, soup, gexiv2, gee, sw_plugin, json_glib, + webkit, sw_plugin_common_dep, xml, gdata, gcr, + gcr_ui, authenticator_dep], + vala_args : [ + '--gresources', 'org.gnome.Shotwell.Publishing.gresource.xml' + ], + c_args : ['-DPLUGIN_RESOURCE_PATH="/org/gnome/Shotwell/Publishing"', + '-DGCR_API_SUBJECT_TO_CHANGE'], + install: true, + install_dir : shotwell_plugin_dir) diff --git a/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml b/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml index b09902e..5e8ce1c 100644 --- a/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml +++ b/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml @@ -6,6 +6,7 @@ <file>picasa.png</file> <file>piwigo.png</file> <file>youtube.png</file> + <file>tumblr.png</file> <file>facebook_publishing_options_pane.ui</file> <file>flickr_publishing_options_pane.ui</file> <file>picasa_publishing_options_pane.ui</file> @@ -13,5 +14,6 @@ <file>piwigo_publishing_options_pane.ui</file> <file>piwigo_ssl_failure_pane.ui</file> <file>youtube_publishing_options_pane.ui</file> + <file>tumblr_publishing_options_pane.ui</file> </gresource> </gresources> diff --git a/plugins/shotwell-publishing/shotwell-publishing.c b/plugins/shotwell-publishing/shotwell-publishing.c index 8d7d080..21056e4 100644 --- a/plugins/shotwell-publishing/shotwell-publishing.c +++ b/plugins/shotwell-publishing/shotwell-publishing.c @@ -79,6 +79,16 @@ typedef struct _YouTubeServiceClass YouTubeServiceClass; typedef struct _PiwigoService PiwigoService; typedef struct _PiwigoServiceClass PiwigoServiceClass; + +#define TYPE_TUMBLR_SERVICE (tumblr_service_get_type ()) +#define TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TUMBLR_SERVICE, TumblrService)) +#define TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) +#define IS_TUMBLR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TUMBLR_SERVICE)) +#define IS_TUMBLR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TUMBLR_SERVICE)) +#define TUMBLR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TUMBLR_SERVICE, TumblrServiceClass)) + +typedef struct _TumblrService TumblrService; +typedef struct _TumblrServiceClass TumblrServiceClass; #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) struct _ShotwellPublishingCoreServices { @@ -127,6 +137,10 @@ PiwigoService* piwigo_service_new (GFile* resource_directory); PiwigoService* piwigo_service_construct (GType object_type, GFile* resource_directory); GType piwigo_service_get_type (void) G_GNUC_CONST; static void _vala_array_add5 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); +TumblrService* tumblr_service_new (GFile* resource_directory); +TumblrService* tumblr_service_construct (GType object_type, GFile* resource_directory); +GType tumblr_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add6 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value); static const gchar* shotwell_publishing_core_services_real_get_module_name (SpitModule* base); static const gchar* shotwell_publishing_core_services_real_get_version (SpitModule* base); static const gchar* shotwell_publishing_core_services_real_get_id (SpitModule* base); @@ -144,13 +158,13 @@ static void _vala_array_add1 (SpitPluggable** * array, int* length, int* size, S *size = (*size) ? (2 * (*size)) : 4; #line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 148 "shotwell-publishing.c" +#line 162 "shotwell-publishing.c" } #line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[(*length)++] = value; #line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[*length] = NULL; -#line 154 "shotwell-publishing.c" +#line 168 "shotwell-publishing.c" } @@ -161,13 +175,13 @@ static void _vala_array_add2 (SpitPluggable** * array, int* length, int* size, S *size = (*size) ? (2 * (*size)) : 4; #line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 165 "shotwell-publishing.c" +#line 179 "shotwell-publishing.c" } #line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[(*length)++] = value; #line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[*length] = NULL; -#line 171 "shotwell-publishing.c" +#line 185 "shotwell-publishing.c" } @@ -178,13 +192,13 @@ static void _vala_array_add3 (SpitPluggable** * array, int* length, int* size, S *size = (*size) ? (2 * (*size)) : 4; #line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 182 "shotwell-publishing.c" +#line 196 "shotwell-publishing.c" } #line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[(*length)++] = value; #line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[*length] = NULL; -#line 188 "shotwell-publishing.c" +#line 202 "shotwell-publishing.c" } @@ -195,13 +209,13 @@ static void _vala_array_add4 (SpitPluggable** * array, int* length, int* size, S *size = (*size) ? (2 * (*size)) : 4; #line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 199 "shotwell-publishing.c" +#line 213 "shotwell-publishing.c" } #line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[(*length)++] = value; #line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[*length] = NULL; -#line 205 "shotwell-publishing.c" +#line 219 "shotwell-publishing.c" } @@ -212,13 +226,30 @@ static void _vala_array_add5 (SpitPluggable** * array, int* length, int* size, S *size = (*size) ? (2 * (*size)) : 4; #line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *array = g_renew (SpitPluggable*, *array, (*size) + 1); -#line 216 "shotwell-publishing.c" +#line 230 "shotwell-publishing.c" } #line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[(*length)++] = value; #line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*array)[*length] = NULL; -#line 222 "shotwell-publishing.c" +#line 236 "shotwell-publishing.c" +} + + +static void _vala_array_add6 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) { +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 247 "shotwell-publishing.c" + } +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 253 "shotwell-publishing.c" } @@ -250,6 +281,12 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy gint _tmp31__length1; GFile* _tmp32_; PiwigoService* _tmp33_; + SpitPluggable** _tmp34_; + gint _tmp34__length1; + GFile* _tmp35_; + GFile* _tmp36_; + GFile* _tmp37_; + TumblrService* _tmp38_; #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" g_return_val_if_fail (G_IS_FILE (module_file), NULL); #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" @@ -294,7 +331,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp12_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection), "facebook"); #line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (_tmp12_) { -#line 298 "shotwell-publishing.c" +#line 335 "shotwell-publishing.c" SpitPluggable** _tmp13_; gint _tmp13__length1; GFile* _tmp14_; @@ -309,7 +346,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp15_ = facebook_service_new (_tmp14_); #line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _vala_array_add1 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 313 "shotwell-publishing.c" +#line 350 "shotwell-publishing.c" } #line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp16_ = authenicators; @@ -317,7 +354,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp17_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), "picasa"); #line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (_tmp17_) { -#line 321 "shotwell-publishing.c" +#line 358 "shotwell-publishing.c" SpitPluggable** _tmp18_; gint _tmp18__length1; GFile* _tmp19_; @@ -332,7 +369,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp20_ = picasa_service_new (_tmp19_); #line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _vala_array_add2 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 336 "shotwell-publishing.c" +#line 373 "shotwell-publishing.c" } #line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp21_ = authenicators; @@ -340,7 +377,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp22_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection), "flickr"); #line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (_tmp22_) { -#line 344 "shotwell-publishing.c" +#line 381 "shotwell-publishing.c" SpitPluggable** _tmp23_; gint _tmp23__length1; GFile* _tmp24_; @@ -355,7 +392,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp25_ = flickr_service_new (_tmp24_); #line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _vala_array_add3 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 359 "shotwell-publishing.c" +#line 396 "shotwell-publishing.c" } #line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp26_ = authenicators; @@ -363,7 +400,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp27_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_COLLECTION, GeeCollection), "youtube"); #line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (_tmp27_) { -#line 367 "shotwell-publishing.c" +#line 404 "shotwell-publishing.c" SpitPluggable** _tmp28_; gint _tmp28__length1; GFile* _tmp29_; @@ -378,7 +415,7 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp30_ = you_tube_service_new (_tmp29_); #line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _vala_array_add4 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); -#line 382 "shotwell-publishing.c" +#line 419 "shotwell-publishing.c" } #line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp31_ = self->priv->pluggables; @@ -390,6 +427,22 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _tmp33_ = piwigo_service_new (_tmp32_); #line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _vala_array_add5 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp34_ = self->priv->pluggables; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp34__length1 = self->priv->pluggables_length1; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp35_ = module_file; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp36_ = g_file_get_parent (_tmp35_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp37_ = _tmp36_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp38_ = tumblr_service_new (_tmp37_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add6 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _g_object_unref0 (_tmp37_); #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _g_object_unref0 (authenicators); #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" @@ -398,53 +451,53 @@ ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GTy _g_object_unref0 (resource_directory); #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return self; -#line 402 "shotwell-publishing.c" +#line 455 "shotwell-publishing.c" } ShotwellPublishingCoreServices* shotwell_publishing_core_services_new (GFile* module_file) { #line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return shotwell_publishing_core_services_construct (TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, module_file); -#line 409 "shotwell-publishing.c" +#line 462 "shotwell-publishing.c" } static const gchar* shotwell_publishing_core_services_real_get_module_name (SpitModule* base) { ShotwellPublishingCoreServices * self; const gchar* result = NULL; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" result = _ ("Core Publishing Services"); -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return result; -#line 422 "shotwell-publishing.c" +#line 475 "shotwell-publishing.c" } static const gchar* shotwell_publishing_core_services_real_get_version (SpitModule* base) { ShotwellPublishingCoreServices * self; const gchar* result = NULL; -#line 58 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" result = _VERSION; -#line 59 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return result; -#line 435 "shotwell-publishing.c" +#line 488 "shotwell-publishing.c" } static const gchar* shotwell_publishing_core_services_real_get_id (SpitModule* base) { ShotwellPublishingCoreServices * self; const gchar* result = NULL; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" result = "org.yorba.shotwell.publishing.core_services"; -#line 63 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return result; -#line 448 "shotwell-publishing.c" +#line 501 "shotwell-publishing.c" } @@ -455,27 +508,27 @@ static SpitPluggable** shotwell_publishing_core_services_real_get_pluggables (Sp gint _tmp0__length1; SpitPluggable** _tmp1_; gint _tmp1__length1; -#line 66 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp0_ = self->priv->pluggables; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp0__length1 = self->priv->pluggables_length1; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp1_ = _tmp0_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp1__length1 = _tmp0__length1; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (result_length1) { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" *result_length1 = _tmp1__length1; -#line 473 "shotwell-publishing.c" +#line 526 "shotwell-publishing.c" } -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" result = _tmp1_; -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return result; -#line 479 "shotwell-publishing.c" +#line 532 "shotwell-publishing.c" } @@ -486,7 +539,7 @@ static void shotwell_publishing_core_services_class_init (ShotwellPublishingCore g_type_class_add_private (klass, sizeof (ShotwellPublishingCoreServicesPrivate)); #line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" G_OBJECT_CLASS (klass)->finalize = shotwell_publishing_core_services_finalize; -#line 490 "shotwell-publishing.c" +#line 543 "shotwell-publishing.c" } @@ -501,7 +554,7 @@ static void shotwell_publishing_core_services_spit_module_interface_init (SpitMo iface->get_id = (const gchar* (*) (SpitModule *)) shotwell_publishing_core_services_real_get_id; #line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" iface->get_pluggables = (SpitPluggable** (*) (SpitModule *, int*)) shotwell_publishing_core_services_real_get_pluggables; -#line 505 "shotwell-publishing.c" +#line 558 "shotwell-publishing.c" } @@ -517,7 +570,7 @@ static void shotwell_publishing_core_services_instance_init (ShotwellPublishingC self->priv->pluggables_length1 = 0; #line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" self->priv->_pluggables_size_ = self->priv->pluggables_length1; -#line 521 "shotwell-publishing.c" +#line 574 "shotwell-publishing.c" } @@ -529,7 +582,7 @@ static void shotwell_publishing_core_services_finalize (GObject * obj) { self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL); #line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" G_OBJECT_CLASS (shotwell_publishing_core_services_parent_class)->finalize (obj); -#line 533 "shotwell-publishing.c" +#line 586 "shotwell-publishing.c" } @@ -557,51 +610,51 @@ SpitModule* spit_entry_point (SpitEntryPointParams* params) { ShotwellPublishingCoreServices* _tmp5_ = NULL; SpitEntryPointParams* _tmp6_; gint _tmp7_; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp0_ = params; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp1_ = (*_tmp0_).host_min_spit_interface; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp2_ = params; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp3_ = (*_tmp2_).host_max_spit_interface; -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE); -#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" (*params).module_spit_interface = _tmp4_; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp6_ = params; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp7_ = (*_tmp6_).module_spit_interface; -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) { -#line 579 "shotwell-publishing.c" +#line 632 "shotwell-publishing.c" SpitEntryPointParams* _tmp8_; GFile* _tmp9_; ShotwellPublishingCoreServices* _tmp10_; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp8_ = params; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp9_ = (*_tmp8_).module_file; -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp10_ = shotwell_publishing_core_services_new (_tmp9_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _g_object_unref0 (_tmp5_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp5_ = _tmp10_; -#line 593 "shotwell-publishing.c" +#line 646 "shotwell-publishing.c" } else { -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _g_object_unref0 (_tmp5_); -#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" _tmp5_ = NULL; -#line 599 "shotwell-publishing.c" +#line 652 "shotwell-publishing.c" } -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" return result; -#line 605 "shotwell-publishing.c" +#line 658 "shotwell-publishing.c" } diff --git a/plugins/shotwell-publishing/shotwell-publishing.vala b/plugins/shotwell-publishing/shotwell-publishing.vala index dce5954..3515f5f 100644 --- a/plugins/shotwell-publishing/shotwell-publishing.vala +++ b/plugins/shotwell-publishing/shotwell-publishing.vala @@ -49,6 +49,10 @@ private class ShotwellPublishingCoreServices : Object, Spit.Module { #if HAVE_PIWIGO pluggables += new PiwigoService(resource_directory); #endif + +#if HAVE_TUMBLR + pluggables += new TumblrService(module_file.get_parent()); +#endif } public unowned string get_module_name() { diff --git a/plugins/shotwell-publishing-extras/tumblr.png b/plugins/shotwell-publishing/tumblr.png Binary files differindex d5bf02b..d5bf02b 100644 --- a/plugins/shotwell-publishing-extras/tumblr.png +++ b/plugins/shotwell-publishing/tumblr.png diff --git a/plugins/shotwell-publishing-extras/tumblr_publishing_options_pane.ui b/plugins/shotwell-publishing/tumblr_publishing_options_pane.ui index acc5459..acc5459 100644 --- a/plugins/shotwell-publishing-extras/tumblr_publishing_options_pane.ui +++ b/plugins/shotwell-publishing/tumblr_publishing_options_pane.ui diff --git a/plugins/shotwell-transitions/meson.build b/plugins/shotwell-transitions/meson.build new file mode 100644 index 0000000..8134292 --- /dev/null +++ b/plugins/shotwell-transitions/meson.build @@ -0,0 +1,29 @@ +shotwell_transitions_sources = [ + 'BlindsEffect.vala', + 'ChessEffect.vala', + 'CircleEffect.vala', + 'CirclesEffect.vala', + 'ClockEffect.vala', + 'CrumbleEffect.vala', + 'FadeEffect.vala', + 'shotwell-transitions.vala', + 'SlideEffect.vala', + 'SquaresEffect.vala', + 'StripesEffect.vala'] + +shotwell_transitions_resources = gnome.compile_resources('transitions-resource', + 'org.gnome.Shotwell.Transitions.gresource.xml') + +cc = meson.get_compiler('c') +libm = cc.find_library('m', required : false) + +shared_module('shotwell-transitions', + shotwell_transitions_sources + shotwell_transitions_resources, + dependencies : [gio, gdk_pixbuf, cairo, gtk, gdk, xml, sw_plugin, + sw_plugin_common_dep, gee, soup, webkit, libm], + vala_args : [ + '--gresources', 'org.gnome.Shotwell.Transitions.gresource.xml', + ], + c_args : ['-DPLUGIN_RESOURCE_PATH="/org/gnome/Shotwell/Transitions"'], + install: true, + install_dir : shotwell_plugin_dir) |