diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
commit | 0ac947a9070322180e94d1b71e30836cce4d74bc (patch) | |
tree | 4a6f3923c250377536a5004ed203768111a1d27f /plugins/shotwell-publishing/TumblrPublishing.c | |
parent | eca5837e235a356c8db9416bbbc13577db3e6f76 (diff) | |
parent | 01b2b5ec9177046f64c6d0a6e73a6ac8a42089a1 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'plugins/shotwell-publishing/TumblrPublishing.c')
-rw-r--r-- | plugins/shotwell-publishing/TumblrPublishing.c | 5544 |
1 files changed, 0 insertions, 5544 deletions
diff --git a/plugins/shotwell-publishing/TumblrPublishing.c b/plugins/shotwell-publishing/TumblrPublishing.c deleted file mode 100644 index 862982d..0000000 --- a/plugins/shotwell-publishing/TumblrPublishing.c +++ /dev/null @@ -1,5544 +0,0 @@ -/* TumblrPublishing.c generated by valac 0.40.4, 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; -enum { - TUMBLR_SERVICE_0_PROPERTY, - TUMBLR_SERVICE_NUM_PROPERTIES -}; -static GParamSpec* tumblr_service_properties[TUMBLR_SERVICE_NUM_PROPERTIES]; -#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; -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_0_PROPERTY, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_NUM_PROPERTIES -}; -static GParamSpec* publishing_tumblr_tumblr_publisher_properties[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_NUM_PROPERTIES]; -#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; -enum { - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_0_PROPERTY, - PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_NUM_PROPERTIES -}; -static GParamSpec* publishing_tumblr_tumblr_publisher_publishing_options_pane_properties[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_NUM_PROPERTIES]; -#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_NUM_SIGNALS -}; -static guint publishing_tumblr_tumblr_publisher_publishing_options_pane_signals[PUBLISHING_TUMBLR_TUMBLR_PUBLISHER_PUBLISHING_OPTIONS_PANE_NUM_SIGNALS] = {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; -#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; -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; -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)) -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)) -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); -GType publishing_tumblr_tumblr_publisher_upload_transaction_get_type (void) G_GNUC_CONST; -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)) -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 568 "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 581 "TumblrPublishing.c" - } -#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 585 "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 594 "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; -#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" - result = spit_negotiate_interfaces (min_host_interface, max_host_interface, SPIT_PUBLISHING_CURRENT_INTERFACE); -#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 611 "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 626 "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 641 "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 650 "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 664 "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 670 "TumblrPublishing.c" - } -#line 42 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 674 "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 756 "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 767 "TumblrPublishing.c" -} - - -static SpitPublishingPublisher* -tumblr_service_real_create_publisher (SpitPublishingService* base, - SpitPublishingPluginHost* host) -{ - TumblrService * self; - SpitPublishingPublisher* result = NULL; - PublishingTumblrTumblrPublisher* _tmp0_; -#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_ = publishing_tumblr_tumblr_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), host); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); -#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 788 "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 803 "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 814 "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 833 "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 846 "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 864 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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_ = g_strdup (creator_blog); -#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 = _tmp0_; -#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = g_strdup (creator_url); -#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 = _tmp1_; -#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 914 "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 924 "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 933 "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 944 "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 957 "TumblrPublishing.c" - } else { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - dest_value->data[0].v_pointer = NULL; -#line 961 "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 971 "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 983 "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 990 "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 994 "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 998 "TumblrPublishing.c" - } else { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1002 "TumblrPublishing.c" - } -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return NULL; -#line 1006 "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 1022 "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 1028 "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 1032 "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 1036 "TumblrPublishing.c" - } -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return NULL; -#line 1040 "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 1060 "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 1071 "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 1094 "TumblrPublishing.c" - } else { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1098 "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 1104 "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 1126 "TumblrPublishing.c" - } else { -#line 67 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1130 "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 1136 "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 1148 "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 1157 "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 1173 "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 1202 "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 1217 "TumblrPublishing.c" - } -} - - -PublishingTumblrSizeEntry* -publishing_tumblr_size_entry_construct (GType object_type, - const gchar* creator_title, - gint creator_size) -{ - PublishingTumblrSizeEntry* self = NULL; - gchar* _tmp0_; -#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_ = g_strdup (creator_title); -#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 = _tmp0_; -#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->size = creator_size; -#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 1243 "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 1253 "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 1262 "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 1273 "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 1286 "TumblrPublishing.c" - } else { -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - dest_value->data[0].v_pointer = NULL; -#line 1290 "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 1300 "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 1312 "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 1319 "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 1323 "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 1327 "TumblrPublishing.c" - } else { -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1331 "TumblrPublishing.c" - } -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return NULL; -#line 1335 "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 1351 "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 1357 "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 1361 "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 1365 "TumblrPublishing.c" - } -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/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 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 1389 "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 1400 "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 1423 "TumblrPublishing.c" - } else { -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1427 "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 1433 "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 1455 "TumblrPublishing.c" - } else { -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - value->data[0].v_pointer = NULL; -#line 1459 "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 1465 "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 1477 "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 1486 "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 1500 "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 1529 "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 1544 "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 1555 "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 1571 "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 1577 "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 1593 "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 1599 "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 1615 "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 1621 "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 1687 "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 1693 "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 1726 "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 1732 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisher* -publishing_tumblr_tumblr_publisher_construct (GType object_type, - SpitPublishingService* service, - SpitPublishingPluginHost* host) -{ - PublishingTumblrTumblrPublisher * self = NULL; - SpitPublishingService* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingRESTSupportOAuth1Session* _tmp2_; - gint _tmp3_; - PublishingTumblrSizeEntry** _tmp4_; - gint _tmp5_; - PublishingTumblrBlogEntry** _tmp6_; - PublishingAuthenticatorFactory* _tmp7_; - PublishingAuthenticatorFactory* _tmp8_; - SpitPublishingAuthenticator* _tmp9_; - SpitPublishingAuthenticator* _tmp10_; -#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_ = _g_object_ref0 (service); -#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 = _tmp0_; -#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = _g_object_ref0 (host); -#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 = _tmp1_; -#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = 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 = _tmp2_; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = publishing_tumblr_tumblr_publisher_create_sizes (self, &_tmp3_); -#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 = _tmp4_; -#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->sizes_length1 = _tmp3_; -#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" - _tmp6_ = publishing_tumblr_tumblr_publisher_create_blogs (self, &_tmp5_); -#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 = _tmp6_; -#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->blogs_length1 = _tmp5_; -#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" - _tmp7_ = publishing_authenticator_factory_get_instance (); -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = _tmp7_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp9_ = spit_publishing_authenticator_factory_create (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, SPIT_PUBLISHING_TYPE_AUTHENTICATOR_FACTORY, SpitPublishingAuthenticatorFactory), "tumblr", host); -#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 = _tmp9_; -#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_object_unref0 (_tmp8_); -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = self->priv->authenticator; -#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (_tmp10_, "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 1817 "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 1827 "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 1848 "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 1868 "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 1886 "TumblrPublishing.c" -} - - -gint -publishing_tumblr_tumblr_publisher_get_persistent_default_size (PublishingTumblrTumblrPublisher* self) -{ - gint result = 0; - SpitPublishingPluginHost* _tmp0_; -#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" - result = 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" - return result; -#line 1903 "TumblrPublishing.c" -} - - -void -publishing_tumblr_tumblr_publisher_set_persistent_default_size (PublishingTumblrTumblrPublisher* self, - gint size) -{ - SpitPublishingPluginHost* _tmp0_; -#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" - spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", size); -#line 1918 "TumblrPublishing.c" -} - - -gint -publishing_tumblr_tumblr_publisher_get_persistent_default_blog (PublishingTumblrTumblrPublisher* self) -{ - gint result = 0; - SpitPublishingPluginHost* _tmp0_; -#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" - result = 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" - return result; -#line 1935 "TumblrPublishing.c" -} - - -void -publishing_tumblr_tumblr_publisher_set_persistent_default_blog (PublishingTumblrTumblrPublisher* self, - gint blog) -{ - SpitPublishingPluginHost* _tmp0_; -#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" - spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_blog", blog); -#line 1950 "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 1959 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_authenticator_authenticated (PublishingTumblrTumblrPublisher* self) -{ - GHashTable* params = NULL; - SpitPublishingAuthenticator* _tmp0_; - GHashTable* _tmp1_; - GVariant* consumer_key = NULL; - GVariant* consumer_secret = NULL; - GVariant* auth_token = NULL; - GVariant* auth_token_secret = NULL; - GHashTable* _tmp2_; - gconstpointer _tmp3_ = NULL; - GVariant* _tmp4_; - GHashTable* _tmp5_; - gconstpointer _tmp6_ = NULL; - GVariant* _tmp7_; - PublishingRESTSupportOAuth1Session* _tmp8_; - GVariant* _tmp9_; - const gchar* _tmp10_; - GVariant* _tmp11_; - const gchar* _tmp12_; - GHashTable* _tmp13_; - gconstpointer _tmp14_ = NULL; - GVariant* _tmp15_; - GHashTable* _tmp16_; - gconstpointer _tmp17_ = NULL; - GVariant* _tmp18_; - PublishingRESTSupportOAuth1Session* _tmp19_; - GVariant* _tmp20_; - const gchar* _tmp21_; - GVariant* _tmp22_; - const gchar* _tmp23_; -#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" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 2001 "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" - _tmp0_ = self->priv->authenticator; -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = spit_publishing_authenticator_get_authentication_parameter (_tmp0_); -#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - params = _tmp1_; -#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" - _tmp2_ = params; -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_hash_table_lookup_extended (_tmp2_, "ConsumerKey", NULL, &_tmp3_); -#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" - _tmp4_ = _g_variant_ref0 (_tmp3_); -#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - consumer_key = _tmp4_; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = params; -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_hash_table_lookup_extended (_tmp5_, "ConsumerSecret", NULL, &_tmp6_); -#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" - _tmp7_ = _g_variant_ref0 (_tmp6_); -#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - consumer_secret = _tmp7_; -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = self->priv->session; -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp9_ = consumer_key; -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = g_variant_get_string (_tmp9_, NULL); -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp11_ = consumer_secret; -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12_ = g_variant_get_string (_tmp11_, NULL); -#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_rest_support_oauth1_session_set_api_credentials (_tmp8_, _tmp10_, _tmp12_); -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp13_ = params; -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_hash_table_lookup_extended (_tmp13_, "AuthToken", NULL, &_tmp14_); -#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" - _tmp15_ = _g_variant_ref0 (_tmp14_); -#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - auth_token = _tmp15_; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp16_ = params; -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_hash_table_lookup_extended (_tmp16_, "AuthTokenSecret", NULL, &_tmp17_); -#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" - _tmp18_ = _g_variant_ref0 (_tmp17_); -#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - auth_token_secret = _tmp18_; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp19_ = self->priv->session; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp20_ = auth_token; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp21_ = g_variant_get_string (_tmp20_, NULL); -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp22_ = auth_token_secret; -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp23_ = g_variant_get_string (_tmp22_, NULL); -#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_rest_support_oauth1_session_set_access_phase_credentials (_tmp19_, _tmp21_, _tmp23_, ""); -#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 2095 "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 2105 "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 2116 "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 2141 "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 2149 "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 2160 "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 2181 "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 2194 "TumblrPublishing.c" - } -#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _publishing_rest_support_transaction_unref0 (txn); -#line 2198 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_info_request_txn_completed (PublishingTumblrTumblrPublisher* self, - PublishingRESTSupportTransaction* txn) -{ - guint _tmp0_; - guint _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#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" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 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" - if (!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/TumblrPublishing.vala" - return; -#line 2228 "TumblrPublishing.c" - } -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = publishing_rest_support_transaction_get_response (txn); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#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'", _tmp3_); -#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp3_); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = publishing_rest_support_transaction_get_response (txn); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = _tmp4_; -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (self, _tmp5_); -#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp5_); -#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (self); -#line 2248 "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 2257 "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 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (old != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (replacement != NULL, NULL); -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if ((*((gchar*) self)) == '\0') { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 2280 "TumblrPublishing.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = (*((gchar*) old)) == '\0'; -#line 2284 "TumblrPublishing.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = TRUE; -#line 2290 "TumblrPublishing.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_strcmp0 (old, replacement) == 0; -#line 2294 "TumblrPublishing.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 2298 "TumblrPublishing.c" - gchar* _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = g_strdup (self); -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 2306 "TumblrPublishing.c" - } - { - GRegex* regex = NULL; - gchar* _tmp3_; - gchar* _tmp4_; - GRegex* _tmp5_; - GRegex* _tmp6_; - gchar* _tmp7_ = NULL; - GRegex* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = g_regex_escape_string (old, -1); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = _tmp5_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp4_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - regex = _tmp6_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 2334 "TumblrPublishing.c" - goto __catch22_g_regex_error; - } -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 2343 "TumblrPublishing.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = regex; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = _tmp9_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 2357 "TumblrPublishing.c" - goto __catch22_g_regex_error; - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 2368 "TumblrPublishing.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp10_ = _tmp7_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = NULL; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp10_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp7_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 2382 "TumblrPublishing.c" - } - goto __finally22; - __catch22_g_regex_error: - { - GError* e = NULL; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - e = _inner_error_; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _inner_error_ = NULL; -#line 1429 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_assert_not_reached (); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_error_free0 (e); -#line 2396 "TumblrPublishing.c" - } - __finally22: -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 2407 "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 2424 "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 2430 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_do_parse_token_info_from_user_request (PublishingTumblrTumblrPublisher* self, - const gchar* response) -{ - 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" - g_debug ("TumblrPublishing.vala:226: ACTION: parsing info request response '%s' " \ -"into list of available blogs", response); -#line 2445 "TumblrPublishing.c" - { - JsonParser* parser = NULL; - JsonParser* _tmp0_; - JsonObject* root_object = NULL; - JsonNode* _tmp1_; - JsonObject* _tmp2_; - JsonObject* _tmp3_; - JsonObject* _tmp4_; - JsonObject* _tmp5_; - JsonObject* _tmp6_; - const gchar* _tmp7_; - gchar* _tmp8_; - const gchar* _tmp9_; - JsonObject* _tmp10_; - JsonObject* _tmp11_; - JsonObject* _tmp12_; - JsonArray* _tmp13_; - GList* _tmp14_; -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0_ = json_parser_new (); -#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - parser = _tmp0_; -#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - json_parser_load_from_data (parser, response, (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 2474 "TumblrPublishing.c" - goto __catch21_g_error; - } -#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = json_parser_get_root (parser); -#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = json_node_get_object (_tmp1_); -#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3_ = _json_object_ref0 (_tmp2_); -#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - root_object = _tmp3_; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = root_object; -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = json_object_get_object_member (_tmp4_, "response"); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp6_ = json_object_get_object_member (_tmp5_, "user"); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp7_ = json_object_get_string_member (_tmp6_, "name"); -#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = g_strdup (_tmp7_); -#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 = _tmp8_; -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp9_ = self->priv->username; -#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:232: Got user name: %s", _tmp9_); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = root_object; -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp11_ = json_object_get_object_member (_tmp10_, "response"); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12_ = json_object_get_object_member (_tmp11_, "user"); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp13_ = json_object_get_array_member (_tmp12_, "blogs"); -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp14_ = json_array_get_elements (_tmp13_); -#line 2513 "TumblrPublishing.c" - { - GList* blognode_collection = NULL; - GList* blognode_it = NULL; -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - blognode_collection = _tmp14_; -#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 2521 "TumblrPublishing.c" - JsonNode* blognode = NULL; -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - blognode = (JsonNode*) blognode_it->data; -#line 2525 "TumblrPublishing.c" - { - JsonObject* blog = NULL; - JsonNode* _tmp15_; - JsonObject* _tmp16_; - JsonObject* _tmp17_; - gchar* name = NULL; - JsonObject* _tmp18_; - const gchar* _tmp19_; - gchar* _tmp20_; - gchar* url = NULL; - JsonObject* _tmp21_; - const gchar* _tmp22_; - gchar* _tmp23_; - gchar* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; - const gchar* _tmp27_; - const gchar* _tmp28_; - PublishingTumblrBlogEntry** _tmp29_; - gint _tmp29__length1; - const gchar* _tmp30_; - const gchar* _tmp31_; - PublishingTumblrBlogEntry* _tmp32_; -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp15_ = blognode; -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp16_ = json_node_get_object (_tmp15_); -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp17_ = _json_object_ref0 (_tmp16_); -#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - blog = _tmp17_; -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp18_ = blog; -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp19_ = json_object_get_string_member (_tmp18_, "name"); -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp20_ = g_strdup (_tmp19_); -#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - name = _tmp20_; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp21_ = blog; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp22_ = json_object_get_string_member (_tmp21_, "url"); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp23_ = string_replace (_tmp22_, "http://", ""); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp24_ = _tmp23_; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp25_ = string_replace (_tmp24_, "/", ""); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp26_ = _tmp25_; -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp24_); -#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - url = _tmp26_; -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp27_ = name; -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp28_ = url; -#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:237: Got blog name: %s and url: %s", _tmp27_, _tmp28_); -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp29_ = self->priv->blogs; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp29__length1 = self->priv->blogs_length1; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp30_ = name; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp31_ = url; -#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp32_ = publishing_tumblr_blog_entry_new (_tmp30_, _tmp31_); -#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_, _tmp32_); -#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 2605 "TumblrPublishing.c" - } - } -#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_list_free0 (blognode_collection); -#line 2610 "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 2616 "TumblrPublishing.c" - } - goto __finally21; - __catch21_g_error: - { - GError* err = NULL; - SpitPublishingPluginHost* _tmp33_; - GError* _tmp34_; -#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" - _tmp33_ = self->priv->host; -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp34_ = err; -#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp33_, _tmp34_); -#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_error_free0 (err); -#line 2636 "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 2647 "TumblrPublishing.c" - } -} - - -static void -publishing_tumblr_tumblr_publisher_on_info_request_txn_error (PublishingTumblrTumblrPublisher* self, - PublishingRESTSupportTransaction* txn, - GError* err) -{ - guint _tmp0_; - guint _tmp1_; - PublishingRESTSupportOAuth1Session* _tmp2_; - SpitPublishingPluginHost* _tmp3_; -#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" - g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp0_, NULL, FALSE); -#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" - g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); -#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (txn, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 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" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 2677 "TumblrPublishing.c" - } -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = self->priv->session; -#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_rest_support_oauth1_session_deauthenticate (_tmp2_); -#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" - _tmp3_ = self->priv->host; -#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp3_, err); -#line 2689 "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 2699 "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 2709 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_do_show_publishing_options_pane (PublishingTumblrTumblrPublisher* self) -{ - SpitPublishingPluginHost* _tmp0_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* publishing_options_pane = NULL; - SpitPublishingPluginHost* _tmp1_; - PublishingTumblrSizeEntry** _tmp2_; - gint _tmp2__length1; - PublishingTumblrBlogEntry** _tmp3_; - gint _tmp3__length1; - const gchar* _tmp4_; - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp5_; - SpitPublishingPluginHost* _tmp6_; -#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_ = self->priv->sizes; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2__length1 = self->priv->sizes_length1; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3_ = self->priv->blogs; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3__length1 = self->priv->blogs_length1; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = self->priv->username; -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = publishing_tumblr_tumblr_publisher_publishing_options_pane_new (self, spit_publishing_plugin_host_get_publishable_media_type (_tmp1_), _tmp2_, _tmp2__length1, _tmp3_, _tmp3__length1, _tmp4_); -#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_options_pane = _tmp5_; -#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" - _tmp6_ = self->priv->host; -#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_plugin_host_install_dialog_pane (_tmp6_, 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 2760 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_publishing_options_pane_publish (PublishingTumblrTumblrPublisher* self) -{ - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; -#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 2774 "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 2791 "TumblrPublishing.c" - } -#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 2797 "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 2803 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_publishing_options_pane_logout (PublishingTumblrTumblrPublisher* self) -{ - PublishingTumblrTumblrPublisherPublishingOptionsPane* _tmp0_; -#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 2817 "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 2834 "TumblrPublishing.c" - } -#line 290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (!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/TumblrPublishing.vala" - return; -#line 2840 "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 2846 "TumblrPublishing.c" -} - - -gint -publishing_tumblr_tumblr_publisher_tumblr_date_time_compare_func (SpitPublishingPublishable* a, - SpitPublishingPublishable* b) -{ - gint result = 0; - GDateTime* _tmp0_; - GDateTime* _tmp1_; - GDateTime* _tmp2_; - GDateTime* _tmp3_; - gint _tmp4_; -#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_ = spit_publishing_publishable_get_exposure_date_time (a); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = _tmp0_; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = spit_publishing_publishable_get_exposure_date_time (b); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3_ = _tmp2_; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = g_date_time_compare (_tmp1_, _tmp3_); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_date_time_unref0 (_tmp3_); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_date_time_unref0 (_tmp1_); -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - result = _tmp4_; -#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 2882 "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 2895 "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 2906 "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 2917 "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 2928 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_do_publish (PublishingTumblrTumblrPublisher* self) -{ - SpitPublishingPluginHost* _tmp0_; - SpitPublishingPluginHost* _tmp1_; - PublishingTumblrSizeEntry** _tmp2_; - gint _tmp2__length1; - PublishingTumblrSizeEntry* _tmp3_; - gint _tmp4_; - void* _tmp5_; - GDestroyNotify _tmp6_; - SpitPublishingProgressCallback _tmp7_; - SpitPublishingPublishable** publishables = NULL; - SpitPublishingPluginHost* _tmp8_; - gint _tmp9_; - SpitPublishingPublishable** _tmp10_; - gint publishables_length1; - gint _publishables_size_; - GeeArrayList* sorted_list = NULL; - GeeArrayList* _tmp11_; - SpitPublishingPublishable** _tmp12_; - gint _tmp12__length1; - GeeArrayList* _tmp16_; - gchar* blog_url = NULL; - PublishingTumblrBlogEntry** _tmp17_; - gint _tmp17__length1; - PublishingTumblrBlogEntry* _tmp18_; - const gchar* _tmp19_; - gchar* _tmp20_; - PublishingTumblrTumblrPublisherUploader* uploader = NULL; - PublishingRESTSupportOAuth1Session* _tmp21_; - GeeArrayList* _tmp22_; - gint _tmp23_; - gpointer* _tmp24_; - SpitPublishingPublishable** _tmp25_; - gint _tmp25__length1; - const gchar* _tmp26_; - PublishingTumblrTumblrPublisherUploader* _tmp27_; - PublishingTumblrTumblrPublisherUploader* _tmp28_; - PublishingTumblrTumblrPublisherUploader* _tmp29_; - PublishingTumblrTumblrPublisherUploader* _tmp30_; - PublishingTumblrTumblrPublisherUploader* _tmp31_; -#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_ = _tmp2_[publishing_tumblr_tumblr_publisher_get_persistent_default_size (self)]; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = _tmp3_->size; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp7_ = spit_publishing_plugin_host_serialize_publishables (_tmp1_, _tmp4_, FALSE, &_tmp5_, &_tmp6_); -#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 = _tmp7_; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->progress_reporter_target = _tmp5_; -#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->progress_reporter_target_destroy_notify = _tmp6_; -#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 3012 "TumblrPublishing.c" - } -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = self->priv->host; -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = spit_publishing_plugin_host_get_publishables (_tmp8_, &_tmp9_); -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishables = _tmp10_; -#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishables_length1 = _tmp9_; -#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" - _tmp11_ = 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 = _tmp11_; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12_ = publishables; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12__length1 = publishables_length1; -#line 3032 "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 = _tmp12_; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - p_collection_length1 = _tmp12__length1; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - for (p_it = 0; p_it < _tmp12__length1; p_it = p_it + 1) { -#line 3044 "TumblrPublishing.c" - SpitPublishingPublishable* _tmp13_; - SpitPublishingPublishable* p = NULL; -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp13_ = _g_object_ref0 (p_collection[p_it]); -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - p = _tmp13_; -#line 3051 "TumblrPublishing.c" - { - GeeArrayList* _tmp14_; - SpitPublishingPublishable* _tmp15_; -#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" - _tmp14_ = sorted_list; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp15_ = p; -#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); -#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_object_unref0 (p); -#line 3065 "TumblrPublishing.c" - } - } - } -#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp16_ = sorted_list; -#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gee_list_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, 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" - _tmp17_ = self->priv->blogs; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp17__length1 = self->priv->blogs_length1; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp18_ = _tmp17_[publishing_tumblr_tumblr_publisher_get_persistent_default_blog (self)]; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp19_ = _tmp18_->url; -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp20_ = g_strdup (_tmp19_); -#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - blog_url = _tmp20_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp21_ = self->priv->session; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp22_ = sorted_list; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp24_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp23_); -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp25_ = _tmp24_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp25__length1 = _tmp23_; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp26_ = blog_url; -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp27_ = publishing_tumblr_tumblr_publisher_uploader_new (_tmp21_, _tmp25_, _tmp23_, _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" - _tmp25_ = (_vala_array_free (_tmp25_, _tmp25__length1, (GDestroyNotify) g_object_unref), NULL); -#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - uploader = _tmp28_; -#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp29_ = uploader; -#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, 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" - _tmp30_ = uploader; -#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, 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" - _tmp31_ = uploader; -#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, 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 3125 "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 3146 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_upload_status_updated (PublishingTumblrTumblrPublisher* self, - gint file_number, - gdouble completed_fraction) -{ - SpitPublishingProgressCallback _tmp0_; - void* _tmp0__target; - SpitPublishingProgressCallback _tmp1_; - void* _tmp1__target; -#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" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 3165 "TumblrPublishing.c" - } -#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 * completed_fraction); -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0_ = self->priv->progress_reporter; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0__target = self->priv->progress_reporter_target; -#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _vala_assert (_tmp0_ != NULL, "progress_reporter != null"); -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = self->priv->progress_reporter; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1__target = self->priv->progress_reporter_target; -#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ (file_number, completed_fraction, _tmp1__target); -#line 3181 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_upload_complete (PublishingTumblrTumblrPublisher* self, - PublishingRESTSupportBatchUploader* uploader, - gint num_published) -{ - guint _tmp0_; - guint _tmp1_; -#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" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 3200 "TumblrPublishing.c" - } -#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:358: EVENT: uploader reports upload complete; %d" \ -" items published.", num_published); -#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp0_, NULL, FALSE); -#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (uploader, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 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" - g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); -#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (uploader, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 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 3214 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_on_upload_error (PublishingTumblrTumblrPublisher* self, - PublishingRESTSupportBatchUploader* uploader, - GError* err) -{ - const gchar* _tmp0_; - guint _tmp1_; - guint _tmp2_; - SpitPublishingPluginHost* _tmp3_; -#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" - if (!spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 3235 "TumblrPublishing.c" - } -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0_ = err->message; -#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_debug ("TumblrPublishing.vala:371: EVENT: uploader reports upload error = '%s'" \ -".", _tmp0_); -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); -#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (uploader, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 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" - g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp2_, NULL, FALSE); -#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_handlers_disconnect_matched (uploader, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 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" - _tmp3_ = self->priv->host; -#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_plugin_host_post_error (_tmp3_, err); -#line 3253 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_do_logout (PublishingTumblrTumblrPublisher* self) -{ - SpitPublishingAuthenticator* _tmp0_; -#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" - if (spit_publishing_authenticator_can_logout (_tmp0_)) { -#line 3269 "TumblrPublishing.c" - SpitPublishingAuthenticator* _tmp1_; -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = self->priv->authenticator; -#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_authenticator_logout (_tmp1_); -#line 3275 "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 3281 "TumblrPublishing.c" -} - - -void -publishing_tumblr_tumblr_publisher_attempt_start (PublishingTumblrTumblrPublisher* self) -{ - SpitPublishingAuthenticator* _tmp0_; -#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" - if (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/TumblrPublishing.vala" - return; -#line 3295 "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" - _tmp0_ = self->priv->authenticator; -#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - spit_publishing_authenticator_authenticate (_tmp0_); -#line 3305 "TumblrPublishing.c" -} - - -static void -publishing_tumblr_tumblr_publisher_real_start (SpitPublishingPublisher* base) -{ - PublishingTumblrTumblrPublisher * self; - gboolean _tmp0_; -#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" - if (spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher))) { -#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return; -#line 3320 "TumblrPublishing.c" - } -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0_ = self->priv->was_started; -#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (_tmp0_) { -#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 3328 "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 3334 "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 3348 "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 3357 "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 3371 "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 3377 "TumblrPublishing.c" - } -#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 3381 "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 3390 "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 3404 "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 3410 "TumblrPublishing.c" - } -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return result; -#line 3414 "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 3424 "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 3434 "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 3444 "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 3454 "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_; - gchar* _tmp1_; - PublishingTumblrTumblrPublisher* _tmp2_; - PublishingTumblrSizeEntry** _tmp3_; - gint _tmp3__length1; - PublishingTumblrBlogEntry** _tmp4_; - gint _tmp4__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_ = g_strdup (username); -#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 = _tmp1_; -#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp2_ = _g_object_ref0 (publisher); -#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 = _tmp2_; -#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->media_type = media_type; -#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3_ = (sizes != NULL) ? _vala_array_dup9 (sizes, sizes_length1) : ((gpointer) sizes); -#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp3__length1 = sizes_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 = _tmp3_; -#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->sizes_length1 = _tmp3__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" - _tmp4_ = (blogs != NULL) ? _vala_array_dup10 (blogs, blogs_length1) : ((gpointer) blogs); -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4__length1 = blogs_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 = _tmp4_; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->blogs_length1 = _tmp4__length1; -#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self->priv->_blogs_size_ = self->priv->blogs_length1; -#line 3529 "TumblrPublishing.c" - { - GtkBuilder* _tmp5_; - GtkBuilder* _tmp6_; - GtkBuilder* _tmp7_; - GtkBuilder* _tmp8_; - GObject* _tmp9_; - GtkBox* _tmp10_; - GtkBuilder* _tmp11_; - GObject* _tmp12_; - GtkLabel* _tmp13_; - GtkBuilder* _tmp14_; - GObject* _tmp15_; - GtkButton* _tmp16_; - GtkBuilder* _tmp17_; - GObject* _tmp18_; - GtkButton* _tmp19_; - GtkBuilder* _tmp20_; - GObject* _tmp21_; - GtkComboBoxText* _tmp22_; - GtkBuilder* _tmp23_; - GObject* _tmp24_; - GtkLabel* _tmp25_; - GtkBuilder* _tmp26_; - GObject* _tmp27_; - GtkComboBoxText* _tmp28_; - GtkBuilder* _tmp29_; - GObject* _tmp30_; - GtkLabel* _tmp31_; - gchar* upload_label_text = NULL; - const gchar* _tmp32_; - gchar* _tmp33_; - GtkLabel* _tmp34_; - const gchar* _tmp35_; - GtkComboBoxText* _tmp36_; - GtkButton* _tmp40_; - GtkButton* _tmp41_; -#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = 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 = _tmp5_; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp6_ = self->priv->builder; -#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gtk_builder_add_from_resource (_tmp6_, 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 3578 "TumblrPublishing.c" - goto __catch23_g_error; - } -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp7_ = self->priv->builder; -#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gtk_builder_connect_signals (_tmp7_, NULL); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = self->priv->builder; -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp9_ = gtk_builder_get_object (_tmp8_, "tumblr_pane"); -#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, 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 = _tmp10_; -#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp11_ = self->priv->builder; -#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12_ = gtk_builder_get_object (_tmp11_, "upload_info_label"); -#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, 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 = _tmp13_; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp14_ = self->priv->builder; -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp15_ = gtk_builder_get_object (_tmp14_, "logout_button"); -#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, 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 = _tmp16_; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp17_ = self->priv->builder; -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp18_ = gtk_builder_get_object (_tmp17_, "publish_button"); -#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, 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 = _tmp19_; -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp20_ = self->priv->builder; -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp21_ = gtk_builder_get_object (_tmp20_, "size_combo"); -#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, 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 = _tmp22_; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp23_ = self->priv->builder; -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp24_ = gtk_builder_get_object (_tmp23_, "size_label"); -#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, 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 = _tmp25_; -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp26_ = self->priv->builder; -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp27_ = gtk_builder_get_object (_tmp26_, "blog_combo"); -#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, 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 = _tmp28_; -#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp29_ = self->priv->builder; -#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp30_ = gtk_builder_get_object (_tmp29_, "blog_label"); -#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, 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 = _tmp31_; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp32_ = self->priv->username; -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp33_ = g_strdup_printf (_ ("You are logged into Tumblr as %s.\n\n"), _tmp32_); -#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - upload_label_text = _tmp33_; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp34_ = self->priv->upload_info_label; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp35_ = upload_label_text; -#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gtk_label_set_label (_tmp34_, _tmp35_); -#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" - _tmp36_ = self->priv->blog_combo; -#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, 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" - if (media_type != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { -#line 3685 "TumblrPublishing.c" - GtkComboBoxText* _tmp37_; -#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" - _tmp37_ = self->priv->size_combo; -#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, 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 3693 "TumblrPublishing.c" - } else { - GtkComboBoxText* _tmp38_; - GtkLabel* _tmp39_; -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp38_ = self->priv->size_combo; -#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp39_ = self->priv->size_label; -#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget), FALSE); -#line 3705 "TumblrPublishing.c" - } -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp40_ = self->priv->logout_button; -#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (_tmp40_, "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" - _tmp41_ = self->priv->publish_button; -#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_signal_connect_object (_tmp41_, "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 3717 "TumblrPublishing.c" - } - goto __finally23; - __catch23_g_error: - { - GError* e = NULL; - GError* _tmp42_; - const gchar* _tmp43_; -#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" - _tmp42_ = e; -#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp43_ = _tmp42_->message; -#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_warning (_ ("Could not load UI: %s"), _tmp43_); -#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_error_free0 (e); -#line 3737 "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 3748 "TumblrPublishing.c" - } -#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 3752 "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 3767 "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 3778 "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 3789 "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 3806 "TumblrPublishing.c" - PublishingTumblrBlogEntry** _tmp1_; - gint _tmp1__length1; - GtkComboBoxText* _tmp6_; - PublishingTumblrTumblrPublisher* _tmp7_; -#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 3815 "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 3827 "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 3834 "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 3849 "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" - gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), publishing_tumblr_tumblr_publisher_get_persistent_default_blog (_tmp7_)); -#line 3859 "TumblrPublishing.c" - } -} - - -static void -publishing_tumblr_tumblr_publisher_publishing_options_pane_on_blog_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) -{ - PublishingTumblrTumblrPublisher* _tmp0_; - GtkComboBoxText* _tmp1_; -#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" - publishing_tumblr_tumblr_publisher_set_persistent_default_blog (_tmp0_, gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox))); -#line 3877 "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 3894 "TumblrPublishing.c" - PublishingTumblrSizeEntry** _tmp1_; - gint _tmp1__length1; - GtkComboBoxText* _tmp6_; - PublishingTumblrTumblrPublisher* _tmp7_; -#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 3903 "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 3915 "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 3922 "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 3937 "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" - gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), publishing_tumblr_tumblr_publisher_get_persistent_default_size (_tmp7_)); -#line 3947 "TumblrPublishing.c" - } -} - - -static void -publishing_tumblr_tumblr_publisher_publishing_options_pane_on_size_changed (PublishingTumblrTumblrPublisherPublishingOptionsPane* self) -{ - PublishingTumblrTumblrPublisher* _tmp0_; - GtkComboBoxText* _tmp1_; -#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" - publishing_tumblr_tumblr_publisher_set_persistent_default_size (_tmp0_, gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox))); -#line 3965 "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 3976 "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 3987 "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 4008 "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 4023 "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 4033 "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 4043 "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 4057 "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 4077 "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 4094 "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 4111 "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 4155 "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 4193 "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; -#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" - self = (PublishingTumblrTumblrPublisherUserInfoFetchTransaction*) publishing_rest_support_oauth1_transaction_construct_with_uri (object_type, session, "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 4227 "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 4236 "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 4245 "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_; - GString* _tmp13_; - const gchar* _tmp14_; - gchar* _tmp15_; -#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 4309 "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 = data; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - byte_collection_length1 = data_length1; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - for (byte_it = 0; byte_it < data_length1; byte_it = byte_it + 1) { -#line 4321 "TumblrPublishing.c" - guint8 byte = 0U; -#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - byte = byte_collection[byte_it]; -#line 4325 "TumblrPublishing.c" - { - guint8 _tmp4_; -#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp4_ = byte; -#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (((gint) _tmp4_) == 0) { -#line 4332 "TumblrPublishing.c" - GString* _tmp5_; -#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp5_ = s; -#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_string_append (_tmp5_, "%00"); -#line 4338 "TumblrPublishing.c" - } else { - gchar* _tmp6_; - gint _tmp6__length1; - guint8 _tmp7_; - gchar _tmp8_; - GString* _tmp9_; - gchar* _tmp10_; - gint _tmp10__length1; - gchar* _tmp11_; - gchar* _tmp12_; -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp6_ = bytes; -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp6__length1 = bytes_length1; -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp7_ = byte; -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp6_[0] = (gchar) _tmp7_; -#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp8_ = _tmp6_[0]; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp9_ = s; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10_ = bytes; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp10__length1 = bytes_length1; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp11_ = soup_uri_encode ((const gchar*) _tmp10_, PUBLISHING_TUMBLR_ENCODE_RFC_3986_EXTRA); -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp12_ = _tmp11_; -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - g_string_append (_tmp9_, _tmp12_); -#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp12_); -#line 4373 "TumblrPublishing.c" - } - } - } - } -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp13_ = s; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp14_ = _tmp13_->str; -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp15_ = g_strdup (_tmp14_); -#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - result = _tmp15_; -#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 4392 "TumblrPublishing.c" -} - - -PublishingTumblrTumblrPublisherUploadTransaction* -publishing_tumblr_tumblr_publisher_upload_transaction_construct (GType object_type, - PublishingRESTSupportOAuth1Session* session, - SpitPublishingPublishable* publishable, - const gchar* blog_url) -{ - PublishingTumblrTumblrPublisherUploadTransaction* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#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_ = g_strdup_printf ("https://api.tumblr.com/v2/blog/%s/post", blog_url); -#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp1_ = _tmp0_; -#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - self = (PublishingTumblrTumblrPublisherUploadTransaction*) publishing_rest_support_oauth1_upload_transaction_construct (object_type, session, publishable, _tmp1_); -#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp1_); -#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 4423 "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 4434 "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 1442 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res = (guint8*) self; -#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res_length1 = -1; -#line 1443 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _res_size_ = res_length1; -#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = strlen (self); -#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res_length1 = (gint) _tmp1_; -#line 1444 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = res_length1; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = res; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3__length1 = res_length1; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4__length1 = _tmp3__length1; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (result_length1) { -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - *result_length1 = _tmp4__length1; -#line 4481 "TumblrPublishing.c" - } -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 1445 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4487 "TumblrPublishing.c" -} - - -static gchar* -_vala_g_strjoinv (const gchar* separator, - gchar** str_array, - int str_array_length1) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; -#line 1092 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (separator == NULL) { -#line 1093 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - separator = ""; -#line 4502 "TumblrPublishing.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array != NULL) { -#line 4506 "TumblrPublishing.c" - gboolean _tmp1_ = FALSE; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 > 0) { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 4512 "TumblrPublishing.c" - } else { - gboolean _tmp2_ = FALSE; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 == -1) { -#line 4517 "TumblrPublishing.c" - const gchar* _tmp3_; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = str_array[0]; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = _tmp3_ != NULL; -#line 4523 "TumblrPublishing.c" - } else { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = FALSE; -#line 4527 "TumblrPublishing.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _tmp2_; -#line 4531 "TumblrPublishing.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = _tmp1_; -#line 4535 "TumblrPublishing.c" - } else { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 4539 "TumblrPublishing.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 4543 "TumblrPublishing.c" - gint i = 0; - gsize len = 0UL; - gint _tmp20_; - gint _tmp22_; - gint _tmp23_; - gsize _tmp24_; - gint _tmp25_; - gint _tmp26_; - gint _tmp27_; - const gchar* res = NULL; - gsize _tmp28_; - void* _tmp29_; - void* ptr = NULL; - const gchar* _tmp30_; - const gchar* _tmp31_; - void* _tmp32_; - const gchar* _tmp45_; -#line 1097 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 4563 "TumblrPublishing.c" - { - gboolean _tmp4_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = 0; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = TRUE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - while (TRUE) { -#line 4572 "TumblrPublishing.c" - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; - gint _tmp12_ = 0; - gint _tmp13_; - const gchar* _tmp14_; - gsize _tmp19_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp4_) { -#line 4581 "TumblrPublishing.c" - gint _tmp5_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = _tmp5_ + 1; -#line 4587 "TumblrPublishing.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 != -1) { -#line 4593 "TumblrPublishing.c" - gint _tmp8_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = _tmp8_ < str_array_length1; -#line 4599 "TumblrPublishing.c" - } else { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = FALSE; -#line 4603 "TumblrPublishing.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp7_) { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = TRUE; -#line 4609 "TumblrPublishing.c" - } else { - gboolean _tmp9_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 == -1) { -#line 4614 "TumblrPublishing.c" - gint _tmp10_; - const gchar* _tmp11_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp11_ = str_array[_tmp10_]; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = _tmp11_ != NULL; -#line 4623 "TumblrPublishing.c" - } else { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 4627 "TumblrPublishing.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = _tmp9_; -#line 4631 "TumblrPublishing.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp6_) { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - break; -#line 4637 "TumblrPublishing.c" - } -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp13_ = i; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp14_ = str_array[_tmp13_]; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp14_ != NULL) { -#line 4645 "TumblrPublishing.c" - gint _tmp15_; - const gchar* _tmp16_; - gint _tmp17_; - gint _tmp18_; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp15_ = i; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp16_ = str_array[_tmp15_]; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp17_ = strlen ((const gchar*) _tmp16_); -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp18_ = _tmp17_; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp12_ = _tmp18_; -#line 4660 "TumblrPublishing.c" - } else { -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp12_ = 0; -#line 4664 "TumblrPublishing.c" - } -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp19_ = len; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = _tmp19_ + _tmp12_; -#line 4670 "TumblrPublishing.c" - } - } -#line 1101 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp20_ = i; -#line 1101 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp20_ == 0) { -#line 4677 "TumblrPublishing.c" - gchar* _tmp21_; -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp21_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp21_; -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4685 "TumblrPublishing.c" - } -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp22_ = i; -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - str_array_length1 = _tmp22_; -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp23_ = str_array_length1; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp24_ = len; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp25_ = strlen ((const gchar*) separator); -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp26_ = _tmp25_; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp27_ = i; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = _tmp24_ + (_tmp26_ * (_tmp27_ - 1)); -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp28_ = len; -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp29_ = g_malloc (_tmp28_); -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res = _tmp29_; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp30_ = res; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp31_ = str_array[0]; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp32_ = g_stpcpy ((void*) _tmp30_, (const gchar*) _tmp31_); -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp32_; -#line 4717 "TumblrPublishing.c" - { - gboolean _tmp33_ = FALSE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = 1; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp33_ = TRUE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - while (TRUE) { -#line 4726 "TumblrPublishing.c" - gint _tmp35_; - void* _tmp36_; - void* _tmp37_; - const gchar* _tmp38_ = NULL; - gint _tmp39_; - const gchar* _tmp40_; - void* _tmp43_; - void* _tmp44_; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp33_) { -#line 4737 "TumblrPublishing.c" - gint _tmp34_; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp34_ = i; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = _tmp34_ + 1; -#line 4743 "TumblrPublishing.c" - } -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp33_ = FALSE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp35_ = i; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!(_tmp35_ < str_array_length1)) { -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - break; -#line 4753 "TumblrPublishing.c" - } -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp36_ = ptr; -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp37_ = g_stpcpy (_tmp36_, (const gchar*) separator); -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp37_; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp40_ = str_array[_tmp39_]; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp40_ != NULL) { -#line 4767 "TumblrPublishing.c" - gint _tmp41_; - const gchar* _tmp42_; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp41_ = i; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp42_ = str_array[_tmp41_]; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp38_ = (const gchar*) _tmp42_; -#line 4776 "TumblrPublishing.c" - } else { -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp38_ = ""; -#line 4780 "TumblrPublishing.c" - } -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp43_ = ptr; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp44_ = g_stpcpy (_tmp43_, _tmp38_); -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp44_; -#line 4788 "TumblrPublishing.c" - } - } -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp45_ = res; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res = NULL; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = (gchar*) _tmp45_; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4799 "TumblrPublishing.c" - } else { - gchar* _tmp46_; -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp46_ = g_strdup (""); -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp46_; -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4808 "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_; - SoupMessage* _tmp50_; - 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 4851 "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 4908 "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 4919 "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 4961 "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 4975 "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 4993 "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 5010 "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 5024 "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 5034 "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" - cont = gee_map_iterator_next (_tmp39_); -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - while (TRUE) { -#line 5097 "TumblrPublishing.c" - gboolean _tmp40_; - SoupMessage* _tmp41_; - SoupMessageHeaders* _tmp42_; - GeeMapIterator* _tmp43_; - gpointer _tmp44_; - gchar* _tmp45_; - GeeMapIterator* _tmp46_; - gpointer _tmp47_; - gchar* _tmp48_; - GeeMapIterator* _tmp49_; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp40_ = cont; -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - if (!_tmp40_) { -#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - break; -#line 5114 "TumblrPublishing.c" - } -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp41_ = outbound_message; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp42_ = _tmp41_->request_headers; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp43_ = i; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp44_ = gee_map_iterator_get_key (_tmp43_); -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp45_ = (gchar*) _tmp44_; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp46_ = i; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp47_ = gee_map_iterator_get_value (_tmp46_); -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp48_ = (gchar*) _tmp47_; -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - soup_message_headers_append (_tmp42_, _tmp45_, _tmp48_); -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp48_); -#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _g_free0 (_tmp45_); -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp49_ = i; -#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - cont = gee_map_iterator_next (_tmp49_); -#line 5142 "TumblrPublishing.c" - } -#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp50_ = 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), _tmp50_); -#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 5170 "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 5188 "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 5201 "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 5212 "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; - gchar* _tmp0_; -#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" - self = (PublishingTumblrTumblrPublisherUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (session, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), publishables, publishables_length1); -#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - _tmp0_ = g_strdup (blog_url); -#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 = _tmp0_; -#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/TumblrPublishing.vala" - return self; -#line 5259 "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 5271 "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 5316 "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 5331 "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 5345 "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 5359 "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 5386 "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 5403 "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 5443 "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 5487 "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); -} - - - |