diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-20 15:09:31 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-20 15:09:31 +0200 |
commit | 143bfc9f801c84428074312d661f8e08803df83b (patch) | |
tree | 59a8a447529bd9ce3807aa8bacef861dc5aafd70 /plugins/shotwell-publishing | |
parent | 29a7aef998e975b42401cfa96d1b750d91eadf06 (diff) |
Imported Upstream version 0.23.5upstream/0.23.5
Diffstat (limited to 'plugins/shotwell-publishing')
20 files changed, 47048 insertions, 69 deletions
diff --git a/plugins/shotwell-publishing/FacebookPublishing.c b/plugins/shotwell-publishing/FacebookPublishing.c new file mode 100644 index 0000000..e3cccd3 --- /dev/null +++ b/plugins/shotwell-publishing/FacebookPublishing.c @@ -0,0 +1,11997 @@ +/* FacebookPublishing.c generated by valac 0.32.1, the Vala compiler + * generated from FacebookPublishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include "shotwell-plugin-common.h" +#include <glib/gi18n-lib.h> +#include <json-glib/json-glib.h> +#include <gtk/gtk.h> +#include <libsoup/soup.h> +#include <float.h> +#include <math.h> +#include <webkit2/webkit2.h> +#include <gdk/gdk.h> +#include <locale.h> +#include <gobject/gvaluecollector.h> + + +#define TYPE_FACEBOOK_SERVICE (facebook_service_get_type ()) +#define FACEBOOK_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FACEBOOK_SERVICE, FacebookService)) +#define FACEBOOK_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FACEBOOK_SERVICE, FacebookServiceClass)) +#define IS_FACEBOOK_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FACEBOOK_SERVICE)) +#define IS_FACEBOOK_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FACEBOOK_SERVICE)) +#define FACEBOOK_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FACEBOOK_SERVICE, FacebookServiceClass)) + +typedef struct _FacebookService FacebookService; +typedef struct _FacebookServiceClass FacebookServiceClass; +typedef struct _FacebookServicePrivate FacebookServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER (publishing_facebook_facebook_publisher_get_type ()) +#define PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher)) +#define PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisherClass)) +#define PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER)) +#define PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER)) +#define PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisherClass)) + +typedef struct _PublishingFacebookFacebookPublisher PublishingFacebookFacebookPublisher; +typedef struct _PublishingFacebookFacebookPublisherClass PublishingFacebookFacebookPublisherClass; + +#define PUBLISHING_FACEBOOK_TYPE_ALBUM (publishing_facebook_album_get_type ()) +#define PUBLISHING_FACEBOOK_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_ALBUM, PublishingFacebookAlbum)) +#define PUBLISHING_FACEBOOK_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_ALBUM, PublishingFacebookAlbumClass)) +#define PUBLISHING_FACEBOOK_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_ALBUM)) +#define PUBLISHING_FACEBOOK_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_ALBUM)) +#define PUBLISHING_FACEBOOK_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_ALBUM, PublishingFacebookAlbumClass)) + +typedef struct _PublishingFacebookAlbum PublishingFacebookAlbum; +typedef struct _PublishingFacebookAlbumClass PublishingFacebookAlbumClass; +typedef struct _PublishingFacebookAlbumPrivate PublishingFacebookAlbumPrivate; +typedef struct _PublishingFacebookParamSpecAlbum PublishingFacebookParamSpecAlbum; + +#define PUBLISHING_FACEBOOK_TYPE_RESOLUTION (publishing_facebook_resolution_get_type ()) + +#define PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS (publishing_facebook_publishing_parameters_get_type ()) +#define PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS, PublishingFacebookPublishingParameters)) +#define PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS, PublishingFacebookPublishingParametersClass)) +#define PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS, PublishingFacebookPublishingParametersClass)) + +typedef struct _PublishingFacebookPublishingParameters PublishingFacebookPublishingParameters; +typedef struct _PublishingFacebookPublishingParametersClass PublishingFacebookPublishingParametersClass; +typedef struct _PublishingFacebookPublishingParametersPrivate PublishingFacebookPublishingParametersPrivate; +#define _publishing_facebook_album_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_album_unref (var), NULL))) +typedef struct _PublishingFacebookParamSpecPublishingParameters PublishingFacebookParamSpecPublishingParameters; +typedef struct _PublishingFacebookFacebookPublisherPrivate PublishingFacebookFacebookPublisherPrivate; + +#define PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE (publishing_facebook_web_authentication_pane_get_type ()) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPaneClass)) +#define PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE)) +#define PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPaneClass)) + +typedef struct _PublishingFacebookWebAuthenticationPane PublishingFacebookWebAuthenticationPane; +typedef struct _PublishingFacebookWebAuthenticationPaneClass PublishingFacebookWebAuthenticationPaneClass; + +#define PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION (publishing_facebook_graph_session_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, PublishingFacebookGraphSession)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, PublishingFacebookGraphSessionClass)) +#define PUBLISHING_FACEBOOK_IS_GRAPH_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)) +#define PUBLISHING_FACEBOOK_IS_GRAPH_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, PublishingFacebookGraphSessionClass)) + +typedef struct _PublishingFacebookGraphSession PublishingFacebookGraphSession; +typedef struct _PublishingFacebookGraphSessionClass PublishingFacebookGraphSessionClass; + +#define PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE (publishing_facebook_publishing_options_pane_get_type ()) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPaneClass)) +#define PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPaneClass)) + +typedef struct _PublishingFacebookPublishingOptionsPane PublishingFacebookPublishingOptionsPane; +typedef struct _PublishingFacebookPublishingOptionsPaneClass PublishingFacebookPublishingOptionsPaneClass; + +#define PUBLISHING_FACEBOOK_TYPE_UPLOADER (publishing_facebook_uploader_get_type ()) +#define PUBLISHING_FACEBOOK_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_UPLOADER, PublishingFacebookUploader)) +#define PUBLISHING_FACEBOOK_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_UPLOADER, PublishingFacebookUploaderClass)) +#define PUBLISHING_FACEBOOK_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_UPLOADER)) +#define PUBLISHING_FACEBOOK_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_UPLOADER)) +#define PUBLISHING_FACEBOOK_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_UPLOADER, PublishingFacebookUploaderClass)) + +typedef struct _PublishingFacebookUploader PublishingFacebookUploader; +typedef struct _PublishingFacebookUploaderClass PublishingFacebookUploaderClass; +#define _publishing_facebook_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_publishing_parameters_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _publishing_facebook_graph_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_graph_session_unref (var), NULL))) +#define _publishing_facebook_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_uploader_unref (var), NULL))) + +#define PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE (publishing_facebook_graph_message_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)) +#define PUBLISHING_FACEBOOK_GRAPH_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessageClass)) +#define PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)) +#define PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessageClass)) + +typedef struct _PublishingFacebookGraphMessage PublishingFacebookGraphMessage; +typedef struct _PublishingFacebookGraphMessageClass PublishingFacebookGraphMessageClass; +#define _publishing_facebook_graph_message_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_graph_message_unref (var), NULL))) +#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL))) +#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL))) +#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) +typedef struct _PublishingFacebookWebAuthenticationPanePrivate PublishingFacebookWebAuthenticationPanePrivate; + +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP (publishing_facebook_web_authentication_pane_locale_lookup_get_type ()) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingFacebookWebAuthenticationPaneLocaleLookup)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingFacebookWebAuthenticationPaneLocaleLookupClass)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_IS_LOCALE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_IS_LOCALE_LOOKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)) +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingFacebookWebAuthenticationPaneLocaleLookupClass)) + +typedef struct _PublishingFacebookWebAuthenticationPaneLocaleLookup PublishingFacebookWebAuthenticationPaneLocaleLookup; +typedef struct _PublishingFacebookWebAuthenticationPaneLocaleLookupClass PublishingFacebookWebAuthenticationPaneLocaleLookupClass; +typedef struct _PublishingFacebookWebAuthenticationPaneLocaleLookupPrivate PublishingFacebookWebAuthenticationPaneLocaleLookupPrivate; +#define _publishing_facebook_web_authentication_pane_locale_lookup_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_web_authentication_pane_locale_lookup_unref (var), NULL))) +typedef struct _PublishingFacebookWebAuthenticationPaneParamSpecLocaleLookup PublishingFacebookWebAuthenticationPaneParamSpecLocaleLookup; +typedef struct _PublishingFacebookPublishingOptionsPanePrivate PublishingFacebookPublishingOptionsPanePrivate; + +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION (publishing_facebook_publishing_options_pane_privacy_description_get_type ()) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingFacebookPublishingOptionsPanePrivacyDescription)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_IS_PRIVACY_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_IS_PRIVACY_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)) +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass)) + +typedef struct _PublishingFacebookPublishingOptionsPanePrivacyDescription PublishingFacebookPublishingOptionsPanePrivacyDescription; +typedef struct _PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass; +#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) +typedef struct _PublishingFacebookPublishingOptionsPanePrivacyDescriptionPrivate PublishingFacebookPublishingOptionsPanePrivacyDescriptionPrivate; +#define _publishing_facebook_publishing_options_pane_privacy_description_unref0(var) ((var == NULL) ? NULL : (var = (publishing_facebook_publishing_options_pane_privacy_description_unref (var), NULL))) +typedef struct _PublishingFacebookPublishingOptionsPaneParamSpecPrivacyDescription PublishingFacebookPublishingOptionsPaneParamSpecPrivacyDescription; + +#define PUBLISHING_FACEBOOK_TYPE_ENDPOINT (publishing_facebook_endpoint_get_type ()) +typedef struct _PublishingFacebookGraphMessagePrivate PublishingFacebookGraphMessagePrivate; +typedef struct _PublishingFacebookParamSpecGraphMessage PublishingFacebookParamSpecGraphMessage; +typedef struct _PublishingFacebookGraphSessionPrivate PublishingFacebookGraphSessionPrivate; + +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL (publishing_facebook_graph_session_graph_message_impl_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_MESSAGE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_MESSAGE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImplClass)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_MESSAGE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_MESSAGE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_MESSAGE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImplClass)) + +typedef struct _PublishingFacebookGraphSessionGraphMessageImpl PublishingFacebookGraphSessionGraphMessageImpl; +typedef struct _PublishingFacebookGraphSessionGraphMessageImplClass PublishingFacebookGraphSessionGraphMessageImplClass; +typedef struct _PublishingFacebookGraphSessionGraphMessageImplPrivate PublishingFacebookGraphSessionGraphMessageImplPrivate; + +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE (publishing_facebook_graph_session_graph_endpoint_probe_message_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_ENDPOINT_PROBE_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE, PublishingFacebookGraphSessionGraphEndpointProbeMessage)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_ENDPOINT_PROBE_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE, PublishingFacebookGraphSessionGraphEndpointProbeMessageClass)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_ENDPOINT_PROBE_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_ENDPOINT_PROBE_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_ENDPOINT_PROBE_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE, PublishingFacebookGraphSessionGraphEndpointProbeMessageClass)) + +typedef struct _PublishingFacebookGraphSessionGraphEndpointProbeMessage PublishingFacebookGraphSessionGraphEndpointProbeMessage; +typedef struct _PublishingFacebookGraphSessionGraphEndpointProbeMessageClass PublishingFacebookGraphSessionGraphEndpointProbeMessageClass; + +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE (publishing_facebook_graph_session_graph_query_message_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_QUERY_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE, PublishingFacebookGraphSessionGraphQueryMessage)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_QUERY_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE, PublishingFacebookGraphSessionGraphQueryMessageClass)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_QUERY_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_QUERY_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_QUERY_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE, PublishingFacebookGraphSessionGraphQueryMessageClass)) + +typedef struct _PublishingFacebookGraphSessionGraphQueryMessage PublishingFacebookGraphSessionGraphQueryMessage; +typedef struct _PublishingFacebookGraphSessionGraphQueryMessageClass PublishingFacebookGraphSessionGraphQueryMessageClass; + +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE (publishing_facebook_graph_session_graph_upload_message_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessage)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessageClass)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_UPLOAD_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_UPLOAD_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessageClass)) + +typedef struct _PublishingFacebookGraphSessionGraphUploadMessage PublishingFacebookGraphSessionGraphUploadMessage; +typedef struct _PublishingFacebookGraphSessionGraphUploadMessageClass PublishingFacebookGraphSessionGraphUploadMessageClass; + +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE (publishing_facebook_graph_session_graph_create_album_message_get_type ()) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_CREATE_ALBUM_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE, PublishingFacebookGraphSessionGraphCreateAlbumMessage)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_CREATE_ALBUM_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE, PublishingFacebookGraphSessionGraphCreateAlbumMessageClass)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_CREATE_ALBUM_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_CREATE_ALBUM_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE)) +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_CREATE_ALBUM_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE, PublishingFacebookGraphSessionGraphCreateAlbumMessageClass)) + +typedef struct _PublishingFacebookGraphSessionGraphCreateAlbumMessage PublishingFacebookGraphSessionGraphCreateAlbumMessage; +typedef struct _PublishingFacebookGraphSessionGraphCreateAlbumMessageClass PublishingFacebookGraphSessionGraphCreateAlbumMessageClass; +typedef struct _PublishingFacebookGraphSessionGraphQueryMessagePrivate PublishingFacebookGraphSessionGraphQueryMessagePrivate; +#define __vala_SoupURI_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupURI_free (var), NULL))) +typedef struct _PublishingFacebookGraphSessionGraphEndpointProbeMessagePrivate PublishingFacebookGraphSessionGraphEndpointProbeMessagePrivate; +typedef struct _PublishingFacebookGraphSessionGraphUploadMessagePrivate PublishingFacebookGraphSessionGraphUploadMessagePrivate; +#define _g_mapped_file_unref0(var) ((var == NULL) ? NULL : (var = (g_mapped_file_unref (var), NULL))) +#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL))) +#define __vala_SoupMultipart_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupMultipart_free (var), NULL))) +#define __vala_SoupBuffer_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupBuffer_free (var), NULL))) +typedef struct _PublishingFacebookGraphSessionGraphCreateAlbumMessagePrivate PublishingFacebookGraphSessionGraphCreateAlbumMessagePrivate; +typedef struct _PublishingFacebookParamSpecGraphSession PublishingFacebookParamSpecGraphSession; +typedef struct _PublishingFacebookUploaderPrivate PublishingFacebookUploaderPrivate; +typedef struct _PublishingFacebookParamSpecUploader PublishingFacebookParamSpecUploader; +#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 _FacebookService { + GObject parent_instance; + FacebookServicePrivate * priv; +}; + +struct _FacebookServiceClass { + GObjectClass parent_class; +}; + +struct _PublishingFacebookAlbum { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookAlbumPrivate * priv; + gchar* name; + gchar* id; +}; + +struct _PublishingFacebookAlbumClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookAlbum *self); +}; + +struct _PublishingFacebookParamSpecAlbum { + GParamSpec parent_instance; +}; + +typedef enum { + PUBLISHING_FACEBOOK_RESOLUTION_STANDARD, + PUBLISHING_FACEBOOK_RESOLUTION_HIGH +} PublishingFacebookResolution; + +struct _PublishingFacebookPublishingParameters { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookPublishingParametersPrivate * priv; + gboolean strip_metadata; + PublishingFacebookAlbum** albums; + gint albums_length1; + gint _albums_size_; + gint target_album; + gchar* new_album_name; + gchar* privacy_object; + PublishingFacebookResolution resolution; +}; + +struct _PublishingFacebookPublishingParametersClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookPublishingParameters *self); +}; + +struct _PublishingFacebookParamSpecPublishingParameters { + GParamSpec parent_instance; +}; + +struct _PublishingFacebookFacebookPublisher { + GObject parent_instance; + PublishingFacebookFacebookPublisherPrivate * priv; +}; + +struct _PublishingFacebookFacebookPublisherClass { + GObjectClass parent_class; +}; + +struct _PublishingFacebookFacebookPublisherPrivate { + PublishingFacebookPublishingParameters* publishing_params; + SpitPublishingPluginHost* host; + PublishingFacebookWebAuthenticationPane* web_auth_pane; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; + SpitPublishingService* service; + gboolean running; + PublishingFacebookGraphSession* graph_session; + PublishingFacebookPublishingOptionsPane* publishing_options_pane; + PublishingFacebookUploader* uploader; + gchar* uid; + gchar* username; +}; + +struct _PublishingFacebookWebAuthenticationPane { + GObject parent_instance; + PublishingFacebookWebAuthenticationPanePrivate * priv; +}; + +struct _PublishingFacebookWebAuthenticationPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingFacebookWebAuthenticationPanePrivate { + WebKitWebView* webview; + GtkBox* pane_widget; + GtkScrolledWindow* webview_frame; + PublishingFacebookWebAuthenticationPaneLocaleLookup** locale_lookup_table; + gint locale_lookup_table_length1; + gint _locale_lookup_table_size_; +}; + +struct _PublishingFacebookWebAuthenticationPaneLocaleLookup { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookWebAuthenticationPaneLocaleLookupPrivate * priv; + gchar* prefix; + gchar* translation; + gchar* exception_code; + gchar* exception_translation; + gchar* exception_code_2; + gchar* exception_translation_2; +}; + +struct _PublishingFacebookWebAuthenticationPaneLocaleLookupClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookWebAuthenticationPaneLocaleLookup *self); +}; + +struct _PublishingFacebookWebAuthenticationPaneParamSpecLocaleLookup { + GParamSpec parent_instance; +}; + +struct _PublishingFacebookPublishingOptionsPane { + GObject parent_instance; + PublishingFacebookPublishingOptionsPanePrivate * priv; +}; + +struct _PublishingFacebookPublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingFacebookPublishingOptionsPanePrivate { + GtkBuilder* builder; + GtkBox* pane_widget; + GtkRadioButton* use_existing_radio; + GtkRadioButton* create_new_radio; + GtkComboBoxText* existing_albums_combo; + GtkComboBoxText* visibility_combo; + GtkEntry* new_album_entry; + GtkCheckButton* strip_metadata_check; + GtkButton* publish_button; + GtkButton* logout_button; + GtkLabel* how_to_label; + PublishingFacebookAlbum** albums; + gint albums_length1; + gint _albums_size_; + PublishingFacebookFacebookPublisher* publisher; + PublishingFacebookPublishingOptionsPanePrivacyDescription** privacy_descriptions; + gint privacy_descriptions_length1; + gint _privacy_descriptions_size_; + PublishingFacebookResolution* possible_resolutions; + gint possible_resolutions_length1; + gint _possible_resolutions_size_; + GtkComboBoxText* resolution_combo; + SpitPublishingPublisherMediaType media_type; +}; + +struct _PublishingFacebookPublishingOptionsPanePrivacyDescription { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookPublishingOptionsPanePrivacyDescriptionPrivate * priv; + gchar* description; + gchar* privacy_setting; +}; + +struct _PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookPublishingOptionsPanePrivacyDescription *self); +}; + +struct _PublishingFacebookPublishingOptionsPaneParamSpecPrivacyDescription { + GParamSpec parent_instance; +}; + +typedef enum { + PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT, + PUBLISHING_FACEBOOK_ENDPOINT_VIDEO, + PUBLISHING_FACEBOOK_ENDPOINT_TEST_CONNECTION +} PublishingFacebookEndpoint; + +struct _PublishingFacebookGraphMessage { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookGraphMessagePrivate * priv; +}; + +struct _PublishingFacebookGraphMessageClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookGraphMessage *self); + gchar* (*get_uri) (PublishingFacebookGraphMessage* self); + gchar* (*get_response_body) (PublishingFacebookGraphMessage* self); +}; + +struct _PublishingFacebookParamSpecGraphMessage { + GParamSpec parent_instance; +}; + +struct _PublishingFacebookGraphSession { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookGraphSessionPrivate * priv; +}; + +struct _PublishingFacebookGraphSessionClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookGraphSession *self); +}; + +struct _PublishingFacebookGraphSessionPrivate { + SoupSession* soup_session; + gchar* access_token; + PublishingFacebookGraphMessage* current_message; +}; + +struct _PublishingFacebookGraphSessionGraphMessageImpl { + PublishingFacebookGraphMessage parent_instance; + PublishingFacebookGraphSessionGraphMessageImplPrivate * priv; + PublishingRESTSupportHttpMethod method; + gchar* uri; + gchar* access_token; + SoupMessage* soup_message; + PublishingFacebookGraphSession* host_session; + gint bytes_so_far; +}; + +struct _PublishingFacebookGraphSessionGraphMessageImplClass { + PublishingFacebookGraphMessageClass parent_class; + gboolean (*prepare_for_transmission) (PublishingFacebookGraphSessionGraphMessageImpl* self); +}; + +struct _PublishingFacebookGraphSessionGraphQueryMessage { + PublishingFacebookGraphSessionGraphMessageImpl parent_instance; + PublishingFacebookGraphSessionGraphQueryMessagePrivate * priv; +}; + +struct _PublishingFacebookGraphSessionGraphQueryMessageClass { + PublishingFacebookGraphSessionGraphMessageImplClass parent_class; +}; + +struct _PublishingFacebookGraphSessionGraphEndpointProbeMessage { + PublishingFacebookGraphSessionGraphMessageImpl parent_instance; + PublishingFacebookGraphSessionGraphEndpointProbeMessagePrivate * priv; +}; + +struct _PublishingFacebookGraphSessionGraphEndpointProbeMessageClass { + PublishingFacebookGraphSessionGraphMessageImplClass parent_class; +}; + +struct _PublishingFacebookGraphSessionGraphUploadMessage { + PublishingFacebookGraphSessionGraphMessageImpl parent_instance; + PublishingFacebookGraphSessionGraphUploadMessagePrivate * priv; +}; + +struct _PublishingFacebookGraphSessionGraphUploadMessageClass { + PublishingFacebookGraphSessionGraphMessageImplClass parent_class; +}; + +struct _PublishingFacebookGraphSessionGraphUploadMessagePrivate { + GMappedFile* mapped_file; + SpitPublishingPublishable* publishable; +}; + +struct _PublishingFacebookGraphSessionGraphCreateAlbumMessage { + PublishingFacebookGraphSessionGraphMessageImpl parent_instance; + PublishingFacebookGraphSessionGraphCreateAlbumMessagePrivate * priv; +}; + +struct _PublishingFacebookGraphSessionGraphCreateAlbumMessageClass { + PublishingFacebookGraphSessionGraphMessageImplClass parent_class; +}; + +struct _PublishingFacebookParamSpecGraphSession { + GParamSpec parent_instance; +}; + +struct _PublishingFacebookUploader { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFacebookUploaderPrivate * priv; +}; + +struct _PublishingFacebookUploaderClass { + GTypeClass parent_class; + void (*finalize) (PublishingFacebookUploader *self); +}; + +struct _PublishingFacebookUploaderPrivate { + gint current_file; + SpitPublishingPublishable** publishables; + gint publishables_length1; + gint _publishables_size_; + PublishingFacebookGraphSession* session; + PublishingFacebookPublishingParameters* publishing_params; + SpitPublishingProgressCallback status_updated; + gpointer status_updated_target; +}; + +struct _PublishingFacebookParamSpecUploader { + GParamSpec parent_instance; +}; + + +static gpointer facebook_service_parent_class = NULL; +static GdkPixbuf** facebook_service_icon_pixbuf_set; +static gint facebook_service_icon_pixbuf_set_length1; +static GdkPixbuf** facebook_service_icon_pixbuf_set = NULL; +static gint facebook_service_icon_pixbuf_set_length1 = 0; +static gint _facebook_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* facebook_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface* facebook_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_facebook_album_parent_class = NULL; +static gpointer publishing_facebook_publishing_parameters_parent_class = NULL; +static gpointer publishing_facebook_facebook_publisher_parent_class = NULL; +static SpitPublishingPublisherIface* publishing_facebook_facebook_publisher_spit_publishing_publisher_parent_iface = NULL; +static gpointer publishing_facebook_web_authentication_pane_parent_class = NULL; +static gboolean publishing_facebook_web_authentication_pane_cache_dirty; +static gboolean publishing_facebook_web_authentication_pane_cache_dirty = FALSE; +static gpointer publishing_facebook_web_authentication_pane_locale_lookup_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_facebook_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_facebook_publishing_options_pane_parent_class = NULL; +static gpointer publishing_facebook_publishing_options_pane_privacy_description_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_facebook_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_facebook_graph_message_parent_class = NULL; +static gpointer publishing_facebook_graph_session_parent_class = NULL; +static gpointer publishing_facebook_graph_session_graph_message_impl_parent_class = NULL; +static gpointer publishing_facebook_graph_session_graph_query_message_parent_class = NULL; +static gpointer publishing_facebook_graph_session_graph_endpoint_probe_message_parent_class = NULL; +static gpointer publishing_facebook_graph_session_graph_upload_message_parent_class = NULL; +static gpointer publishing_facebook_graph_session_graph_create_album_message_parent_class = NULL; +static gpointer publishing_facebook_uploader_parent_class = NULL; + +GType facebook_service_get_type (void) G_GNUC_CONST; +enum { + FACEBOOK_SERVICE_DUMMY_PROPERTY +}; +#define FACEBOOK_SERVICE_ICON_FILENAME "facebook.png" +FacebookService* facebook_service_new (GFile* resource_directory); +FacebookService* facebook_service_construct (GType object_type, GFile* resource_directory); +static gint facebook_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* facebook_service_real_get_id (SpitPluggable* base); +static const gchar* facebook_service_real_get_pluggable_name (SpitPluggable* base); +static void facebook_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length); +static void facebook_service_real_activation (SpitPluggable* base, gboolean enabled); +static SpitPublishingPublisher* facebook_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingFacebookFacebookPublisher* publishing_facebook_facebook_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingFacebookFacebookPublisher* publishing_facebook_facebook_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_facebook_facebook_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType facebook_service_real_get_supported_media (SpitPublishingService* base); +static void facebook_service_finalize (GObject* obj); +#define PUBLISHING_FACEBOOK_SERVICE_NAME "facebook" +#define PUBLISHING_FACEBOOK_USER_VISIBLE_NAME "Facebook" +#define PUBLISHING_FACEBOOK_APPLICATION_ID "1612018629063184" +#define PUBLISHING_FACEBOOK_DEFAULT_ALBUM_NAME _ ("Shotwell Connect") +#define PUBLISHING_FACEBOOK_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Facebook.\n" \ +"\n" \ +"If you don't yet have a Facebook account, you can create one during th" \ +"e login process. During login, Shotwell Connect may ask you for permis" \ +"sion to upload photos and publish to your feed. These permissions are " \ +"required for Shotwell Connect to function.") +#define PUBLISHING_FACEBOOK_RESTART_ERROR_MESSAGE _ ("You have already logged in and out of Facebook during this Shotwell se" \ +"ssion.\n" \ +"To continue publishing to Facebook, quit and restart Shotwell, then tr" \ +"y publishing again.") +#define PUBLISHING_FACEBOOK_USER_AGENT "Java/1.6.0_16" +#define PUBLISHING_FACEBOOK_EXPIRED_SESSION_STATUS_CODE 400 +gpointer publishing_facebook_album_ref (gpointer instance); +void publishing_facebook_album_unref (gpointer instance); +GParamSpec* publishing_facebook_param_spec_album (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_facebook_value_set_album (GValue* value, gpointer v_object); +void publishing_facebook_value_take_album (GValue* value, gpointer v_object); +gpointer publishing_facebook_value_get_album (const GValue* value); +GType publishing_facebook_album_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_FACEBOOK_ALBUM_DUMMY_PROPERTY +}; +PublishingFacebookAlbum* publishing_facebook_album_new (const gchar* name, const gchar* id); +PublishingFacebookAlbum* publishing_facebook_album_construct (GType object_type, const gchar* name, const gchar* id); +static void publishing_facebook_album_finalize (PublishingFacebookAlbum* obj); +GType publishing_facebook_resolution_get_type (void) G_GNUC_CONST; +gchar* publishing_facebook_resolution_get_name (PublishingFacebookResolution self); +const gchar* publishing_facebook_resolution_to_string (PublishingFacebookResolution self); +gint publishing_facebook_resolution_get_pixels (PublishingFacebookResolution self); +gpointer publishing_facebook_publishing_parameters_ref (gpointer instance); +void publishing_facebook_publishing_parameters_unref (gpointer instance); +GParamSpec* publishing_facebook_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_facebook_value_set_publishing_parameters (GValue* value, gpointer v_object); +void publishing_facebook_value_take_publishing_parameters (GValue* value, gpointer v_object); +gpointer publishing_facebook_value_get_publishing_parameters (const GValue* value); +GType publishing_facebook_publishing_parameters_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_DUMMY_PROPERTY +}; +#define PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM -1 +PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_new (void); +PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_construct (GType object_type); +void publishing_facebook_publishing_parameters_add_album (PublishingFacebookPublishingParameters* self, const gchar* name, const gchar* id); +static void _vala_array_add6 (PublishingFacebookAlbum*** array, int* length, int* size, PublishingFacebookAlbum* value); +void publishing_facebook_publishing_parameters_set_target_album_by_name (PublishingFacebookPublishingParameters* self, const gchar* name); +gchar* publishing_facebook_publishing_parameters_get_target_album_name (PublishingFacebookPublishingParameters* self); +gchar* publishing_facebook_publishing_parameters_get_target_album_id (PublishingFacebookPublishingParameters* self); +static void publishing_facebook_publishing_parameters_finalize (PublishingFacebookPublishingParameters* obj); +GType publishing_facebook_web_authentication_pane_get_type (void) G_GNUC_CONST; +gpointer publishing_facebook_graph_session_ref (gpointer instance); +void publishing_facebook_graph_session_unref (gpointer instance); +GParamSpec* publishing_facebook_param_spec_graph_session (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_facebook_value_set_graph_session (GValue* value, gpointer v_object); +void publishing_facebook_value_take_graph_session (GValue* value, gpointer v_object); +gpointer publishing_facebook_value_get_graph_session (const GValue* value); +GType publishing_facebook_graph_session_get_type (void) G_GNUC_CONST; +GType publishing_facebook_publishing_options_pane_get_type (void) G_GNUC_CONST; +gpointer publishing_facebook_uploader_ref (gpointer instance); +void publishing_facebook_uploader_unref (gpointer instance); +GParamSpec* publishing_facebook_param_spec_uploader (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_facebook_value_set_uploader (GValue* value, gpointer v_object); +void publishing_facebook_value_take_uploader (GValue* value, gpointer v_object); +gpointer publishing_facebook_value_get_uploader (const GValue* value); +GType publishing_facebook_uploader_get_type (void) G_GNUC_CONST; +#define PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisherPrivate)) +enum { + PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER_DUMMY_PROPERTY +}; +PublishingFacebookGraphSession* publishing_facebook_graph_session_new (void); +PublishingFacebookGraphSession* publishing_facebook_graph_session_construct (GType object_type); +static void publishing_facebook_facebook_publisher_on_session_authenticated (PublishingFacebookFacebookPublisher* self); +static void _publishing_facebook_facebook_publisher_on_session_authenticated_publishing_facebook_graph_session_authenticated (PublishingFacebookGraphSession* _sender, gpointer self); +static gboolean publishing_facebook_facebook_publisher_is_persistent_session_valid (PublishingFacebookFacebookPublisher* self); +static gchar* publishing_facebook_facebook_publisher_get_persistent_access_token (PublishingFacebookFacebookPublisher* self); +static gboolean publishing_facebook_facebook_publisher_get_persistent_strip_metadata (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_set_persistent_access_token (PublishingFacebookFacebookPublisher* self, const gchar* access_token); +static void publishing_facebook_facebook_publisher_set_persistent_strip_metadata (PublishingFacebookFacebookPublisher* self, gboolean strip_metadata); +gint publishing_facebook_facebook_publisher_get_persistent_default_size (PublishingFacebookFacebookPublisher* self); +void publishing_facebook_facebook_publisher_set_persistent_default_size (PublishingFacebookFacebookPublisher* self, gint size); +static void publishing_facebook_facebook_publisher_invalidate_persistent_session (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_do_show_service_welcome_pane (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_on_login_clicked (PublishingFacebookFacebookPublisher* self); +static void _publishing_facebook_facebook_publisher_on_login_clicked_spit_publishing_login_callback (gpointer self); +static void publishing_facebook_facebook_publisher_do_test_connection_to_endpoint (PublishingFacebookFacebookPublisher* self); +gpointer publishing_facebook_graph_message_ref (gpointer instance); +void publishing_facebook_graph_message_unref (gpointer instance); +GParamSpec* publishing_facebook_param_spec_graph_message (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_facebook_value_set_graph_message (GValue* value, gpointer v_object); +void publishing_facebook_value_take_graph_message (GValue* value, gpointer v_object); +gpointer publishing_facebook_value_get_graph_message (const GValue* value); +GType publishing_facebook_graph_message_get_type (void) G_GNUC_CONST; +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_endpoint_test (PublishingFacebookGraphSession* self); +static void publishing_facebook_facebook_publisher_on_endpoint_test_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message); +static void _publishing_facebook_facebook_publisher_on_endpoint_test_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_on_endpoint_test_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* _error_); +static void _publishing_facebook_facebook_publisher_on_endpoint_test_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self); +void publishing_facebook_graph_session_send_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* message); +static void publishing_facebook_facebook_publisher_do_fetch_user_info (PublishingFacebookFacebookPublisher* self); +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_query (PublishingFacebookGraphSession* self, const gchar* resource_path); +static void publishing_facebook_facebook_publisher_on_fetch_user_info_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message); +static void _publishing_facebook_facebook_publisher_on_fetch_user_info_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_on_fetch_user_info_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* _error_); +static void _publishing_facebook_facebook_publisher_on_fetch_user_info_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self); +static void publishing_facebook_facebook_publisher_do_fetch_album_descriptions (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_on_fetch_albums_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message); +static void _publishing_facebook_facebook_publisher_on_fetch_albums_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_on_fetch_albums_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* err); +static void _publishing_facebook_facebook_publisher_on_fetch_albums_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self); +static void publishing_facebook_facebook_publisher_do_extract_user_info_from_json (PublishingFacebookFacebookPublisher* self, const gchar* json); +static JsonNode* _vala_JsonNode_copy (JsonNode* self); +static void _vala_JsonNode_free (JsonNode* self); +static void publishing_facebook_facebook_publisher_on_user_info_extracted (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_do_extract_albums_from_json (PublishingFacebookFacebookPublisher* self, const gchar* json); +static void publishing_facebook_facebook_publisher_on_albums_extracted (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_do_create_new_album (PublishingFacebookFacebookPublisher* self); +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_create_album (PublishingFacebookGraphSession* self, const gchar* album_name, const gchar* privacy); +static void publishing_facebook_facebook_publisher_on_create_album_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message); +static void _publishing_facebook_facebook_publisher_on_create_album_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_on_create_album_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* err); +static void _publishing_facebook_facebook_publisher_on_create_album_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self); +static void publishing_facebook_facebook_publisher_do_show_publishing_options_pane (PublishingFacebookFacebookPublisher* self); +PublishingFacebookPublishingOptionsPane* publishing_facebook_publishing_options_pane_new (const gchar* username, PublishingFacebookAlbum** albums, int albums_length1, SpitPublishingPublisherMediaType media_type, PublishingFacebookFacebookPublisher* publisher, GtkBuilder* builder, gboolean strip_metadata); +PublishingFacebookPublishingOptionsPane* publishing_facebook_publishing_options_pane_construct (GType object_type, const gchar* username, PublishingFacebookAlbum** albums, int albums_length1, SpitPublishingPublisherMediaType media_type, PublishingFacebookFacebookPublisher* publisher, GtkBuilder* builder, gboolean strip_metadata); +static void publishing_facebook_facebook_publisher_on_publishing_options_pane_logout (PublishingFacebookFacebookPublisher* self); +static void _publishing_facebook_facebook_publisher_on_publishing_options_pane_logout_publishing_facebook_publishing_options_pane_logout (PublishingFacebookPublishingOptionsPane* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_on_publishing_options_pane_publish (PublishingFacebookFacebookPublisher* self, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution resolution, gboolean strip_metadata); +static void _publishing_facebook_facebook_publisher_on_publishing_options_pane_publish_publishing_facebook_publishing_options_pane_publish (PublishingFacebookPublishingOptionsPane* _sender, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution, gboolean strip_metadata, gpointer self); +static void publishing_facebook_facebook_publisher_do_logout (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_do_add_new_local_album_from_json (PublishingFacebookFacebookPublisher* self, const gchar* album_name, const gchar* json); +static void publishing_facebook_facebook_publisher_do_upload (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_do_hosted_web_authentication (PublishingFacebookFacebookPublisher* self); +PublishingFacebookWebAuthenticationPane* publishing_facebook_web_authentication_pane_new (void); +PublishingFacebookWebAuthenticationPane* publishing_facebook_web_authentication_pane_construct (GType object_type); +static void publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded (PublishingFacebookFacebookPublisher* self, const gchar* success_url); +static void _publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded_publishing_facebook_web_authentication_pane_login_succeeded (PublishingFacebookWebAuthenticationPane* _sender, const gchar* success_url, gpointer self); +static void publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed (PublishingFacebookFacebookPublisher* self); +static void _publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed_publishing_facebook_web_authentication_pane_login_failed (PublishingFacebookWebAuthenticationPane* _sender, gpointer self); +static void publishing_facebook_facebook_publisher_do_authenticate_session (PublishingFacebookFacebookPublisher* self, const gchar* good_login_uri); +void publishing_facebook_graph_session_authenticate (PublishingFacebookGraphSession* self, const gchar* access_token); +static void publishing_facebook_facebook_publisher_do_save_session_information (PublishingFacebookFacebookPublisher* self); +gchar* publishing_facebook_graph_session_get_access_token (PublishingFacebookGraphSession* self); +PublishingFacebookUploader* publishing_facebook_uploader_new (PublishingFacebookGraphSession* session, PublishingFacebookPublishingParameters* publishing_params, SpitPublishingPublishable** publishables, int publishables_length1); +PublishingFacebookUploader* publishing_facebook_uploader_construct (GType object_type, PublishingFacebookGraphSession* session, PublishingFacebookPublishingParameters* publishing_params, SpitPublishingPublishable** publishables, int publishables_length1); +static void publishing_facebook_facebook_publisher_on_upload_complete (PublishingFacebookFacebookPublisher* self, PublishingFacebookUploader* uploader, gint num_published); +static void _publishing_facebook_facebook_publisher_on_upload_complete_publishing_facebook_uploader_upload_complete (PublishingFacebookUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_facebook_facebook_publisher_on_upload_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookUploader* uploader, GError* err); +static void _publishing_facebook_facebook_publisher_on_upload_error_publishing_facebook_uploader_upload_error (PublishingFacebookUploader* _sender, GError* err, gpointer self); +void publishing_facebook_uploader_upload (PublishingFacebookUploader* self, SpitPublishingProgressCallback status_updated, void* status_updated_target); +static void publishing_facebook_facebook_publisher_on_upload_status_updated (PublishingFacebookFacebookPublisher* self, gint file_number, gdouble completed_fraction); +static void _publishing_facebook_facebook_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +static void publishing_facebook_facebook_publisher_do_show_success_pane (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_on_generic_error (PublishingFacebookFacebookPublisher* self, GError* _error_); +gboolean publishing_facebook_graph_session_is_authenticated (PublishingFacebookGraphSession* self); +gchar* publishing_facebook_graph_message_get_response_body (PublishingFacebookGraphMessage* self); +static SpitPublishingService* publishing_facebook_facebook_publisher_real_get_service (SpitPublishingPublisher* base); +gchar* publishing_facebook_facebook_publisher_get_service_name (PublishingFacebookFacebookPublisher* self); +gchar* publishing_facebook_facebook_publisher_get_user_visible_name (PublishingFacebookFacebookPublisher* self); +static void publishing_facebook_facebook_publisher_real_start (SpitPublishingPublisher* base); +gboolean publishing_facebook_web_authentication_pane_is_cache_dirty (void); +static void publishing_facebook_facebook_publisher_real_stop (SpitPublishingPublisher* base); +void publishing_facebook_graph_session_stop_transactions (PublishingFacebookGraphSession* self); +static gboolean publishing_facebook_facebook_publisher_real_is_running (SpitPublishingPublisher* base); +static void publishing_facebook_facebook_publisher_finalize (GObject* obj); +static gpointer publishing_facebook_web_authentication_pane_locale_lookup_ref (gpointer instance); +static void publishing_facebook_web_authentication_pane_locale_lookup_unref (gpointer instance); +static GParamSpec* publishing_facebook_web_authentication_pane_param_spec_locale_lookup (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_facebook_web_authentication_pane_value_set_locale_lookup (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_facebook_web_authentication_pane_value_take_locale_lookup (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_facebook_web_authentication_pane_value_get_locale_lookup (const GValue* value) G_GNUC_UNUSED; +static GType publishing_facebook_web_authentication_pane_locale_lookup_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPanePrivate)) +enum { + PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY +}; +static PublishingFacebookWebAuthenticationPaneLocaleLookup* publishing_facebook_web_authentication_pane_locale_lookup_new (const gchar* prefix, const gchar* translation, const gchar* exception_code, const gchar* exception_translation, const gchar* exception_code_2, const gchar* exception_translation_2); +static PublishingFacebookWebAuthenticationPaneLocaleLookup* publishing_facebook_web_authentication_pane_locale_lookup_construct (GType object_type, const gchar* prefix, const gchar* translation, const gchar* exception_code, const gchar* exception_translation, const gchar* exception_code_2, const gchar* exception_translation_2); +static void publishing_facebook_web_authentication_pane_on_page_load_changed (PublishingFacebookWebAuthenticationPane* self, WebKitLoadEvent load_event); +static void _publishing_facebook_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self); +static gboolean __lambda4_ (PublishingFacebookWebAuthenticationPane* self); +static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self); +static gchar* publishing_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (PublishingFacebookWebAuthenticationPane* self); +static gchar* publishing_facebook_web_authentication_pane_get_login_url (PublishingFacebookWebAuthenticationPane* self); +static void publishing_facebook_web_authentication_pane_on_page_load (PublishingFacebookWebAuthenticationPane* self); +static void publishing_facebook_web_authentication_pane_on_load_started (PublishingFacebookWebAuthenticationPane* self); +static GtkWidget* publishing_facebook_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_facebook_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_facebook_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_facebook_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +enum { + PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_DUMMY_PROPERTY +}; +static void publishing_facebook_web_authentication_pane_locale_lookup_finalize (PublishingFacebookWebAuthenticationPaneLocaleLookup* obj); +static void publishing_facebook_web_authentication_pane_finalize (GObject* obj); +static gpointer publishing_facebook_publishing_options_pane_privacy_description_ref (gpointer instance); +static void publishing_facebook_publishing_options_pane_privacy_description_unref (gpointer instance); +static GParamSpec* publishing_facebook_publishing_options_pane_param_spec_privacy_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_facebook_publishing_options_pane_value_set_privacy_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_facebook_publishing_options_pane_value_take_privacy_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_facebook_publishing_options_pane_value_get_privacy_description (const GValue* value) G_GNUC_UNUSED; +static GType publishing_facebook_publishing_options_pane_privacy_description_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPanePrivate)) +enum { + PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_HEADER_LABEL_TEXT _ ("You are logged into Facebook as %s.\n\n") +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PHOTOS_LABEL_TEXT _ ("Where would you like to publish the selected photos?") +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_RESOLUTION_LABEL_TEXT _ ("Upload _size:") +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_CONTENT_GROUP_SPACING 32 +#define PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_STANDARD_ACTION_BUTTON_WIDTH 128 +static PublishingFacebookAlbum** _vala_array_dup2 (PublishingFacebookAlbum** self, int length); +static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_facebook_publishing_options_pane_create_privacy_descriptions (PublishingFacebookPublishingOptionsPane* self, int* result_length1); +static PublishingFacebookResolution* publishing_facebook_publishing_options_pane_create_resolution_list (PublishingFacebookPublishingOptionsPane* self, int* result_length1); +static void publishing_facebook_publishing_options_pane_on_create_new_toggled (PublishingFacebookPublishingOptionsPane* self); +static void _publishing_facebook_publishing_options_pane_on_create_new_toggled_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_facebook_publishing_options_pane_on_use_existing_toggled (PublishingFacebookPublishingOptionsPane* self); +static void _publishing_facebook_publishing_options_pane_on_use_existing_toggled_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_facebook_publishing_options_pane_setup_visibility_combo (PublishingFacebookPublishingOptionsPane* self); +static void publishing_facebook_publishing_options_pane_on_publish_button_clicked (PublishingFacebookPublishingOptionsPane* self); +static void _publishing_facebook_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_facebook_publishing_options_pane_on_logout_button_clicked (PublishingFacebookPublishingOptionsPane* self); +static void _publishing_facebook_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_facebook_publishing_options_pane_setup_resolution_combo (PublishingFacebookPublishingOptionsPane* self); +static void publishing_facebook_publishing_options_pane_on_size_changed (PublishingFacebookPublishingOptionsPane* self); +static void _publishing_facebook_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static gboolean publishing_facebook_publishing_options_pane_publishing_photos (PublishingFacebookPublishingOptionsPane* self); +static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_new (const gchar* description, const gchar* privacy_setting); +static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, const gchar* privacy_setting); +static void _vala_array_add7 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add9 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add10 (PublishingFacebookResolution** array, int* length, int* size, PublishingFacebookResolution value); +static void _vala_array_add11 (PublishingFacebookResolution** array, int* length, int* size, PublishingFacebookResolution value); +void publishing_facebook_publishing_options_pane_installed (PublishingFacebookPublishingOptionsPane* self); +static void publishing_facebook_publishing_options_pane_notify_logout (PublishingFacebookPublishingOptionsPane* self); +static void publishing_facebook_publishing_options_pane_notify_publish (PublishingFacebookPublishingOptionsPane* self, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution); +static GtkWidget* publishing_facebook_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_facebook_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_facebook_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void _publishing_facebook_publishing_options_pane_notify_logout_publishing_facebook_publishing_options_pane_logout (PublishingFacebookPublishingOptionsPane* _sender, gpointer self); +static void _publishing_facebook_publishing_options_pane_notify_publish_publishing_facebook_publishing_options_pane_publish (PublishingFacebookPublishingOptionsPane* _sender, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution, gboolean strip_metadata, gpointer self); +static void publishing_facebook_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void g_cclosure_user_marshal_VOID__STRING_STRING_ENUM_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +enum { + PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_DUMMY_PROPERTY +}; +static void publishing_facebook_publishing_options_pane_privacy_description_finalize (PublishingFacebookPublishingOptionsPanePrivacyDescription* obj); +static void publishing_facebook_publishing_options_pane_finalize (GObject* obj); +GType publishing_facebook_endpoint_get_type (void) G_GNUC_CONST; +gchar* publishing_facebook_endpoint_to_uri (PublishingFacebookEndpoint self); +enum { + PUBLISHING_FACEBOOK_GRAPH_MESSAGE_DUMMY_PROPERTY +}; +gchar* publishing_facebook_graph_message_get_uri (PublishingFacebookGraphMessage* self); +static gchar* publishing_facebook_graph_message_real_get_uri (PublishingFacebookGraphMessage* self); +static gchar* publishing_facebook_graph_message_real_get_response_body (PublishingFacebookGraphMessage* self); +PublishingFacebookGraphMessage* publishing_facebook_graph_message_construct (GType object_type); +static void g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void publishing_facebook_graph_message_finalize (PublishingFacebookGraphMessage* obj); +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, PublishingFacebookGraphSessionPrivate)) +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_DUMMY_PROPERTY +}; +static void publishing_facebook_graph_session_on_request_unqueued (PublishingFacebookGraphSession* self, SoupMessage* msg); +static void _publishing_facebook_graph_session_on_request_unqueued_soup_session_request_unqueued (SoupSession* _sender, SoupMessage* msg, gpointer self); +static void publishing_facebook_graph_session_manage_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* msg); +static void publishing_facebook_graph_session_unmanage_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* msg); +static GType publishing_facebook_graph_session_graph_message_impl_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static void publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data (PublishingFacebookGraphSessionGraphMessageImpl* self, SoupBuffer* chunk); +static void _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data (SoupMessage* _sender, SoupBuffer* chunk, gpointer self); +static PublishingFacebookGraphSessionGraphEndpointProbeMessage* publishing_facebook_graph_session_graph_endpoint_probe_message_new (PublishingFacebookGraphSession* host_session); +static PublishingFacebookGraphSessionGraphEndpointProbeMessage* publishing_facebook_graph_session_graph_endpoint_probe_message_construct (GType object_type, PublishingFacebookGraphSession* host_session); +static GType publishing_facebook_graph_session_graph_endpoint_probe_message_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static PublishingFacebookGraphSessionGraphQueryMessage* publishing_facebook_graph_session_graph_query_message_new (PublishingFacebookGraphSession* host_session, const gchar* relative_uri, const gchar* access_token); +static PublishingFacebookGraphSessionGraphQueryMessage* publishing_facebook_graph_session_graph_query_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* relative_uri, const gchar* access_token); +static GType publishing_facebook_graph_session_graph_query_message_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_upload (PublishingFacebookGraphSession* self, const gchar* resource_path, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy); +static PublishingFacebookGraphSessionGraphUploadMessage* publishing_facebook_graph_session_graph_upload_message_new (PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* relative_uri, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy); +static PublishingFacebookGraphSessionGraphUploadMessage* publishing_facebook_graph_session_graph_upload_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* relative_uri, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy); +static GType publishing_facebook_graph_session_graph_upload_message_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static PublishingFacebookGraphSessionGraphCreateAlbumMessage* publishing_facebook_graph_session_graph_create_album_message_new (PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* album_name, const gchar* album_privacy); +static PublishingFacebookGraphSessionGraphCreateAlbumMessage* publishing_facebook_graph_session_graph_create_album_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* album_name, const gchar* album_privacy); +static GType publishing_facebook_graph_session_graph_create_album_message_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static gboolean publishing_facebook_graph_session_graph_message_impl_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* self); +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_MESSAGE_IMPL_DUMMY_PROPERTY +}; +static PublishingFacebookGraphSessionGraphMessageImpl* publishing_facebook_graph_session_graph_message_impl_construct (GType object_type, PublishingFacebookGraphSession* host_session, PublishingRESTSupportHttpMethod method, const gchar* relative_uri, const gchar* access_token, PublishingFacebookEndpoint endpoint); +static gboolean publishing_facebook_graph_session_graph_message_impl_real_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* self); +static gchar* publishing_facebook_graph_session_graph_message_impl_real_get_uri (PublishingFacebookGraphMessage* base); +static gchar* publishing_facebook_graph_session_graph_message_impl_real_get_response_body (PublishingFacebookGraphMessage* base); +static void publishing_facebook_graph_session_graph_message_impl_finalize (PublishingFacebookGraphMessage* obj); +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_QUERY_MESSAGE_DUMMY_PROPERTY +}; +static void _vala_SoupURI_free (SoupURI* self); +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_ENDPOINT_PROBE_MESSAGE_DUMMY_PROPERTY +}; +#define PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessagePrivate)) +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE_DUMMY_PROPERTY +}; +static void _vala_SoupMultipart_free (SoupMultipart* self); +static void _vala_SoupBuffer_free (SoupBuffer* self); +static gboolean publishing_facebook_graph_session_graph_upload_message_real_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* base); +static void publishing_facebook_graph_session_graph_upload_message_finalize (PublishingFacebookGraphMessage* obj); +enum { + PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_CREATE_ALBUM_MESSAGE_DUMMY_PROPERTY +}; +static void publishing_facebook_graph_session_finalize (PublishingFacebookGraphSession* obj); +#define PUBLISHING_FACEBOOK_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FACEBOOK_TYPE_UPLOADER, PublishingFacebookUploaderPrivate)) +enum { + PUBLISHING_FACEBOOK_UPLOADER_DUMMY_PROPERTY +}; +static SpitPublishingPublishable** _vala_array_dup3 (SpitPublishingPublishable** self, int length); +static void publishing_facebook_uploader_send_current_file (PublishingFacebookUploader* self); +static void publishing_facebook_uploader_on_chunk_transmitted (PublishingFacebookUploader* self, gint bytes_written_so_far, gint total_bytes); +static void _publishing_facebook_uploader_on_chunk_transmitted_publishing_facebook_graph_message_data_transmitted (PublishingFacebookGraphMessage* _sender, gint bytes_sent_so_far, gint total_bytes, gpointer self); +static void publishing_facebook_uploader_on_message_completed (PublishingFacebookUploader* self, PublishingFacebookGraphMessage* message); +static void _publishing_facebook_uploader_on_message_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self); +static void publishing_facebook_uploader_on_message_failed (PublishingFacebookUploader* self, PublishingFacebookGraphMessage* message, GError* _error_); +static void _publishing_facebook_uploader_on_message_failed_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self); +static void publishing_facebook_uploader_send_files (PublishingFacebookUploader* self); +static void publishing_facebook_uploader_finalize (PublishingFacebookUploader* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static gint _vala_array_length (gpointer array); + + +FacebookService* facebook_service_construct (GType object_type, GFile* resource_directory) { + FacebookService * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (FacebookService*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = facebook_service_icon_pixbuf_set; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = facebook_service_icon_pixbuf_set_length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_ == NULL) { +#line 927 "FacebookPublishing.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" FACEBOOK_SERVICE_ICON_FILENAME, &_tmp1_); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_icon_pixbuf_set = (_vala_array_free (facebook_service_icon_pixbuf_set, facebook_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_icon_pixbuf_set = _tmp2_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_icon_pixbuf_set_length1 = _tmp1_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _facebook_service_icon_pixbuf_set_size_ = facebook_service_icon_pixbuf_set_length1; +#line 940 "FacebookPublishing.c" + } +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 944 "FacebookPublishing.c" +} + + +FacebookService* facebook_service_new (GFile* resource_directory) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return facebook_service_construct (TYPE_FACEBOOK_SERVICE, resource_directory); +#line 951 "FacebookPublishing.c" +} + + +static gint facebook_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + FacebookService * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = min_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = max_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp2_; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 973 "FacebookPublishing.c" +} + + +static const gchar* facebook_service_real_get_id (SpitPluggable* base) { + FacebookService * self; + const gchar* result = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = "org.yorba.shotwell.publishing.facebook"; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 986 "FacebookPublishing.c" +} + + +static const gchar* facebook_service_real_get_pluggable_name (SpitPluggable* base) { + FacebookService * self; + const gchar* result = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = "Facebook"; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 999 "FacebookPublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 1006 "FacebookPublishing.c" +} + + +static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (i = 0; i < length; i++) { +#line 1017 "FacebookPublishing.c" + GdkPixbuf* _tmp0_ = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result[i] = _tmp0_; +#line 1023 "FacebookPublishing.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1027 "FacebookPublishing.c" +} + + +static void facebook_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + FacebookService * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (info != NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_strdup ("Lucas Beeler"); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).authors); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).authors = _tmp0_; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _ ("Copyright 2016 Software Freedom Conservancy Inc."); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).copyright); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).copyright = _tmp2_; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).translators); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).translators = _tmp3_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_strdup (_VERSION); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).version); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).version = _tmp4_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).website_name); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).website_name = _tmp5_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).website_url); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).website_url = _tmp6_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 ((*info).license); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).license = _tmp7_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = facebook_service_icon_pixbuf_set; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8__length1 = facebook_service_icon_pixbuf_set_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup1 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).icons = _tmp9_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*info).icons_length1 = _tmp9__length1; +#line 1109 "FacebookPublishing.c" +} + + +static void facebook_service_real_activation (SpitPluggable* base, gboolean enabled) { + FacebookService * self; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 1117 "FacebookPublishing.c" +} + + +static SpitPublishingPublisher* facebook_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + FacebookService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingFacebookFacebookPublisher* _tmp1_ = NULL; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = host; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_facebook_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1138 "FacebookPublishing.c" +} + + +static SpitPublishingPublisherMediaType facebook_service_real_get_supported_media (SpitPublishingService* base) { + FacebookService * self; + SpitPublishingPublisherMediaType result = 0; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1151 "FacebookPublishing.c" +} + + +static void facebook_service_class_init (FacebookServiceClass * klass) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = facebook_service_finalize; +#line 1160 "FacebookPublishing.c" +} + + +static void facebook_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) facebook_service_real_get_pluggable_interface; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) facebook_service_real_get_id; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) facebook_service_real_get_pluggable_name; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) facebook_service_real_get_info; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) facebook_service_real_activation; +#line 1177 "FacebookPublishing.c" +} + + +static void facebook_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*)(SpitPublishingService*, SpitPublishingPluginHost*)) facebook_service_real_create_publisher; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*)(SpitPublishingService*)) facebook_service_real_get_supported_media; +#line 1188 "FacebookPublishing.c" +} + + +static void facebook_service_instance_init (FacebookService * self) { +} + + +static void facebook_service_finalize (GObject* obj) { + FacebookService * self; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FACEBOOK_SERVICE, FacebookService); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (facebook_service_parent_class)->finalize (obj); +#line 1202 "FacebookPublishing.c" +} + + +GType facebook_service_get_type (void) { + static volatile gsize facebook_service_type_id__volatile = 0; + if (g_once_init_enter (&facebook_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FacebookServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) facebook_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FacebookService), 0, (GInstanceInitFunc) facebook_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) facebook_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) facebook_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType facebook_service_type_id; + facebook_service_type_id = g_type_register_static (G_TYPE_OBJECT, "FacebookService", &g_define_type_info, 0); + g_type_add_interface_static (facebook_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (facebook_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&facebook_service_type_id__volatile, facebook_service_type_id); + } + return facebook_service_type_id__volatile; +} + + +PublishingFacebookAlbum* publishing_facebook_album_construct (GType object_type, const gchar* name, const gchar* id) { + PublishingFacebookAlbum* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (id != NULL, NULL); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookAlbum*) g_type_create_instance (object_type); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = name; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->name); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->name = _tmp1_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = id; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->id); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->id = _tmp3_; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 1252 "FacebookPublishing.c" +} + + +PublishingFacebookAlbum* publishing_facebook_album_new (const gchar* name, const gchar* id) { +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_album_construct (PUBLISHING_FACEBOOK_TYPE_ALBUM, name, id); +#line 1259 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_album_init (GValue* value) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1266 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_album_free_value (GValue* value) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_album_unref (value->data[0].v_pointer); +#line 1275 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_album_copy_value (const GValue* src_value, GValue* dest_value) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_album_ref (src_value->data[0].v_pointer); +#line 1285 "FacebookPublishing.c" + } else { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1289 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_value_album_peek_pointer (const GValue* value) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 1297 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_album_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1304 "FacebookPublishing.c" + PublishingFacebookAlbum* object; + object = collect_values[0].v_pointer; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1311 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1315 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_album_ref (object); +#line 1319 "FacebookPublishing.c" + } else { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1323 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 1327 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_album_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookAlbum** object_p; + object_p = collect_values[0].v_pointer; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1338 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 1344 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1348 "FacebookPublishing.c" + } else { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_album_ref (value->data[0].v_pointer); +#line 1352 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 1356 "FacebookPublishing.c" +} + + +GParamSpec* publishing_facebook_param_spec_album (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookParamSpecAlbum* spec; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_TYPE_ALBUM), NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1370 "FacebookPublishing.c" +} + + +gpointer publishing_facebook_value_get_album (const GValue* value) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_ALBUM), NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 1379 "FacebookPublishing.c" +} + + +void publishing_facebook_value_set_album (GValue* value, gpointer v_object) { + PublishingFacebookAlbum* old; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_ALBUM)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_ALBUM)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_album_ref (value->data[0].v_pointer); +#line 1399 "FacebookPublishing.c" + } else { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1403 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_album_unref (old); +#line 1409 "FacebookPublishing.c" + } +} + + +void publishing_facebook_value_take_album (GValue* value, gpointer v_object) { + PublishingFacebookAlbum* old; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_ALBUM)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_ALBUM)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1428 "FacebookPublishing.c" + } else { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1432 "FacebookPublishing.c" + } +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_album_unref (old); +#line 1438 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_album_class_init (PublishingFacebookAlbumClass * klass) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_album_parent_class = g_type_class_peek_parent (klass); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookAlbumClass *) klass)->finalize = publishing_facebook_album_finalize; +#line 1448 "FacebookPublishing.c" +} + + +static void publishing_facebook_album_instance_init (PublishingFacebookAlbum * self) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 1455 "FacebookPublishing.c" +} + + +static void publishing_facebook_album_finalize (PublishingFacebookAlbum* obj) { + PublishingFacebookAlbum * self; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_ALBUM, PublishingFacebookAlbum); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->name); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->id); +#line 1469 "FacebookPublishing.c" +} + + +GType publishing_facebook_album_get_type (void) { + static volatile gsize publishing_facebook_album_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_album_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_value_album_init, publishing_facebook_value_album_free_value, publishing_facebook_value_album_copy_value, publishing_facebook_value_album_peek_pointer, "p", publishing_facebook_value_album_collect_value, "p", publishing_facebook_value_album_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookAlbumClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_album_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookAlbum), 0, (GInstanceInitFunc) publishing_facebook_album_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_facebook_album_type_id; + publishing_facebook_album_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookAlbum", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_album_type_id__volatile, publishing_facebook_album_type_id); + } + return publishing_facebook_album_type_id__volatile; +} + + +gpointer publishing_facebook_album_ref (gpointer instance) { + PublishingFacebookAlbum* self; + self = instance; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 1494 "FacebookPublishing.c" +} + + +void publishing_facebook_album_unref (gpointer instance) { + PublishingFacebookAlbum* self; + self = instance; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_ALBUM_GET_CLASS (self)->finalize (self); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1507 "FacebookPublishing.c" + } +} + + +gchar* publishing_facebook_resolution_get_name (PublishingFacebookResolution self) { + gchar* result = NULL; +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + switch (self) { +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_RESOLUTION_STANDARD: +#line 1518 "FacebookPublishing.c" + { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _ ("Standard (720 pixels)"); +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1530 "FacebookPublishing.c" + } +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_RESOLUTION_HIGH: +#line 1534 "FacebookPublishing.c" + { + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _ ("Large (2048 pixels)"); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp3_; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1546 "FacebookPublishing.c" + } + default: + { + GEnumValue* _tmp4_; +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_enum_get_value (g_type_class_ref (PUBLISHING_FACEBOOK_TYPE_RESOLUTION), self); +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_error ("FacebookPublishing.vala:93: Unknown resolution %s", (_tmp4_ != NULL) ? _tmp4_->value_name : NULL); +#line 1555 "FacebookPublishing.c" + } + } +} + + +gint publishing_facebook_resolution_get_pixels (PublishingFacebookResolution self) { + gint result = 0; +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + switch (self) { +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_RESOLUTION_STANDARD: +#line 1567 "FacebookPublishing.c" + { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = 720; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1573 "FacebookPublishing.c" + } +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_RESOLUTION_HIGH: +#line 1577 "FacebookPublishing.c" + { +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = 2048; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1583 "FacebookPublishing.c" + } + default: + { + GEnumValue* _tmp0_; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_enum_get_value (g_type_class_ref (PUBLISHING_FACEBOOK_TYPE_RESOLUTION), self); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_error ("FacebookPublishing.vala:106: Unknown resolution %s", (_tmp0_ != NULL) ? _tmp0_->value_name : NULL); +#line 1592 "FacebookPublishing.c" + } + } +} + + +GType publishing_facebook_resolution_get_type (void) { + static volatile gsize publishing_facebook_resolution_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_resolution_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_FACEBOOK_RESOLUTION_STANDARD, "PUBLISHING_FACEBOOK_RESOLUTION_STANDARD", "standard"}, {PUBLISHING_FACEBOOK_RESOLUTION_HIGH, "PUBLISHING_FACEBOOK_RESOLUTION_HIGH", "high"}, {0, NULL, NULL}}; + GType publishing_facebook_resolution_type_id; + publishing_facebook_resolution_type_id = g_enum_register_static ("PublishingFacebookResolution", values); + g_once_init_leave (&publishing_facebook_resolution_type_id__volatile, publishing_facebook_resolution_type_id); + } + return publishing_facebook_resolution_type_id__volatile; +} + + +PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_construct (GType object_type) { + PublishingFacebookPublishingParameters* self = NULL; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookPublishingParameters*) g_type_create_instance (object_type); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums = (_vala_array_free (self->albums, self->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums = NULL; +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums_length1 = 0; +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->_albums_size_ = self->albums_length1; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->privacy_object); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->privacy_object = NULL; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->target_album = PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM; +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->new_album_name); +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->new_album_name = NULL; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->strip_metadata = FALSE; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->resolution = PUBLISHING_FACEBOOK_RESOLUTION_HIGH; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 1638 "FacebookPublishing.c" +} + + +PublishingFacebookPublishingParameters* publishing_facebook_publishing_parameters_new (void) { +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_publishing_parameters_construct (PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS); +#line 1645 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_album_ref0 (gpointer self) { +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_album_ref (self) : NULL; +#line 1652 "FacebookPublishing.c" +} + + +static void _vala_array_add6 (PublishingFacebookAlbum*** array, int* length, int* size, PublishingFacebookAlbum* value) { +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookAlbum*, *array, (*size) + 1); +#line 1663 "FacebookPublishing.c" + } +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[*length] = NULL; +#line 1669 "FacebookPublishing.c" +} + + +void publishing_facebook_publishing_parameters_add_album (PublishingFacebookPublishingParameters* self, const gchar* name, const gchar* id) { + PublishingFacebookAlbum** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingFacebookAlbum* new_album = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + PublishingFacebookAlbum* _tmp4_ = NULL; + PublishingFacebookAlbum** _tmp5_ = NULL; + gint _tmp5__length1 = 0; + PublishingFacebookAlbum* _tmp6_ = NULL; +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS (self)); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (name != NULL); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (id != NULL); +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->albums; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->albums_length1; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_ == NULL) { +#line 1695 "FacebookPublishing.c" + PublishingFacebookAlbum** _tmp1_ = NULL; +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_new0 (PublishingFacebookAlbum*, 0 + 1); +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums = (_vala_array_free (self->albums, self->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums = _tmp1_; +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums_length1 = 0; +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->_albums_size_ = self->albums_length1; +#line 1707 "FacebookPublishing.c" + } +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = name; +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = id; +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_facebook_album_new (_tmp2_, _tmp3_); +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + new_album = _tmp4_; +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->albums; +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5__length1 = self->albums_length1; +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _publishing_facebook_album_ref0 (new_album); +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add6 (&self->albums, &self->albums_length1, &self->_albums_size_, _tmp6_); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_album_unref0 (new_album); +#line 1727 "FacebookPublishing.c" +} + + +void publishing_facebook_publishing_parameters_set_target_album_by_name (PublishingFacebookPublishingParameters* self, const gchar* name) { + const gchar* _tmp0_ = NULL; +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS (self)); +#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = name; +#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_ == NULL) { +#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->target_album = PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM; +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 1743 "FacebookPublishing.c" + } + { + gint i = 0; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + i = 0; +#line 1749 "FacebookPublishing.c" + { + gboolean _tmp1_ = FALSE; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = TRUE; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + while (TRUE) { +#line 1756 "FacebookPublishing.c" + gint _tmp3_ = 0; + PublishingFacebookAlbum** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + PublishingFacebookAlbum** _tmp5_ = NULL; + gint _tmp5__length1 = 0; + gint _tmp6_ = 0; + PublishingFacebookAlbum* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp1_) { +#line 1768 "FacebookPublishing.c" + gint _tmp2_ = 0; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = i; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + i = _tmp2_ + 1; +#line 1774 "FacebookPublishing.c" + } +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = FALSE; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = i; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->albums; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4__length1 = self->albums_length1; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!(_tmp3_ < _tmp4__length1)) { +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 1788 "FacebookPublishing.c" + } +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->albums; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5__length1 = self->albums_length1; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = i; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp5_[_tmp6_]; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp7_->name; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = name; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_strcmp0 (_tmp8_, _tmp9_) == 0) { +#line 1804 "FacebookPublishing.c" + gint _tmp10_ = 0; +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = i; +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->target_album = _tmp10_; +#line 152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 1812 "FacebookPublishing.c" + } + } + } + } +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->target_album = PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM; +#line 1819 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_publishing_parameters_get_target_album_name (PublishingFacebookPublishingParameters* self) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + PublishingFacebookAlbum** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingFacebookAlbum** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + gint _tmp4_ = 0; + PublishingFacebookAlbum* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->albums; +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = self->albums_length1; +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1_ == NULL) { +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = TRUE; +#line 1844 "FacebookPublishing.c" + } else { + gint _tmp2_ = 0; +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->target_album; +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _tmp2_ == PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM; +#line 1851 "FacebookPublishing.c" + } +#line 160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_) { +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = NULL; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1859 "FacebookPublishing.c" + } +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->albums; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3__length1 = self->albums_length1; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->target_album; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp3_[_tmp4_]; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_->name; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strdup (_tmp6_); +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp7_; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1877 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_publishing_parameters_get_target_album_id (PublishingFacebookPublishingParameters* self) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + PublishingFacebookAlbum** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingFacebookAlbum** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + gint _tmp4_ = 0; + PublishingFacebookAlbum* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->albums; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = self->albums_length1; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1_ == NULL) { +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = TRUE; +#line 1902 "FacebookPublishing.c" + } else { + gint _tmp2_ = 0; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->target_album; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _tmp2_ == PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM; +#line 1909 "FacebookPublishing.c" + } +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_) { +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = NULL; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1917 "FacebookPublishing.c" + } +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->albums; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3__length1 = self->albums_length1; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->target_album; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp3_[_tmp4_]; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_->id; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strdup (_tmp6_); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp7_; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 1935 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_publishing_parameters_init (GValue* value) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1942 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_publishing_parameters_free_value (GValue* value) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_unref (value->data[0].v_pointer); +#line 1951 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_publishing_parameters_ref (src_value->data[0].v_pointer); +#line 1961 "FacebookPublishing.c" + } else { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1965 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_value_publishing_parameters_peek_pointer (const GValue* value) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 1973 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1980 "FacebookPublishing.c" + PublishingFacebookPublishingParameters* object; + object = collect_values[0].v_pointer; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1987 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1991 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_publishing_parameters_ref (object); +#line 1995 "FacebookPublishing.c" + } else { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1999 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 2003 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookPublishingParameters** object_p; + object_p = collect_values[0].v_pointer; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 2014 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 2020 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 2024 "FacebookPublishing.c" + } else { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_publishing_parameters_ref (value->data[0].v_pointer); +#line 2028 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 2032 "FacebookPublishing.c" +} + + +GParamSpec* publishing_facebook_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookParamSpecPublishingParameters* spec; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 2046 "FacebookPublishing.c" +} + + +gpointer publishing_facebook_value_get_publishing_parameters (const GValue* value) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 2055 "FacebookPublishing.c" +} + + +void publishing_facebook_value_set_publishing_parameters (GValue* value, gpointer v_object) { + PublishingFacebookPublishingParameters* old; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_ref (value->data[0].v_pointer); +#line 2075 "FacebookPublishing.c" + } else { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2079 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_unref (old); +#line 2085 "FacebookPublishing.c" + } +} + + +void publishing_facebook_value_take_publishing_parameters (GValue* value, gpointer v_object) { + PublishingFacebookPublishingParameters* old; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS)); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 2104 "FacebookPublishing.c" + } else { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2108 "FacebookPublishing.c" + } +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_unref (old); +#line 2114 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_parameters_class_init (PublishingFacebookPublishingParametersClass * klass) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_parent_class = g_type_class_peek_parent (klass); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookPublishingParametersClass *) klass)->finalize = publishing_facebook_publishing_parameters_finalize; +#line 2124 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_parameters_instance_init (PublishingFacebookPublishingParameters * self) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 2131 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_parameters_finalize (PublishingFacebookPublishingParameters* obj) { + PublishingFacebookPublishingParameters * self; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_PARAMETERS, PublishingFacebookPublishingParameters); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->albums = (_vala_array_free (self->albums, self->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->new_album_name); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->privacy_object); +#line 2147 "FacebookPublishing.c" +} + + +GType publishing_facebook_publishing_parameters_get_type (void) { + static volatile gsize publishing_facebook_publishing_parameters_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_publishing_parameters_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_value_publishing_parameters_init, publishing_facebook_value_publishing_parameters_free_value, publishing_facebook_value_publishing_parameters_copy_value, publishing_facebook_value_publishing_parameters_peek_pointer, "p", publishing_facebook_value_publishing_parameters_collect_value, "p", publishing_facebook_value_publishing_parameters_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookPublishingParametersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_publishing_parameters_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookPublishingParameters), 0, (GInstanceInitFunc) publishing_facebook_publishing_parameters_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_facebook_publishing_parameters_type_id; + publishing_facebook_publishing_parameters_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookPublishingParameters", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_publishing_parameters_type_id__volatile, publishing_facebook_publishing_parameters_type_id); + } + return publishing_facebook_publishing_parameters_type_id__volatile; +} + + +gpointer publishing_facebook_publishing_parameters_ref (gpointer instance) { + PublishingFacebookPublishingParameters* self; + self = instance; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 2172 "FacebookPublishing.c" +} + + +void publishing_facebook_publishing_parameters_unref (gpointer instance) { + PublishingFacebookPublishingParameters* self; + self = instance; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 2185 "FacebookPublishing.c" + } +} + + +static void _publishing_facebook_facebook_publisher_on_session_authenticated_publishing_facebook_graph_session_authenticated (PublishingFacebookGraphSession* _sender, gpointer self) { +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_session_authenticated ((PublishingFacebookFacebookPublisher*) self); +#line 2193 "FacebookPublishing.c" +} + + +PublishingFacebookFacebookPublisher* publishing_facebook_facebook_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingFacebookFacebookPublisher * self = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingFacebookPublishingParameters* _tmp2_ = NULL; + PublishingFacebookGraphSession* _tmp3_ = NULL; + PublishingFacebookGraphSession* _tmp4_ = NULL; +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookFacebookPublisher*) g_object_new (object_type, NULL); +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:189: FacebookPublisher instantiated."); +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = service; +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->service = _tmp0_; +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = host; +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->host = _tmp1_; +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishing_facebook_publishing_parameters_new (); +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_parameters_unref0 (self->priv->publishing_params); +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishing_params = _tmp2_; +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_graph_session_new (); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_session_unref0 (self->priv->graph_session); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->graph_session = _tmp3_; +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->graph_session; +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp4_, "authenticated", (GCallback) _publishing_facebook_facebook_publisher_on_session_authenticated_publishing_facebook_graph_session_authenticated, self, 0); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 2238 "FacebookPublishing.c" +} + + +PublishingFacebookFacebookPublisher* publishing_facebook_facebook_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_facebook_publisher_construct (PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, service, host); +#line 2245 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_facebook_publisher_is_persistent_session_valid (PublishingFacebookFacebookPublisher* self) { + gboolean result = FALSE; + gchar* token = NULL; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp3_ = NULL; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), FALSE); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_facebook_publisher_get_persistent_access_token (self); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + token = _tmp0_; +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = token; +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1_ != NULL) { +#line 2265 "FacebookPublishing.c" + const gchar* _tmp2_ = NULL; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = token; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:204: existing Facebook session found in config" \ +"uration database (access_token = %s).", _tmp2_); +#line 2271 "FacebookPublishing.c" + } else { +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:207: no existing Facebook session available."); +#line 2275 "FacebookPublishing.c" + } +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = token; +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp3_ != NULL; +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (token); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 2285 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_facebook_publisher_get_persistent_access_token (PublishingFacebookFacebookPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), NULL); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_token", NULL); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 2303 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_facebook_publisher_get_persistent_strip_metadata (PublishingFacebookFacebookPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), FALSE); +#line 217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", FALSE); +#line 217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 2321 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_set_persistent_access_token (PublishingFacebookFacebookPublisher* self, const gchar* access_token) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (access_token != NULL); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = access_token; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_token", _tmp1_); +#line 2338 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_set_persistent_strip_metadata (PublishingFacebookFacebookPublisher* self, gboolean strip_metadata) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = strip_metadata; +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", _tmp1_); +#line 2353 "FacebookPublishing.c" +} + + +gint publishing_facebook_facebook_publisher_get_persistent_default_size (PublishingFacebookFacebookPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), 0); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", 0); +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 2371 "FacebookPublishing.c" +} + + +void publishing_facebook_facebook_publisher_set_persistent_default_size (PublishingFacebookFacebookPublisher* self, gint size) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = size; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", _tmp1_); +#line 2386 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_invalidate_persistent_session (PublishingFacebookFacebookPublisher* self) { +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:239: invalidating saved Facebook session."); +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_set_persistent_access_token (self, ""); +#line 2397 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_login_clicked_spit_publishing_login_callback (gpointer self) { +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_login_clicked ((PublishingFacebookFacebookPublisher*) self); +#line 2404 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_show_service_welcome_pane (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:245: ACTION: showing service welcome pane."); +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_welcome_pane (_tmp0_, PUBLISHING_FACEBOOK_SERVICE_WELCOME_MESSAGE, _publishing_facebook_facebook_publisher_on_login_clicked_spit_publishing_login_callback, self); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, FALSE); +#line 2423 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_endpoint_test_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self) { +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_endpoint_test_completed ((PublishingFacebookFacebookPublisher*) self, _sender); +#line 2430 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_endpoint_test_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self) { +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_endpoint_test_error ((PublishingFacebookFacebookPublisher*) self, _sender, err); +#line 2437 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_test_connection_to_endpoint (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingFacebookGraphMessage* endpoint_test_message = NULL; + PublishingFacebookGraphSession* _tmp3_ = NULL; + PublishingFacebookGraphMessage* _tmp4_ = NULL; + PublishingFacebookGraphSession* _tmp5_ = NULL; +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:252: ACTION: testing connection to Facebook en" \ +"dpoint."); +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _ ("Testing connection to Facebook..."); +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp1_, _tmp2_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->graph_session; +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_facebook_graph_session_new_endpoint_test (_tmp3_); +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + endpoint_test_message = _tmp4_; +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (endpoint_test_message, "completed", (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_completed_publishing_facebook_graph_message_completed, self, 0); +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (endpoint_test_message, "failed", (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_error_publishing_facebook_graph_message_failed, self, 0); +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->graph_session; +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_send_message (_tmp5_, endpoint_test_message); +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (endpoint_test_message); +#line 2479 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_fetch_user_info_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self) { +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_fetch_user_info_completed ((PublishingFacebookFacebookPublisher*) self, _sender); +#line 2486 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_fetch_user_info_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self) { +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_fetch_user_info_error ((PublishingFacebookFacebookPublisher*) self, _sender, err); +#line 2493 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_fetch_user_info (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingFacebookGraphMessage* user_info_message = NULL; + PublishingFacebookGraphSession* _tmp2_ = NULL; + PublishingFacebookGraphMessage* _tmp3_ = NULL; + PublishingFacebookGraphSession* _tmp4_ = NULL; +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:265: ACTION: fetching user information."); +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->graph_session; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_graph_session_new_query (_tmp2_, "/me"); +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + user_info_message = _tmp3_; +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (user_info_message, "completed", (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_completed_publishing_facebook_graph_message_completed, self, 0); +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (user_info_message, "failed", (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_error_publishing_facebook_graph_message_failed, self, 0); +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->graph_session; +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_send_message (_tmp4_, user_info_message); +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (user_info_message); +#line 2532 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_fetch_albums_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self) { +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_fetch_albums_completed ((PublishingFacebookFacebookPublisher*) self, _sender); +#line 2539 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_fetch_albums_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self) { +#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_fetch_albums_error ((PublishingFacebookFacebookPublisher*) self, _sender, err); +#line 2546 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_fetch_album_descriptions (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingFacebookGraphMessage* albums_message = NULL; + PublishingFacebookGraphSession* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + PublishingFacebookGraphMessage* _tmp6_ = NULL; + PublishingFacebookGraphMessage* _tmp7_ = NULL; + PublishingFacebookGraphSession* _tmp8_ = NULL; +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:279: ACTION: fetching album list."); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->graph_session; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->uid; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_strdup_printf ("/%s/albums", _tmp3_); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_graph_session_new_query (_tmp2_, _tmp5_); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp5_); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + albums_message = _tmp7_; +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (albums_message, "completed", (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_completed_publishing_facebook_graph_message_completed, self, 0); +#line 287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (albums_message, "failed", (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_error_publishing_facebook_graph_message_failed, self, 0); +#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->graph_session; +#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_send_message (_tmp8_, albums_message); +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (albums_message); +#line 2599 "FacebookPublishing.c" +} + + +static JsonNode* _vala_JsonNode_copy (JsonNode* self) { +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_boxed_copy (json_node_get_type (), self); +#line 2606 "FacebookPublishing.c" +} + + +static gpointer __vala_JsonNode_copy0 (gpointer self) { +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? _vala_JsonNode_copy (self) : NULL; +#line 2613 "FacebookPublishing.c" +} + + +static gpointer _json_object_ref0 (gpointer self) { +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? json_object_ref (self) : NULL; +#line 2620 "FacebookPublishing.c" +} + + +static void _vala_JsonNode_free (JsonNode* self) { +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_boxed_free (json_node_get_type (), self); +#line 2627 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_extract_user_info_from_json (PublishingFacebookFacebookPublisher* self, const gchar* json) { + GError * _inner_error_ = NULL; +#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (json != NULL); +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:293: ACTION: extracting user info from JSON re" \ +"sponse."); +#line 2639 "FacebookPublishing.c" + { + JsonParser* parser = NULL; + JsonParser* _tmp0_ = NULL; + JsonParser* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + JsonNode* root = NULL; + JsonParser* _tmp3_ = NULL; + JsonNode* _tmp4_ = NULL; + JsonNode* _tmp5_ = NULL; + JsonObject* response_object = NULL; + JsonNode* _tmp6_ = NULL; + JsonObject* _tmp7_ = NULL; + JsonObject* _tmp8_ = NULL; + JsonObject* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + JsonObject* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = json_parser_new (); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + parser = _tmp0_; +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = parser; +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = json; +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_); +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 2673 "FacebookPublishing.c" + goto __catch0_g_error; + } +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = parser; +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = json_parser_get_root (_tmp3_); +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = __vala_JsonNode_copy0 (_tmp4_); +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + root = _tmp5_; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = root; +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = json_node_get_object (_tmp6_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _json_object_ref0 (_tmp7_); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + response_object = _tmp8_; +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = response_object; +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = json_object_get_string_member (_tmp9_, "id"); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = g_strdup (_tmp10_); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->uid); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->uid = _tmp11_; +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = response_object; +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = json_object_get_string_member (_tmp12_, "name"); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = g_strdup (_tmp13_); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->username); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->username = _tmp14_; +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _json_object_unref0 (response_object); +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_JsonNode_free0 (root); +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 2718 "FacebookPublishing.c" + } + goto __finally0; + __catch0_g_error: + { + GError* _error_ = NULL; + SpitPublishingPluginHost* _tmp15_ = NULL; + GError* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + GError* _tmp18_ = NULL; + GError* _tmp19_ = NULL; +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _inner_error_; +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = self->priv->host; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = _error_; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = _tmp16_->message; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp17_); +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp15_, _tmp19_); +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp19_); +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 2751 "FacebookPublishing.c" + } + __finally0: +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 2762 "FacebookPublishing.c" + } +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_user_info_extracted (self); +#line 2766 "FacebookPublishing.c" +} + + +static gpointer _json_array_ref0 (gpointer self) { +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? json_array_ref (self) : NULL; +#line 2773 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_extract_albums_from_json (PublishingFacebookFacebookPublisher* self, const gchar* json) { + GError * _inner_error_ = NULL; +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (json != NULL); +#line 312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:312: ACTION: extracting album info from JSON r" \ +"esponse."); +#line 2785 "FacebookPublishing.c" + { + JsonParser* parser = NULL; + JsonParser* _tmp0_ = NULL; + JsonParser* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + JsonNode* root = NULL; + JsonParser* _tmp3_ = NULL; + JsonNode* _tmp4_ = NULL; + JsonNode* _tmp5_ = NULL; + JsonObject* response_object = NULL; + JsonNode* _tmp6_ = NULL; + JsonObject* _tmp7_ = NULL; + JsonObject* _tmp8_ = NULL; + JsonArray* album_list = NULL; + JsonObject* _tmp9_ = NULL; + JsonArray* _tmp10_ = NULL; + JsonArray* _tmp11_ = NULL; + PublishingFacebookPublishingParameters* _tmp12_ = NULL; + PublishingFacebookAlbum** _tmp13_ = NULL; +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = json_parser_new (); +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + parser = _tmp0_; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = parser; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = json; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 2819 "FacebookPublishing.c" + goto __catch1_g_error; + } +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = parser; +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = json_parser_get_root (_tmp3_); +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = __vala_JsonNode_copy0 (_tmp4_); +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + root = _tmp5_; +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = root; +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = json_node_get_object (_tmp6_); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _json_object_ref0 (_tmp7_); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + response_object = _tmp8_; +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = response_object; +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = json_object_get_array_member (_tmp9_, "data"); +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = _json_array_ref0 (_tmp10_); +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_list = _tmp11_; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = self->priv->publishing_params; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = g_new0 (PublishingFacebookAlbum*, 0 + 1); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_->albums = (_vala_array_free (_tmp12_->albums, _tmp12_->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_->albums = _tmp13_; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_->albums_length1 = 0; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_->_albums_size_ = _tmp12_->albums_length1; +#line 2858 "FacebookPublishing.c" + { + gint i = 0; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + i = 0; +#line 2863 "FacebookPublishing.c" + { + gboolean _tmp14_ = FALSE; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = TRUE; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + while (TRUE) { +#line 2870 "FacebookPublishing.c" + gint _tmp16_ = 0; + JsonArray* _tmp17_ = NULL; + guint _tmp18_ = 0U; + JsonObject* current_album = NULL; + JsonArray* _tmp19_ = NULL; + gint _tmp20_ = 0; + JsonObject* _tmp21_ = NULL; + JsonObject* _tmp22_ = NULL; + gchar* album_id = NULL; + JsonObject* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + gchar* album_name = NULL; + JsonObject* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + PublishingFacebookPublishingParameters* _tmp29_ = NULL; + const gchar* _tmp30_ = NULL; + const gchar* _tmp31_ = NULL; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp14_) { +#line 2892 "FacebookPublishing.c" + gint _tmp15_ = 0; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = i; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + i = _tmp15_ + 1; +#line 2898 "FacebookPublishing.c" + } +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = FALSE; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = i; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = album_list; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = json_array_get_length (_tmp17_); +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!(((guint) _tmp16_) < _tmp18_)) { +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 2912 "FacebookPublishing.c" + } +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = album_list; +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = i; +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = json_array_get_object_element (_tmp19_, (guint) _tmp20_); +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = _json_object_ref0 (_tmp21_); +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + current_album = _tmp22_; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = current_album; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = json_object_get_string_member (_tmp23_, "id"); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = g_strdup (_tmp24_); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_id = _tmp25_; +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = current_album; +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = json_object_get_string_member (_tmp26_, "name"); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = g_strdup (_tmp27_); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_name = _tmp28_; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = self->priv->publishing_params; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = album_name; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = album_id; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_add_album (_tmp29_, _tmp30_, _tmp31_); +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_name); +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_id); +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _json_object_unref0 (current_album); +#line 2954 "FacebookPublishing.c" + } + } + } +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _json_array_unref0 (album_list); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _json_object_unref0 (response_object); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_JsonNode_free0 (root); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 2966 "FacebookPublishing.c" + } + goto __finally1; + __catch1_g_error: + { + GError* _error_ = NULL; + SpitPublishingPluginHost* _tmp32_ = NULL; + GError* _tmp33_ = NULL; + const gchar* _tmp34_ = NULL; + GError* _tmp35_ = NULL; + GError* _tmp36_ = NULL; +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _inner_error_; +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = self->priv->host; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = _error_; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = _tmp33_->message; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp34_); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = _tmp35_; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp32_, _tmp36_); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp36_); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 2999 "FacebookPublishing.c" + } + __finally1: +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3010 "FacebookPublishing.c" + } +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_albums_extracted (self); +#line 3014 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_create_album_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self) { +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_create_album_completed ((PublishingFacebookFacebookPublisher*) self, _sender); +#line 3021 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_create_album_error_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self) { +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_create_album_error ((PublishingFacebookFacebookPublisher*) self, _sender, err); +#line 3028 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_create_new_album (PublishingFacebookFacebookPublisher* self) { + PublishingFacebookPublishingParameters* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + SpitPublishingPluginHost* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + PublishingFacebookGraphMessage* create_album_message = NULL; + PublishingFacebookGraphSession* _tmp5_ = NULL; + PublishingFacebookPublishingParameters* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + PublishingFacebookPublishingParameters* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + PublishingFacebookGraphMessage* _tmp10_ = NULL; + PublishingFacebookGraphSession* _tmp11_ = NULL; +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publishing_params; +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _tmp0_->new_album_name; +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:345: ACTION: creating a new album named \"%s\"" \ +".\n", _tmp1_); +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->host; +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp2_, TRUE); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->host; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _ ("Creating album..."); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp3_, _tmp4_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->graph_session; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->publishing_params; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_->new_album_name; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->publishing_params; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_->privacy_object; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = publishing_facebook_graph_session_new_create_album (_tmp5_, _tmp7_, _tmp9_); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + create_album_message = _tmp10_; +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (create_album_message, "completed", (GCallback) _publishing_facebook_facebook_publisher_on_create_album_completed_publishing_facebook_graph_message_completed, self, 0); +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (create_album_message, "failed", (GCallback) _publishing_facebook_facebook_publisher_on_create_album_error_publishing_facebook_graph_message_failed, self, 0); +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->graph_session; +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_send_message (_tmp11_, create_album_message); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (create_album_message); +#line 3088 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_publishing_options_pane_logout_publishing_facebook_publishing_options_pane_logout (PublishingFacebookPublishingOptionsPane* _sender, gpointer self) { +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_publishing_options_pane_logout ((PublishingFacebookFacebookPublisher*) self); +#line 3095 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_publishing_options_pane_publish_publishing_facebook_publishing_options_pane_publish (PublishingFacebookPublishingOptionsPane* _sender, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution, gboolean strip_metadata, gpointer self) { +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_publishing_options_pane_publish ((PublishingFacebookFacebookPublisher*) self, target_album, privacy_setting, target_resolution, strip_metadata); +#line 3102 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_show_publishing_options_pane (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + GtkBuilder* builder = NULL; + GtkBuilder* _tmp1_ = NULL; + const gchar* _tmp9_ = NULL; + PublishingFacebookPublishingParameters* _tmp10_ = NULL; + PublishingFacebookAlbum** _tmp11_ = NULL; + gint _tmp11__length1 = 0; + SpitPublishingPluginHost* _tmp12_ = NULL; + SpitPublishingPublisherMediaType _tmp13_ = 0; + GtkBuilder* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + PublishingFacebookPublishingOptionsPane* _tmp16_ = NULL; + PublishingFacebookPublishingOptionsPane* _tmp17_ = NULL; + PublishingFacebookPublishingOptionsPane* _tmp18_ = NULL; + SpitPublishingPluginHost* _tmp19_ = NULL; + PublishingFacebookPublishingOptionsPane* _tmp20_ = NULL; + GError * _inner_error_ = NULL; +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:360: ACTION: showing publishing options pane."); +#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = gtk_builder_new (); +#line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + builder = _tmp1_; +#line 3136 "FacebookPublishing.c" + { + GtkBuilder* _tmp2_ = NULL; +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = builder; +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/" "facebook_publishing_options_pane.ui", &_inner_error_); +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 3145 "FacebookPublishing.c" + goto __catch2_g_error; + } + } + goto __finally2; + __catch2_g_error: + { + GError* e = NULL; + GError* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + SpitPublishingPluginHost* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + GError* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + e = _inner_error_; +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = e; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _tmp3_->message; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_warning ("FacebookPublishing.vala:371: Could not parse UI file! Error: %s.", _tmp4_); +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->host; +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _ ("A file required for publishing is unavailable. Publishing to Facebook " \ +"can't continue."); +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp6_); +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp7_; +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp8_); +#line 372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp8_); +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (e); +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (builder); +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3187 "FacebookPublishing.c" + } + __finally2: +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (builder); +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3200 "FacebookPublishing.c" + } +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = self->priv->username; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = self->priv->publishing_params; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = _tmp10_->albums; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11__length1 = _tmp10_->albums_length1; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = self->priv->host; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = spit_publishing_plugin_host_get_publishable_media_type (_tmp12_); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = builder; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = publishing_facebook_facebook_publisher_get_persistent_strip_metadata (self); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = publishing_facebook_publishing_options_pane_new (_tmp9_, _tmp11_, _tmp11__length1, _tmp13_, self, _tmp14_, _tmp15_); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publishing_options_pane); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishing_options_pane = _tmp16_; +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = self->priv->publishing_options_pane; +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp17_, "logout", (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_logout_publishing_facebook_publishing_options_pane_logout, self, 0); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = self->priv->publishing_options_pane; +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp18_, "publish", (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_publish_publishing_facebook_publishing_options_pane_publish, self, 0); +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = self->priv->host; +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->publishing_options_pane; +#line 382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (builder); +#line 3240 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_logout (PublishingFacebookFacebookPublisher* self) { +#line 386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:387: ACTION: clearing persistent session infor" \ +"mation and restaring interaction."); +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_invalidate_persistent_session (self); +#line 391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->running = FALSE; +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_publisher_start (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 3255 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_add_new_local_album_from_json (PublishingFacebookFacebookPublisher* self, const gchar* album_name, const gchar* json) { + PublishingFacebookPublishingParameters* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + GError * _inner_error_ = NULL; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (album_name != NULL); +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (json != NULL); +#line 3269 "FacebookPublishing.c" + { + JsonParser* parser = NULL; + JsonParser* _tmp0_ = NULL; + JsonParser* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + JsonNode* root = NULL; + JsonParser* _tmp3_ = NULL; + JsonNode* _tmp4_ = NULL; + JsonNode* _tmp5_ = NULL; + JsonObject* response_object = NULL; + JsonNode* _tmp6_ = NULL; + JsonObject* _tmp7_ = NULL; + JsonObject* _tmp8_ = NULL; + gchar* album_id = NULL; + JsonObject* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + PublishingFacebookPublishingParameters* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = json_parser_new (); +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + parser = _tmp0_; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = parser; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = json; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + json_parser_load_from_data (_tmp1_, _tmp2_, (gssize) -1, &_inner_error_); +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 3304 "FacebookPublishing.c" + goto __catch3_g_error; + } +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = parser; +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = json_parser_get_root (_tmp3_); +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = __vala_JsonNode_copy0 (_tmp4_); +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + root = _tmp5_; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = root; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = json_node_get_object (_tmp6_); +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _json_object_ref0 (_tmp7_); +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + response_object = _tmp8_; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = response_object; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = json_object_get_string_member (_tmp9_, "id"); +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = g_strdup (_tmp10_); +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_id = _tmp11_; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = self->priv->publishing_params; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = album_name; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = album_id; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_add_album (_tmp12_, _tmp13_, _tmp14_); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_id); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _json_object_unref0 (response_object); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_JsonNode_free0 (root); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (parser); +#line 3347 "FacebookPublishing.c" + } + goto __finally3; + __catch3_g_error: + { + GError* _error_ = NULL; + SpitPublishingPluginHost* _tmp15_ = NULL; + GError* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + GError* _tmp18_ = NULL; + GError* _tmp19_ = NULL; +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _inner_error_; +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = self->priv->host; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = _error_; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = _tmp16_->message; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, _tmp17_); +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp15_, _tmp19_); +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp19_); +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3380 "FacebookPublishing.c" + } + __finally3: +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3391 "FacebookPublishing.c" + } +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->publishing_params; +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = album_name; +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_set_target_album_by_name (_tmp20_, _tmp21_); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_upload (self); +#line 3401 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded_publishing_facebook_web_authentication_pane_login_succeeded (PublishingFacebookWebAuthenticationPane* _sender, const gchar* success_url, gpointer self) { +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded ((PublishingFacebookFacebookPublisher*) self, success_url); +#line 3408 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed_publishing_facebook_web_authentication_pane_login_failed (PublishingFacebookWebAuthenticationPane* _sender, gpointer self) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed ((PublishingFacebookFacebookPublisher*) self); +#line 3415 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_hosted_web_authentication (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingFacebookWebAuthenticationPane* _tmp1_ = NULL; + PublishingFacebookWebAuthenticationPane* _tmp2_ = NULL; + PublishingFacebookWebAuthenticationPane* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + PublishingFacebookWebAuthenticationPane* _tmp5_ = NULL; +#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:415: ACTION: doing hosted web authentication."); +#line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_web_authentication_pane_new (); +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->web_auth_pane); +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->web_auth_pane = _tmp1_; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->web_auth_pane; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp2_, "login-succeeded", (GCallback) _publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded_publishing_facebook_web_authentication_pane_login_succeeded, self, 0); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->web_auth_pane; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp3_, "login-failed", (GCallback) _publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed_publishing_facebook_web_authentication_pane_login_failed, self, 0); +#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->host; +#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->web_auth_pane; +#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 3454 "FacebookPublishing.c" +} + + +static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) { + gint result = 0; + gchar* _result_ = NULL; + gint _tmp0_ = 0; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 987 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, 0); +#line 987 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (needle != NULL, 0); +#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = start_index; +#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = needle; +#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_); +#line 988 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _result_ = _tmp2_; +#line 990 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = _result_; +#line 990 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ != NULL) { +#line 3481 "FacebookPublishing.c" + gchar* _tmp4_ = NULL; +#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _result_; +#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (gint) (_tmp4_ - ((gchar*) self)); +#line 991 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3489 "FacebookPublishing.c" + } else { +#line 993 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = -1; +#line 993 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3495 "FacebookPublishing.c" + } +} + + +static gchar* string_slice (const gchar* self, glong start, glong end) { + gchar* result = NULL; + glong string_length = 0L; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + glong _tmp2_ = 0L; + glong _tmp5_ = 0L; + gboolean _tmp8_ = FALSE; + glong _tmp9_ = 0L; + gboolean _tmp12_ = FALSE; + glong _tmp13_ = 0L; + glong _tmp16_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + gchar* _tmp21_ = NULL; +#line 1328 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp1_; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = start; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp2_ < ((glong) 0)) { +#line 3529 "FacebookPublishing.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = start; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + start = _tmp3_ + _tmp4_; +#line 3538 "FacebookPublishing.c" + } +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp5_ < ((glong) 0)) { +#line 3544 "FacebookPublishing.c" + glong _tmp6_ = 0L; + glong _tmp7_ = 0L; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = end; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp6_ + _tmp7_; +#line 3553 "FacebookPublishing.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp9_ >= ((glong) 0)) { +#line 3559 "FacebookPublishing.c" + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = string_length; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = _tmp10_ <= _tmp11_; +#line 3568 "FacebookPublishing.c" + } else { +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = FALSE; +#line 3572 "FacebookPublishing.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp8_, NULL); +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp13_ >= ((glong) 0)) { +#line 3580 "FacebookPublishing.c" + glong _tmp14_ = 0L; + glong _tmp15_ = 0L; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ <= _tmp15_; +#line 3589 "FacebookPublishing.c" + } else { +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 3593 "FacebookPublishing.c" + } +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_, NULL); +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = start; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = end; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = end; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp21_; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3615 "FacebookPublishing.c" +} + + +static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) { + gint result = 0; + gchar* _result_ = NULL; + gint _tmp0_ = 0; + gunichar _tmp1_ = 0U; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1007 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, 0); +#line 1008 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = start_index; +#line 1008 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = c; +#line 1008 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); +#line 1008 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _result_ = _tmp2_; +#line 1010 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = _result_; +#line 1010 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ != NULL) { +#line 3640 "FacebookPublishing.c" + gchar* _tmp4_ = NULL; +#line 1011 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _result_; +#line 1011 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (gint) (_tmp4_ - ((gchar*) self)); +#line 1011 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3648 "FacebookPublishing.c" + } else { +#line 1013 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = -1; +#line 1013 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3654 "FacebookPublishing.c" + } +} + + +static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { + gchar* result = NULL; + GError * _inner_error_ = NULL; +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (old != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (replacement != NULL, NULL); +#line 3668 "FacebookPublishing.c" + { + GRegex* regex = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + GRegex* _tmp3_ = NULL; + GRegex* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + GRegex* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = old; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = g_regex_escape_string (_tmp0_, -1); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp2_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + regex = _tmp4_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 3699 "FacebookPublishing.c" + goto __catch4_g_regex_error; + } +#line 1382 "/usr/share/vala-0.32/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 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 3708 "FacebookPublishing.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = regex; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = replacement; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 3724 "FacebookPublishing.c" + goto __catch4_g_regex_error; + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/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 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 3735 "FacebookPublishing.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = _tmp5_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = NULL; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp9_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp5_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3749 "FacebookPublishing.c" + } + goto __finally4; + __catch4_g_regex_error: + { + GError* e = NULL; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + e = _inner_error_; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _inner_error_ = NULL; +#line 1385 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_assert_not_reached (); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_error_free0 (e); +#line 3763 "FacebookPublishing.c" + } + __finally4: +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1381 "/usr/share/vala-0.32/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 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 3774 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_facebook_publisher_do_authenticate_session (PublishingFacebookFacebookPublisher* self, const gchar* good_login_uri) { + const gchar* _tmp0_ = NULL; + gchar* decoded_uri = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* access_token = NULL; + gint index = 0; + const gchar* _tmp3_ = NULL; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + const gchar* _tmp12_ = NULL; + gchar* trailing_params = NULL; + const gchar* _tmp16_ = NULL; + gint _tmp17_ = 0; + gint _tmp18_ = 0; + const gchar* _tmp25_ = NULL; + const gchar* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + PublishingFacebookGraphSession* _tmp31_ = NULL; + PublishingFacebookGraphSession* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (good_login_uri != NULL); +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = good_login_uri; +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:429: ACTION: preparing to extract session info" \ +"rmation encoded in uri = '%s'", _tmp0_); +#line 433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = good_login_uri; +#line 433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = soup_uri_decode (_tmp1_); +#line 433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + decoded_uri = _tmp2_; +#line 436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + access_token = NULL; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = decoded_uri; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = string_index_of (_tmp3_, "#access_token=", 0); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + index = _tmp4_; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = index; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp5_ >= 0) { +#line 3826 "FacebookPublishing.c" + const gchar* _tmp6_ = NULL; + gint _tmp7_ = 0; + const gchar* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; + gchar* _tmp11_ = NULL; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = decoded_uri; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = index; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = decoded_uri; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = strlen (_tmp8_); +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = string_slice (_tmp6_, (glong) _tmp7_, (glong) _tmp10_); +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (access_token); +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + access_token = _tmp11_; +#line 3849 "FacebookPublishing.c" + } +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = access_token; +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp12_ == NULL) { +#line 3855 "FacebookPublishing.c" + SpitPublishingPluginHost* _tmp13_ = NULL; + GError* _tmp14_ = NULL; + GError* _tmp15_ = NULL; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = self->priv->host; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Server redirect URL contained no access token"); +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = _tmp14_; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp13_, _tmp15_); +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp15_); +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (access_token); +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (decoded_uri); +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 3875 "FacebookPublishing.c" + } +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + trailing_params = NULL; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = access_token; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = string_index_of_char (_tmp16_, (gunichar) '&', 0); +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + index = _tmp17_; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = index; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp18_ >= 0) { +#line 3889 "FacebookPublishing.c" + const gchar* _tmp19_ = NULL; + gint _tmp20_ = 0; + const gchar* _tmp21_ = NULL; + gint _tmp22_ = 0; + gint _tmp23_ = 0; + gchar* _tmp24_ = NULL; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = access_token; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = index; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = access_token; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = strlen (_tmp21_); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = _tmp22_; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = string_slice (_tmp19_, (glong) _tmp20_, (glong) _tmp23_); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (trailing_params); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + trailing_params = _tmp24_; +#line 3912 "FacebookPublishing.c" + } +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = trailing_params; +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp25_ != NULL) { +#line 3918 "FacebookPublishing.c" + const gchar* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = access_token; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = trailing_params; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = string_replace (_tmp26_, _tmp27_, ""); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (access_token); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + access_token = _tmp28_; +#line 3932 "FacebookPublishing.c" + } +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = access_token; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = string_replace (_tmp29_, "#access_token=", ""); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (access_token); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + access_token = _tmp30_; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = self->priv->graph_session; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp31_, "authenticated", (GCallback) _publishing_facebook_facebook_publisher_on_session_authenticated_publishing_facebook_graph_session_authenticated, self, 0); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = self->priv->graph_session; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = access_token; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_authenticate (_tmp32_, _tmp33_); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (trailing_params); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (access_token); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (decoded_uri); +#line 3958 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_save_session_information (PublishingFacebookFacebookPublisher* self) { + PublishingFacebookGraphSession* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:463: ACTION: saving session information to con" \ +"figuration system."); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->graph_session; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_graph_session_get_access_token (_tmp0_); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_set_persistent_access_token (self, _tmp2_); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp2_); +#line 3980 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_upload_complete_publishing_facebook_uploader_upload_complete (PublishingFacebookUploader* _sender, gint num_photos_published, gpointer self) { +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_upload_complete ((PublishingFacebookFacebookPublisher*) self, _sender, num_photos_published); +#line 3987 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_upload_error_publishing_facebook_uploader_upload_error (PublishingFacebookUploader* _sender, GError* err, gpointer self) { +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_upload_error ((PublishingFacebookFacebookPublisher*) self, _sender, err); +#line 3994 "FacebookPublishing.c" +} + + +static void _publishing_facebook_facebook_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_upload_status_updated ((PublishingFacebookFacebookPublisher*) self, file_number, fraction_complete); +#line 4001 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_upload (PublishingFacebookFacebookPublisher* self) { + gchar* _tmp0_ = NULL; + PublishingFacebookPublishingParameters* _tmp1_ = NULL; + gint _tmp2_ = 0; + SpitPublishingPluginHost* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + PublishingFacebookPublishingParameters* _tmp8_ = NULL; + PublishingFacebookResolution _tmp9_ = 0; + gint _tmp10_ = 0; + PublishingFacebookPublishingParameters* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + void* _tmp13_ = NULL; + GDestroyNotify _tmp14_ = NULL; + SpitPublishingProgressCallback _tmp15_ = NULL; + gboolean _tmp16_ = FALSE; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp17_ = NULL; + gint _tmp18_ = 0; + SpitPublishingPublishable** _tmp19_ = NULL; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + PublishingFacebookGraphSession* _tmp20_ = NULL; + PublishingFacebookPublishingParameters* _tmp21_ = NULL; + SpitPublishingPublishable** _tmp22_ = NULL; + gint _tmp22__length1 = 0; + PublishingFacebookUploader* _tmp23_ = NULL; + PublishingFacebookUploader* _tmp24_ = NULL; + PublishingFacebookUploader* _tmp25_ = NULL; + PublishingFacebookUploader* _tmp26_ = NULL; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->publishing_params; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_->target_album; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_ == PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM) { +#line 4042 "FacebookPublishing.c" + gchar* _tmp3_ = NULL; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup ("(none)"); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp0_); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _tmp3_; +#line 4050 "FacebookPublishing.c" + } else { + PublishingFacebookPublishingParameters* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->publishing_params; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = publishing_facebook_publishing_parameters_get_target_album_name (_tmp4_); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp0_); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _tmp5_; +#line 4062 "FacebookPublishing.c" + } +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:469: ACTION: uploading photos to album '%s'", _tmp0_); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->host; +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp6_, TRUE); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->host; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->publishing_params; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_->resolution; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = publishing_facebook_resolution_get_pixels (_tmp9_); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->publishing_params; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = _tmp11_->strip_metadata; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = spit_publishing_plugin_host_serialize_publishables (_tmp7_, _tmp10_, _tmp12_, &_tmp13_, &_tmp14_); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter = NULL; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter = _tmp15_; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target = _tmp13_; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp14_; +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp16_) { +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp0_); +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4106 "FacebookPublishing.c" + } +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = self->priv->host; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = spit_publishing_plugin_host_get_publishables (_tmp17_, &_tmp18_); +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishables = _tmp19_; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishables_length1 = _tmp18_; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishables_size_ = publishables_length1; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->graph_session; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = self->priv->publishing_params; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = publishables; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22__length1 = publishables_length1; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = publishing_facebook_uploader_new (_tmp20_, _tmp21_, _tmp22_, _tmp22__length1); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_uploader_unref0 (self->priv->uploader); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->uploader = _tmp23_; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = self->priv->uploader; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp24_, "upload-complete", (GCallback) _publishing_facebook_facebook_publisher_on_upload_complete_publishing_facebook_uploader_upload_complete, self, 0); +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = self->priv->uploader; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp25_, "upload-error", (GCallback) _publishing_facebook_facebook_publisher_on_upload_error_publishing_facebook_uploader_upload_error, self, 0); +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = self->priv->uploader; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_upload (_tmp26_, _publishing_facebook_facebook_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp0_); +#line 4148 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_do_show_success_pane (PublishingFacebookFacebookPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:495: ACTION: showing success pane."); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->host; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 4167 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_generic_error (PublishingFacebookFacebookPublisher* self, GError* _error_) { + GError* _tmp0_ = NULL; +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _error_; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_error_matches (_tmp0_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION)) { +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_logout (self); +#line 4181 "FacebookPublishing.c" + } else { + SpitPublishingPluginHost* _tmp1_ = NULL; + GError* _tmp2_ = NULL; +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->host; +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _error_; +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp1_, _tmp2_); +#line 4191 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_facebook_publisher_on_login_clicked (PublishingFacebookFacebookPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4206 "FacebookPublishing.c" + } +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:512: EVENT: user clicked 'Login' on welcome pa" \ +"ne."); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_test_connection_to_endpoint (self); +#line 4212 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_endpoint_test_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 518 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_completed_publishing_facebook_graph_message_completed, self); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_error_publishing_facebook_graph_message_failed, self); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 522 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4244 "FacebookPublishing.c" + } +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:524: EVENT: endpoint test transaction detected" \ +" that the Facebook endpoint is alive."); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_hosted_web_authentication (self); +#line 4250 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_endpoint_test_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* _error_) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + GError* _tmp9_ = NULL; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_completed_publishing_facebook_graph_message_completed, self); +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_endpoint_test_error_publishing_facebook_graph_message_failed, self); +#line 534 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 534 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4287 "FacebookPublishing.c" + } +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _error_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_->message; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strconcat ("EVENT: endpoint test transaction failed to detect a connection to the " \ +"Facebook " "endpoint", _tmp6_, NULL); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp7_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:537: %s", _tmp8_); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp8_); +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _error_; +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_generic_error (self, _tmp9_); +#line 4305 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_web_auth_pane_login_succeeded (PublishingFacebookFacebookPublisher* self, const gchar* success_url) { + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (success_url != NULL); +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4322 "FacebookPublishing.c" + } +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:547: EVENT: hosted web login succeeded."); +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = success_url; +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_authenticate_session (self, _tmp1_); +#line 4330 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_web_auth_pane_login_failed (PublishingFacebookFacebookPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4344 "FacebookPublishing.c" + } +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:558: EVENT: hosted web login failed."); +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_show_service_welcome_pane (self); +#line 4350 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_session_authenticated (PublishingFacebookFacebookPublisher* self) { + PublishingFacebookGraphSession* _tmp0_ = NULL; + guint _tmp1_ = 0U; + gboolean _tmp2_ = FALSE; + PublishingFacebookGraphSession* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->graph_session; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("authenticated", PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, &_tmp1_, NULL, FALSE); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_session_authenticated_publishing_facebook_graph_session_authenticated, self); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp2_) { +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4374 "FacebookPublishing.c" + } +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->graph_session; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_facebook_graph_session_is_authenticated (_tmp3_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp4_, "graph_session.is_authenticated()"); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:576: EVENT: an authenticated session has becom" \ +"e available."); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_save_session_information (self); +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_fetch_user_info (self); +#line 4388 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_fetch_user_info_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingFacebookGraphMessage* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + PublishingFacebookGraphMessage* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_completed_publishing_facebook_graph_message_completed, self); +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_error_publishing_facebook_graph_message_failed, self); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4426 "FacebookPublishing.c" + } +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = message; +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_graph_message_get_response_body (_tmp5_); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:589: EVENT: user info fetch completed; respons" \ +"e = '%s'.", _tmp7_); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = message; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = publishing_facebook_graph_message_get_response_body (_tmp8_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_extract_user_info_from_json (self, _tmp10_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp10_); +#line 4448 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_fetch_user_info_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* _error_) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_completed_publishing_facebook_graph_message_completed, self); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_user_info_error_publishing_facebook_graph_message_failed, self); +#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4481 "FacebookPublishing.c" + } +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:602: EVENT: fetching user info generated and e" \ +"rror."); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _error_; +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_generic_error (self, _tmp5_); +#line 4489 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_user_info_extracted (PublishingFacebookFacebookPublisher* self) { + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4505 "FacebookPublishing.c" + } +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->uid; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->username; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:611: EVENT: user info extracted from JSON resp" \ +"onse: uid = %s; name = %s.", _tmp1_, _tmp2_); +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_fetch_album_descriptions (self); +#line 4515 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_fetch_albums_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingFacebookGraphMessage* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + PublishingFacebookGraphMessage* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_completed_publishing_facebook_graph_message_completed, self); +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_error_publishing_facebook_graph_message_failed, self); +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4553 "FacebookPublishing.c" + } +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = message; +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_graph_message_get_response_body (_tmp5_); +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:623: EVENT: album descriptions fetch transacti" \ +"on completed; response = '%s'.", _tmp7_); +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = message; +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = publishing_facebook_graph_message_get_response_body (_tmp8_); +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_extract_albums_from_json (self, _tmp10_); +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp10_); +#line 4575 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_fetch_albums_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* err) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_completed_publishing_facebook_graph_message_completed, self); +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_fetch_albums_error_publishing_facebook_graph_message_failed, self); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4608 "FacebookPublishing.c" + } +#line 637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:637: EVENT: album description fetch attempt ge" \ +"nerated an error."); +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = err; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_generic_error (self, _tmp5_); +#line 4616 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_albums_extracted (PublishingFacebookFacebookPublisher* self) { + gboolean _tmp0_ = FALSE; + PublishingFacebookPublishingParameters* _tmp1_ = NULL; + PublishingFacebookAlbum** _tmp2_ = NULL; + gint _tmp2__length1 = 0; +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4633 "FacebookPublishing.c" + } +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->publishing_params; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_->albums; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2__length1 = _tmp1_->albums_length1; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:646: EVENT: successfully extracted %d albums f" \ +"rom JSON response", _tmp2__length1); +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_show_publishing_options_pane (self); +#line 4645 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_publishing_options_pane_logout (PublishingFacebookFacebookPublisher* self) { + PublishingFacebookPublishingOptionsPane* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookPublishingOptionsPane* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_publish_publishing_facebook_publishing_options_pane_publish, self); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->publishing_options_pane; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_logout_publishing_facebook_publishing_options_pane_logout, self); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4675 "FacebookPublishing.c" + } +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:659: EVENT: user clicked 'Logout' in publishin" \ +"g options pane."); +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_logout (self); +#line 4681 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_publishing_options_pane_publish (PublishingFacebookFacebookPublisher* self, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution resolution, gboolean strip_metadata) { + PublishingFacebookPublishingOptionsPane* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookPublishingOptionsPane* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingFacebookPublishingParameters* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; + PublishingFacebookPublishingParameters* _tmp8_ = NULL; + PublishingFacebookResolution _tmp9_ = 0; + PublishingFacebookResolution _tmp10_ = 0; + PublishingFacebookPublishingParameters* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (privacy_setting != NULL); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_publish_publishing_facebook_publishing_options_pane_publish, self); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->publishing_options_pane; +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_publishing_options_pane_logout_publishing_facebook_publishing_options_pane_logout, self); +#line 669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4723 "FacebookPublishing.c" + } +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:672: EVENT: user clicked 'Publish' in publishi" \ +"ng options pane."); +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->publishing_params; +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = strip_metadata; +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_->strip_metadata = _tmp6_; +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = strip_metadata; +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_set_persistent_strip_metadata (self, _tmp7_); +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->publishing_params; +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = resolution; +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_->resolution = _tmp9_; +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = resolution; +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_set_persistent_default_size (self, (gint) _tmp10_); +#line 678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->publishing_params; +#line 678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = privacy_setting; +#line 678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = g_strdup (_tmp12_); +#line 678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp11_->privacy_object); +#line 678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_->privacy_object = _tmp13_; +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = target_album; +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp14_ != NULL) { +#line 4761 "FacebookPublishing.c" + PublishingFacebookPublishingParameters* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + PublishingFacebookPublishingParameters* _tmp17_ = NULL; + gint _tmp18_ = 0; +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = self->priv->publishing_params; +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = target_album; +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_parameters_set_target_album_by_name (_tmp15_, _tmp16_); +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = self->priv->publishing_params; +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = _tmp17_->target_album; +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp18_ != PUBLISHING_FACEBOOK_PUBLISHING_PARAMETERS_UNKNOWN_ALBUM) { +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_upload (self); +#line 4780 "FacebookPublishing.c" + } else { + PublishingFacebookPublishingParameters* _tmp19_ = NULL; + const gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = self->priv->publishing_params; +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = target_album; +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = g_strdup (_tmp20_); +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp19_->new_album_name); +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_->new_album_name = _tmp21_; +#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_create_new_album (self); +#line 4797 "FacebookPublishing.c" + } + } else { +#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_upload (self); +#line 4802 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_facebook_publisher_on_create_album_completed (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingFacebookPublishingParameters* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + PublishingFacebookGraphMessage* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + PublishingFacebookPublishingParameters* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + PublishingFacebookGraphMessage* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_create_album_completed_publishing_facebook_graph_message_completed, self); +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_create_album_error_publishing_facebook_graph_message_failed, self); +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->publishing_params; +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_->new_album_name; +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp5_ != NULL, "publishing_params.new_album_name != null"); +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp6_) { +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4851 "FacebookPublishing.c" + } +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = message; +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = publishing_facebook_graph_message_get_response_body (_tmp7_); +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_; +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:705: EVENT: created new album resource on remo" \ +"te host; response body = %s.\n", _tmp9_); +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp9_); +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = self->priv->publishing_params; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = _tmp10_->new_album_name; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = message; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = publishing_facebook_graph_message_get_response_body (_tmp12_); +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = _tmp13_; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_add_new_local_album_from_json (self, _tmp11_, _tmp14_); +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp14_); +#line 4877 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_create_album_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookGraphMessage* message, GError* err) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; +#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_create_album_completed_publishing_facebook_graph_message_completed, self); +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_create_album_error_publishing_facebook_graph_message_failed, self); +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4910 "FacebookPublishing.c" + } +#line 719 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:719: EVENT: attempt to create new album genera" \ +"ted an error."); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = err; +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_on_generic_error (self, _tmp5_); +#line 4918 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_upload_status_updated (PublishingFacebookFacebookPublisher* self, gint file_number, gdouble completed_fraction) { + gboolean _tmp0_ = FALSE; + gdouble _tmp1_ = 0.0; + SpitPublishingProgressCallback _tmp2_ = NULL; + void* _tmp2__target = NULL; + SpitPublishingProgressCallback _tmp3_ = NULL; + void* _tmp3__target = NULL; + gint _tmp4_ = 0; + gdouble _tmp5_ = 0.0; +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp0_) { +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4939 "FacebookPublishing.c" + } +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = completed_fraction; +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:728: EVENT: uploader reports upload %.2f perce" \ +"nt complete.", 100.0 * _tmp1_); +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->progress_reporter; +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2__target = self->priv->progress_reporter_target; +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = file_number; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = completed_fraction; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 4961 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_upload_complete (PublishingFacebookFacebookPublisher* self, PublishingFacebookUploader* uploader, gint num_published) { + PublishingFacebookUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + gint _tmp5_ = 0; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (uploader)); +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = uploader; +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_FACEBOOK_TYPE_UPLOADER, &_tmp1_, NULL, FALSE); +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_upload_complete_publishing_facebook_uploader_upload_complete, self); +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = uploader; +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_FACEBOOK_TYPE_UPLOADER, &_tmp3_, NULL, FALSE); +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_upload_error_publishing_facebook_uploader_upload_error, self); +#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 4994 "FacebookPublishing.c" + } +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = num_published; +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:742: EVENT: uploader reports upload complete; " \ +"%d items published.", _tmp5_); +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_show_success_pane (self); +#line 5002 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_on_upload_error (PublishingFacebookFacebookPublisher* self, PublishingFacebookUploader* uploader, GError* err) { + PublishingFacebookUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self)); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (uploader)); +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = uploader; +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_FACEBOOK_TYPE_UPLOADER, &_tmp1_, NULL, FALSE); +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_upload_complete_publishing_facebook_uploader_upload_complete, self); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = uploader; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_FACEBOOK_TYPE_UPLOADER, &_tmp3_, NULL, FALSE); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_facebook_publisher_on_upload_error_publishing_facebook_uploader_upload_error, self); +#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp4_) { +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 5038 "FacebookPublishing.c" + } +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = err; +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_->message; +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:754: EVENT: uploader reports upload error = '%" \ +"s'.", _tmp6_); +#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->host; +#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = err; +#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 5052 "FacebookPublishing.c" +} + + +static SpitPublishingService* publishing_facebook_facebook_publisher_real_get_service (SpitPublishingPublisher* base) { + PublishingFacebookFacebookPublisher * self; + SpitPublishingService* result = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingService* _tmp1_ = NULL; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher); +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->service; +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5071 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_facebook_publisher_get_service_name (PublishingFacebookFacebookPublisher* self) { + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), NULL); +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_strdup (PUBLISHING_FACEBOOK_SERVICE_NAME); +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5086 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_facebook_publisher_get_user_visible_name (PublishingFacebookFacebookPublisher* self) { + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 767 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (self), NULL); +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_strdup (PUBLISHING_FACEBOOK_USER_VISIBLE_NAME); +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_; +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5101 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_real_start (SpitPublishingPublisher* base) { + PublishingFacebookFacebookPublisher * self; + gboolean _tmp0_ = FALSE; + PublishingFacebookPublishingParameters* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_) { +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 5118 "FacebookPublishing.c" + } +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:775: FacebookPublisher: starting interaction."); +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->running = TRUE; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_publishing_parameters_new (); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_parameters_unref0 (self->priv->publishing_params); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishing_params = _tmp1_; +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishing_facebook_facebook_publisher_is_persistent_session_valid (self); +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_) { +#line 5134 "FacebookPublishing.c" + PublishingFacebookGraphSession* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->graph_session; +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_facebook_facebook_publisher_get_persistent_access_token (self); +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_authenticate (_tmp3_, _tmp5_); +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp5_); +#line 5148 "FacebookPublishing.c" + } else { + gboolean _tmp6_ = FALSE; +#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_web_authentication_pane_is_cache_dirty (); +#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp6_) { +#line 5155 "FacebookPublishing.c" + SpitPublishingPluginHost* _tmp7_ = NULL; + SpitPublishingPluginHost* _tmp8_ = NULL; +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->host; +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp7_, FALSE); +#line 791 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->host; +#line 791 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp8_, PUBLISHING_FACEBOOK_RESTART_ERROR_MESSAGE, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 5166 "FacebookPublishing.c" + } else { +#line 794 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_do_show_service_welcome_pane (self); +#line 5170 "FacebookPublishing.c" + } + } +} + + +static void publishing_facebook_facebook_publisher_real_stop (SpitPublishingPublisher* base) { + PublishingFacebookFacebookPublisher * self; + PublishingFacebookGraphSession* _tmp0_ = NULL; +#line 799 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher); +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:800: FacebookPublisher: stop( ) invoked."); +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->graph_session; +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_ != NULL) { +#line 5187 "FacebookPublishing.c" + PublishingFacebookGraphSession* _tmp1_ = NULL; +#line 803 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->graph_session; +#line 803 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_stop_transactions (_tmp1_); +#line 5193 "FacebookPublishing.c" + } +#line 805 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->host = NULL; +#line 806 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->running = FALSE; +#line 5199 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_facebook_publisher_real_is_running (SpitPublishingPublisher* base) { + PublishingFacebookFacebookPublisher * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->running; +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_; +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5215 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_class_init (PublishingFacebookFacebookPublisherClass * klass) { +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_parent_class = g_type_class_peek_parent (klass); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookFacebookPublisherPrivate)); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_facebook_facebook_publisher_finalize; +#line 5226 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_service = (SpitPublishingService* (*)(SpitPublishingPublisher*)) publishing_facebook_facebook_publisher_real_get_service; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->start = (void (*)(SpitPublishingPublisher*)) publishing_facebook_facebook_publisher_real_start; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->stop = (void (*)(SpitPublishingPublisher*)) publishing_facebook_facebook_publisher_real_stop; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->is_running = (gboolean (*)(SpitPublishingPublisher*)) publishing_facebook_facebook_publisher_real_is_running; +#line 5241 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_instance_init (PublishingFacebookFacebookPublisher * self) { +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_FACEBOOK_PUBLISHER_GET_PRIVATE (self); +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->host = NULL; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->web_auth_pane = NULL; +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter = NULL; +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->service = NULL; +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->running = FALSE; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishing_options_pane = NULL; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->uploader = NULL; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->uid = NULL; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->username = NULL; +#line 5266 "FacebookPublishing.c" +} + + +static void publishing_facebook_facebook_publisher_finalize (GObject* obj) { + PublishingFacebookFacebookPublisher * self; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_FACEBOOK_PUBLISHER, PublishingFacebookFacebookPublisher); +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_parameters_unref0 (self->priv->publishing_params); +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->web_auth_pane); +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter = NULL; +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_session_unref0 (self->priv->graph_session); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publishing_options_pane); +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_uploader_unref0 (self->priv->uploader); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->uid); +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->username); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (publishing_facebook_facebook_publisher_parent_class)->finalize (obj); +#line 5298 "FacebookPublishing.c" +} + + +GType publishing_facebook_facebook_publisher_get_type (void) { + static volatile gsize publishing_facebook_facebook_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_facebook_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookFacebookPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_facebook_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookFacebookPublisher), 0, (GInstanceInitFunc) publishing_facebook_facebook_publisher_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_facebook_facebook_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_facebook_facebook_publisher_type_id; + publishing_facebook_facebook_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFacebookFacebookPublisher", &g_define_type_info, 0); + g_type_add_interface_static (publishing_facebook_facebook_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info); + g_once_init_leave (&publishing_facebook_facebook_publisher_type_id__volatile, publishing_facebook_facebook_publisher_type_id); + } + return publishing_facebook_facebook_publisher_type_id__volatile; +} + + +static void _publishing_facebook_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self) { +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_on_page_load_changed ((PublishingFacebookWebAuthenticationPane*) self, load_event); +#line 5319 "FacebookPublishing.c" +} + + +static gboolean __lambda4_ (PublishingFacebookWebAuthenticationPane* self) { + gboolean result = FALSE; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = TRUE; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5329 "FacebookPublishing.c" +} + + +static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self) { + gboolean result; + result = __lambda4_ ((PublishingFacebookWebAuthenticationPane*) self); +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5338 "FacebookPublishing.c" +} + + +PublishingFacebookWebAuthenticationPane* publishing_facebook_web_authentication_pane_construct (GType object_type) { + PublishingFacebookWebAuthenticationPane * self = NULL; + GtkBox* _tmp0_ = NULL; + GtkScrolledWindow* _tmp1_ = NULL; + GtkScrolledWindow* _tmp2_ = NULL; + GtkScrolledWindow* _tmp3_ = NULL; + WebKitWebView* _tmp4_ = NULL; + WebKitWebView* _tmp5_ = NULL; + WebKitSettings* _tmp6_ = NULL; + WebKitWebView* _tmp7_ = NULL; + WebKitWebView* _tmp8_ = NULL; + GtkScrolledWindow* _tmp9_ = NULL; + WebKitWebView* _tmp10_ = NULL; + GtkBox* _tmp11_ = NULL; + GtkScrolledWindow* _tmp12_ = NULL; +#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookWebAuthenticationPane*) g_object_new (object_type, NULL); +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_ref_sink (_tmp0_); +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->pane_widget = _tmp0_; +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL); +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_ref_sink (_tmp1_); +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->webview_frame); +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->webview_frame = _tmp1_; +#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->webview_frame; +#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_scrolled_window_set_shadow_type (_tmp2_, GTK_SHADOW_ETCHED_IN); +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->webview_frame; +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_scrolled_window_set_policy (_tmp3_, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = (WebKitWebView*) webkit_web_view_new (); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_ref_sink (_tmp4_); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->webview); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->webview = _tmp4_; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->webview; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = webkit_web_view_get_settings (_tmp5_); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + webkit_settings_set_enable_plugins (_tmp6_, FALSE); +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->webview; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp7_, "load-changed", (GCallback) _publishing_facebook_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed, self, 0); +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->webview; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp8_, "context-menu", (GCallback) ___lambda4__webkit_web_view_context_menu, self, 0); +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = self->priv->webview_frame; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = self->priv->webview; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)); +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->pane_widget; +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = self->priv->webview_frame; +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_box_pack_start (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0); +#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 5419 "FacebookPublishing.c" +} + + +PublishingFacebookWebAuthenticationPane* publishing_facebook_web_authentication_pane_new (void) { +#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_web_authentication_pane_construct (PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE); +#line 5426 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_web_authentication_pane_locale_lookup_ref0 (gpointer self) { +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_web_authentication_pane_locale_lookup_ref (self) : NULL; +#line 5433 "FacebookPublishing.c" +} + + +static gboolean string_contains (const gchar* self, const gchar* needle) { + gboolean result = FALSE; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, FALSE); +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (needle != NULL, FALSE); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = needle; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp1_ != NULL; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 5453 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (PublishingFacebookWebAuthenticationPane* self) { + gchar* result = NULL; + const gchar* raw_system_locale = NULL; + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + const gchar* _tmp2_ = NULL; + gchar* system_locale = NULL; + const gchar* _tmp5_ = NULL; + gchar** _tmp6_ = NULL; + gchar** _tmp7_ = NULL; + gchar** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup** _tmp12_ = NULL; + gint _tmp12__length1 = 0; + gchar* _tmp43_ = NULL; +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE (self), NULL); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = setlocale (LC_ALL, ""); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + raw_system_locale = _tmp0_; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = raw_system_locale; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_ == NULL) { +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = TRUE; +#line 5487 "FacebookPublishing.c" + } else { + const gchar* _tmp3_ = NULL; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = raw_system_locale; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strcmp0 (_tmp3_, "") == 0; +#line 5494 "FacebookPublishing.c" + } +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1_) { +#line 5498 "FacebookPublishing.c" + gchar* _tmp4_ = NULL; +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_strdup ("www"); +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp4_; +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5506 "FacebookPublishing.c" + } +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = raw_system_locale; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_ = g_strsplit (_tmp5_, ".", 0); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp7_; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8__length1 = _vala_array_length (_tmp6_); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_[0]; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = g_strdup (_tmp9_); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = _tmp10_; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + system_locale = _tmp11_; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = self->priv->locale_lookup_table; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12__length1 = self->priv->locale_lookup_table_length1; +#line 5530 "FacebookPublishing.c" + { + PublishingFacebookWebAuthenticationPaneLocaleLookup** locale_lookup_collection = NULL; + gint locale_lookup_collection_length1 = 0; + gint _locale_lookup_collection_size_ = 0; + gint locale_lookup_it = 0; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + locale_lookup_collection = _tmp12_; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + locale_lookup_collection_length1 = _tmp12__length1; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (locale_lookup_it = 0; locale_lookup_it < _tmp12__length1; locale_lookup_it = locale_lookup_it + 1) { +#line 5542 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp13_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* locale_lookup = NULL; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _publishing_facebook_web_authentication_pane_locale_lookup_ref0 (locale_lookup_collection[locale_lookup_it]); +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + locale_lookup = _tmp13_; +#line 5549 "FacebookPublishing.c" + { + const gchar* _tmp14_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + gboolean _tmp17_ = FALSE; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp29_ = NULL; + const gchar* _tmp30_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp40_ = NULL; + const gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = system_locale; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = locale_lookup; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = _tmp15_->prefix; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = g_str_has_prefix (_tmp14_, _tmp16_); +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp17_) { +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + continue; +#line 5576 "FacebookPublishing.c" + } +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = locale_lookup; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_->exception_code; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp19_ != NULL) { +#line 5584 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + gboolean _tmp25_ = FALSE; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = locale_lookup; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = _tmp20_->exception_translation; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp21_ != NULL, "locale_lookup.exception_translation != null"); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = system_locale; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = locale_lookup; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = _tmp23_->exception_code; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = string_contains (_tmp22_, _tmp24_); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp25_) { +#line 5607 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = locale_lookup; +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = _tmp26_->exception_translation; +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = g_strdup (_tmp27_); +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp28_; +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (system_locale); +#line 924 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5625 "FacebookPublishing.c" + } + } +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = locale_lookup; +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = _tmp29_->exception_code_2; +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp30_ != NULL) { +#line 5634 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp34_ = NULL; + const gchar* _tmp35_ = NULL; + gboolean _tmp36_ = FALSE; +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = locale_lookup; +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = _tmp31_->exception_translation_2; +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp32_ != NULL, "locale_lookup.exception_translation_2 != null"); +#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = system_locale; +#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = locale_lookup; +#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = _tmp34_->exception_code_2; +#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = string_contains (_tmp33_, _tmp35_); +#line 930 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp36_) { +#line 5657 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp37_ = locale_lookup; +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp38_ = _tmp37_->exception_translation_2; +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp39_ = g_strdup (_tmp38_); +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp39_; +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (system_locale); +#line 931 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5675 "FacebookPublishing.c" + } + } +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp40_ = locale_lookup; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp41_ = _tmp40_->translation; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp42_ = g_strdup (_tmp41_); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp42_; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_web_authentication_pane_locale_lookup_unref0 (locale_lookup); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (system_locale); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5692 "FacebookPublishing.c" + } + } + } +#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp43_ = g_strdup ("www"); +#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp43_; +#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (system_locale); +#line 938 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5704 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_web_authentication_pane_get_login_url (PublishingFacebookWebAuthenticationPane* self) { + gchar* result = NULL; + gchar* facebook_locale = NULL; + gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE (self), NULL); +#line 942 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_web_authentication_pane_get_system_locale_as_facebook_locale (self); +#line 942 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + facebook_locale = _tmp0_; +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup_printf ("https://%s.facebook.com/dialog/oauth?client_id=%s&redirect_uri=https:/" \ +"/www.facebook.com/connect/login_success.html&display=popup&scope=publi" \ +"sh_actions,user_photos,user_videos&response_type=token", facebook_locale, PUBLISHING_FACEBOOK_APPLICATION_ID); +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (facebook_locale); +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5727 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_on_page_load (PublishingFacebookWebAuthenticationPane* self) { + GtkBox* _tmp0_ = NULL; + GdkWindow* _tmp1_ = NULL; + GdkCursor* _tmp2_ = NULL; + GdkCursor* _tmp3_ = NULL; + gchar* loaded_url = NULL; + WebKitWebView* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + const gchar* _tmp24_ = NULL; + gboolean _tmp25_ = FALSE; + const gchar* _tmp29_ = NULL; + gboolean _tmp30_ = FALSE; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE (self)); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = gdk_cursor_new (GDK_LEFT_PTR); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp2_; +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gdk_window_set_cursor (_tmp1_, _tmp3_); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (_tmp3_); +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->webview; +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = webkit_web_view_get_uri (_tmp4_); +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_; +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strdup (_tmp6_); +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + loaded_url = _tmp7_; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = loaded_url; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = g_strconcat ("loaded url: ", _tmp8_, NULL); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:950: %s", _tmp10_); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp10_); +#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = loaded_url; +#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = string_contains (_tmp11_, "?"); +#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp12_) { +#line 5790 "FacebookPublishing.c" + gint index = 0; + const gchar* _tmp13_ = NULL; + gint _tmp14_ = 0; + gchar* params = NULL; + const gchar* _tmp15_ = NULL; + gint _tmp16_ = 0; + const gchar* _tmp17_ = NULL; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gchar* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; +#line 954 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = loaded_url; +#line 954 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = string_index_of_char (_tmp13_, (gunichar) '?', 0); +#line 954 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + index = _tmp14_; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = loaded_url; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = index; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = loaded_url; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = strlen (_tmp17_); +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = string_slice (_tmp15_, (glong) _tmp16_, (glong) _tmp19_); +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + params = _tmp20_; +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = loaded_url; +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = params; +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = string_replace (_tmp21_, _tmp22_, ""); +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (loaded_url); +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + loaded_url = _tmp23_; +#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (params); +#line 5836 "FacebookPublishing.c" + } +#line 960 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = loaded_url; +#line 960 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = string_contains (_tmp24_, "login_success"); +#line 960 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp25_) { +#line 5844 "FacebookPublishing.c" + WebKitWebView* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_cache_dirty = TRUE; +#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = self->priv->webview; +#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = webkit_web_view_get_uri (_tmp26_); +#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = _tmp27_; +#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "login-succeeded", _tmp28_); +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (loaded_url); +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 5862 "FacebookPublishing.c" + } +#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = loaded_url; +#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = string_contains (_tmp29_, "login_failure"); +#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp30_) { +#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "login-failed"); +#line 969 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (loaded_url); +#line 969 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 5876 "FacebookPublishing.c" + } +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (loaded_url); +#line 5880 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_on_load_started (PublishingFacebookWebAuthenticationPane* self) { + GtkBox* _tmp0_ = NULL; + GdkWindow* _tmp1_ = NULL; + GdkCursor* _tmp2_ = NULL; + GdkCursor* _tmp3_ = NULL; +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE (self)); +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = gdk_cursor_new (GDK_WATCH); +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp2_; +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gdk_window_set_cursor (_tmp1_, _tmp3_); +#line 974 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (_tmp3_); +#line 5903 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_on_page_load_changed (PublishingFacebookWebAuthenticationPane* self, WebKitLoadEvent load_event) { + WebKitLoadEvent _tmp0_ = 0; +#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_WEB_AUTHENTICATION_PANE (self)); +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = load_event; +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + switch (_tmp0_) { +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case WEBKIT_LOAD_STARTED: +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case WEBKIT_LOAD_REDIRECTED: +#line 5919 "FacebookPublishing.c" + { +#line 981 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_on_load_started (self); +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 5925 "FacebookPublishing.c" + } +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case WEBKIT_LOAD_FINISHED: +#line 5929 "FacebookPublishing.c" + { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_on_page_load (self); +#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 5935 "FacebookPublishing.c" + } + default: +#line 978 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 5940 "FacebookPublishing.c" + } +#line 988 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 5944 "FacebookPublishing.c" +} + + +gboolean publishing_facebook_web_authentication_pane_is_cache_dirty (void) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_web_authentication_pane_cache_dirty; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5957 "FacebookPublishing.c" +} + + +static GtkWidget* publishing_facebook_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingFacebookWebAuthenticationPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane); +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5976 "FacebookPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_facebook_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingFacebookWebAuthenticationPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 999 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane); +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 5989 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingFacebookWebAuthenticationPane * self; + WebKitWebView* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane); +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->webview; +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_web_authentication_pane_get_login_url (self); +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_; +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + webkit_web_view_load_uri (_tmp0_, _tmp2_); +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp2_); +#line 6010 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingFacebookWebAuthenticationPane * self; +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane); +#line 6018 "FacebookPublishing.c" +} + + +static PublishingFacebookWebAuthenticationPaneLocaleLookup* publishing_facebook_web_authentication_pane_locale_lookup_construct (GType object_type, const gchar* prefix, const gchar* translation, const gchar* exception_code, const gchar* exception_translation, const gchar* exception_code_2, const gchar* exception_translation_2) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (prefix != NULL, NULL); +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (translation != NULL, NULL); +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookWebAuthenticationPaneLocaleLookup*) g_type_create_instance (object_type); +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = prefix; +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->prefix); +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->prefix = _tmp1_; +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = translation; +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->translation); +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->translation = _tmp3_; +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = exception_code; +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_code); +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->exception_code = _tmp5_; +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = exception_translation; +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strdup (_tmp6_); +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_translation); +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->exception_translation = _tmp7_; +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = exception_code_2; +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = g_strdup (_tmp8_); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_code_2); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->exception_code_2 = _tmp9_; +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = exception_translation_2; +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = g_strdup (_tmp10_); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_translation_2); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->exception_translation_2 = _tmp11_; +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 6092 "FacebookPublishing.c" +} + + +static PublishingFacebookWebAuthenticationPaneLocaleLookup* publishing_facebook_web_authentication_pane_locale_lookup_new (const gchar* prefix, const gchar* translation, const gchar* exception_code, const gchar* exception_translation, const gchar* exception_code_2, const gchar* exception_translation_2) { +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_web_authentication_pane_locale_lookup_construct (PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, prefix, translation, exception_code, exception_translation, exception_code_2, exception_translation_2); +#line 6099 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_value_locale_lookup_init (GValue* value) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6106 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_value_locale_lookup_free_value (GValue* value) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_locale_lookup_unref (value->data[0].v_pointer); +#line 6115 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_web_authentication_pane_value_locale_lookup_copy_value (const GValue* src_value, GValue* dest_value) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_web_authentication_pane_locale_lookup_ref (src_value->data[0].v_pointer); +#line 6125 "FacebookPublishing.c" + } else { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 6129 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_web_authentication_pane_value_locale_lookup_peek_pointer (const GValue* value) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 6137 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_web_authentication_pane_value_locale_lookup_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 6144 "FacebookPublishing.c" + PublishingFacebookWebAuthenticationPaneLocaleLookup* object; + object = collect_values[0].v_pointer; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 6151 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 6155 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_web_authentication_pane_locale_lookup_ref (object); +#line 6159 "FacebookPublishing.c" + } else { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6163 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 6167 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_web_authentication_pane_value_locale_lookup_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookWebAuthenticationPaneLocaleLookup** object_p; + object_p = collect_values[0].v_pointer; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 6178 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 6184 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 6188 "FacebookPublishing.c" + } else { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_web_authentication_pane_locale_lookup_ref (value->data[0].v_pointer); +#line 6192 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 6196 "FacebookPublishing.c" +} + + +static GParamSpec* publishing_facebook_web_authentication_pane_param_spec_locale_lookup (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookWebAuthenticationPaneParamSpecLocaleLookup* spec; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP), NULL); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 6210 "FacebookPublishing.c" +} + + +static gpointer publishing_facebook_web_authentication_pane_value_get_locale_lookup (const GValue* value) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP), NULL); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 6219 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_value_set_locale_lookup (GValue* value, gpointer v_object) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* old; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_locale_lookup_ref (value->data[0].v_pointer); +#line 6239 "FacebookPublishing.c" + } else { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6243 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_locale_lookup_unref (old); +#line 6249 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_web_authentication_pane_value_take_locale_lookup (GValue* value, gpointer v_object) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* old; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP)); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 6268 "FacebookPublishing.c" + } else { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6272 "FacebookPublishing.c" + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_locale_lookup_unref (old); +#line 6278 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_web_authentication_pane_locale_lookup_class_init (PublishingFacebookWebAuthenticationPaneLocaleLookupClass * klass) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_locale_lookup_parent_class = g_type_class_peek_parent (klass); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookWebAuthenticationPaneLocaleLookupClass *) klass)->finalize = publishing_facebook_web_authentication_pane_locale_lookup_finalize; +#line 6288 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_locale_lookup_instance_init (PublishingFacebookWebAuthenticationPaneLocaleLookup * self) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 6295 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_locale_lookup_finalize (PublishingFacebookWebAuthenticationPaneLocaleLookup* obj) { + PublishingFacebookWebAuthenticationPaneLocaleLookup * self; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_TYPE_LOCALE_LOOKUP, PublishingFacebookWebAuthenticationPaneLocaleLookup); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 841 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->prefix); +#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->translation); +#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_code); +#line 844 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_translation); +#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_code_2); +#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->exception_translation_2); +#line 6317 "FacebookPublishing.c" +} + + +static GType publishing_facebook_web_authentication_pane_locale_lookup_get_type (void) { + static volatile gsize publishing_facebook_web_authentication_pane_locale_lookup_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_web_authentication_pane_locale_lookup_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_web_authentication_pane_value_locale_lookup_init, publishing_facebook_web_authentication_pane_value_locale_lookup_free_value, publishing_facebook_web_authentication_pane_value_locale_lookup_copy_value, publishing_facebook_web_authentication_pane_value_locale_lookup_peek_pointer, "p", publishing_facebook_web_authentication_pane_value_locale_lookup_collect_value, "p", publishing_facebook_web_authentication_pane_value_locale_lookup_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookWebAuthenticationPaneLocaleLookupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_web_authentication_pane_locale_lookup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookWebAuthenticationPaneLocaleLookup), 0, (GInstanceInitFunc) publishing_facebook_web_authentication_pane_locale_lookup_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_facebook_web_authentication_pane_locale_lookup_type_id; + publishing_facebook_web_authentication_pane_locale_lookup_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookWebAuthenticationPaneLocaleLookup", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_web_authentication_pane_locale_lookup_type_id__volatile, publishing_facebook_web_authentication_pane_locale_lookup_type_id); + } + return publishing_facebook_web_authentication_pane_locale_lookup_type_id__volatile; +} + + +static gpointer publishing_facebook_web_authentication_pane_locale_lookup_ref (gpointer instance) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* self; + self = instance; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 6342 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_locale_lookup_unref (gpointer instance) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* self; + self = instance; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_LOCALE_LOOKUP_GET_CLASS (self)->finalize (self); +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 6355 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_web_authentication_pane_class_init (PublishingFacebookWebAuthenticationPaneClass * klass) { +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_parent_class = g_type_class_peek_parent (klass); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookWebAuthenticationPanePrivate)); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_facebook_web_authentication_pane_finalize; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("login_succeeded", PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("login_failed", PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 6371 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_facebook_web_authentication_pane_real_get_widget; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_facebook_web_authentication_pane_real_get_preferred_geometry; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_facebook_web_authentication_pane_real_on_pane_installed; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_facebook_web_authentication_pane_real_on_pane_uninstalled; +#line 6386 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_instance_init (PublishingFacebookWebAuthenticationPane * self) { + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp0_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp1_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp2_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp3_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp4_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp5_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp6_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp7_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp8_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp9_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp10_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp11_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp12_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp13_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp14_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp15_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp16_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp17_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp18_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp19_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp20_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp21_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp22_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp23_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp24_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp25_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp26_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp27_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp28_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp29_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp30_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp31_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp32_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp33_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp34_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp35_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp36_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp37_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp38_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp39_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp40_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp41_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp42_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp43_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup* _tmp44_ = NULL; + PublishingFacebookWebAuthenticationPaneLocaleLookup** _tmp45_ = NULL; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self); +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->webview = NULL; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->pane_widget = NULL; +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->webview_frame = NULL; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("es", "es-la", "ES", "es-es", NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("en", "en-gb", "US", "en-us", NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("fr", "fr-fr", "CA", "fr-ca", NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("pt", "pt-br", "PT", "pt-pt", NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("zh", "zh-cn", "HK", "zh-hk", "TW", "zh-tw"); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("af", "af-za", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ar", "ar-ar", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("nb", "nb-no", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("no", "nb-no", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("id", "id-id", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ms", "ms-my", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ca", "ca-es", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("cs", "cs-cz", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("cy", "cy-gb", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("da", "da-dk", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("de", "de-de", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("tl", "tl-ph", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ko", "ko-kr", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("hr", "hr-hr", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("it", "it-it", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("lt", "lt-lt", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("hu", "hu-hu", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("nl", "nl-nl", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ja", "ja-jp", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("nb", "nb-no", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("no", "nb-no", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("pl", "pl-pl", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ro", "ro-ro", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ru", "ru-ru", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("sk", "sk-sk", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("sl", "sl-si", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("sv", "sv-se", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("th", "th-th", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("vi", "vi-vn", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("tr", "tr-tr", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("el", "el-gr", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("bg", "bg-bg", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp37_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("sr", "sr-rs", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp38_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("he", "he-il", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp39_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("hi", "hi-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp40_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("bn", "bn-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp41_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("pa", "pa-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp42_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ta", "ta-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp43_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("te", "te-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp44_ = publishing_facebook_web_authentication_pane_locale_lookup_new ("ml", "ml-in", NULL, NULL, NULL, NULL); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_ = g_new0 (PublishingFacebookWebAuthenticationPaneLocaleLookup*, 45 + 1); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[0] = _tmp0_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[1] = _tmp1_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[2] = _tmp2_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[3] = _tmp3_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[4] = _tmp4_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[5] = _tmp5_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[6] = _tmp6_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[7] = _tmp7_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[8] = _tmp8_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[9] = _tmp9_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[10] = _tmp10_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[11] = _tmp11_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[12] = _tmp12_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[13] = _tmp13_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[14] = _tmp14_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[15] = _tmp15_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[16] = _tmp16_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[17] = _tmp17_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[18] = _tmp18_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[19] = _tmp19_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[20] = _tmp20_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[21] = _tmp21_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[22] = _tmp22_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[23] = _tmp23_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[24] = _tmp24_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[25] = _tmp25_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[26] = _tmp26_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[27] = _tmp27_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[28] = _tmp28_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[29] = _tmp29_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[30] = _tmp30_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[31] = _tmp31_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[32] = _tmp32_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[33] = _tmp33_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[34] = _tmp34_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[35] = _tmp35_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[36] = _tmp36_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[37] = _tmp37_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[38] = _tmp38_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[39] = _tmp39_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[40] = _tmp40_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[41] = _tmp41_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[42] = _tmp42_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[43] = _tmp43_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_[44] = _tmp44_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->locale_lookup_table = _tmp45_; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->locale_lookup_table_length1 = 45; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_locale_lookup_table_size_ = self->priv->locale_lookup_table_length1; +#line 6633 "FacebookPublishing.c" +} + + +static void publishing_facebook_web_authentication_pane_finalize (GObject* obj) { + PublishingFacebookWebAuthenticationPane * self; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_WEB_AUTHENTICATION_PANE, PublishingFacebookWebAuthenticationPane); +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->webview); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->webview_frame); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->locale_lookup_table = (_vala_array_free (self->priv->locale_lookup_table, self->priv->locale_lookup_table_length1, (GDestroyNotify) publishing_facebook_web_authentication_pane_locale_lookup_unref), NULL); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (publishing_facebook_web_authentication_pane_parent_class)->finalize (obj); +#line 6651 "FacebookPublishing.c" +} + + +GType publishing_facebook_web_authentication_pane_get_type (void) { + static volatile gsize publishing_facebook_web_authentication_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_web_authentication_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookWebAuthenticationPane), 0, (GInstanceInitFunc) publishing_facebook_web_authentication_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_facebook_web_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_facebook_web_authentication_pane_type_id; + publishing_facebook_web_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFacebookWebAuthenticationPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_facebook_web_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_facebook_web_authentication_pane_type_id__volatile, publishing_facebook_web_authentication_pane_type_id); + } + return publishing_facebook_web_authentication_pane_type_id__volatile; +} + + +static PublishingFacebookAlbum** _vala_array_dup2 (PublishingFacebookAlbum** self, int length) { + PublishingFacebookAlbum** result; + int i; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = g_new0 (PublishingFacebookAlbum*, length + 1); +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (i = 0; i < length; i++) { +#line 6676 "FacebookPublishing.c" + PublishingFacebookAlbum* _tmp0_ = NULL; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _publishing_facebook_album_ref0 (self[i]); +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result[i] = _tmp0_; +#line 6682 "FacebookPublishing.c" + } +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 6686 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_on_create_new_toggled_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_on_create_new_toggled ((PublishingFacebookPublishingOptionsPane*) self); +#line 6693 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_on_use_existing_toggled_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_on_use_existing_toggled ((PublishingFacebookPublishingOptionsPane*) self); +#line 6700 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_on_publish_button_clicked ((PublishingFacebookPublishingOptionsPane*) self); +#line 6707 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1096 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_on_logout_button_clicked ((PublishingFacebookPublishingOptionsPane*) self); +#line 6714 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_on_size_changed ((PublishingFacebookPublishingOptionsPane*) self); +#line 6721 "FacebookPublishing.c" +} + + +PublishingFacebookPublishingOptionsPane* publishing_facebook_publishing_options_pane_construct (GType object_type, const gchar* username, PublishingFacebookAlbum** albums, int albums_length1, SpitPublishingPublisherMediaType media_type, PublishingFacebookFacebookPublisher* publisher, GtkBuilder* builder, gboolean strip_metadata) { + PublishingFacebookPublishingOptionsPane * self = NULL; + GtkBuilder* _tmp0_ = NULL; + GtkBuilder* _tmp1_ = NULL; + GtkBuilder* _tmp2_ = NULL; + GtkBuilder* _tmp3_ = NULL; + GSList* _tmp4_ = NULL; + GSList* _tmp5_ = NULL; + guint _tmp6_ = 0U; + PublishingFacebookAlbum** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + PublishingFacebookAlbum** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + gint _tmp9_ = 0; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp10_ = NULL; + gint _tmp11_ = 0; + PublishingFacebookResolution* _tmp12_ = NULL; + PublishingFacebookFacebookPublisher* _tmp13_ = NULL; + PublishingFacebookFacebookPublisher* _tmp14_ = NULL; + SpitPublishingPublisherMediaType _tmp15_ = 0; + GtkBuilder* _tmp16_ = NULL; + GObject* _tmp17_ = NULL; + GtkBox* _tmp18_ = NULL; + GtkBox* _tmp19_ = NULL; + GtkBuilder* _tmp20_ = NULL; + GObject* _tmp21_ = NULL; + GtkRadioButton* _tmp22_ = NULL; + GtkBuilder* _tmp23_ = NULL; + GObject* _tmp24_ = NULL; + GtkRadioButton* _tmp25_ = NULL; + GtkBuilder* _tmp26_ = NULL; + GObject* _tmp27_ = NULL; + GtkComboBoxText* _tmp28_ = NULL; + GtkBuilder* _tmp29_ = NULL; + GObject* _tmp30_ = NULL; + GtkComboBoxText* _tmp31_ = NULL; + GtkBuilder* _tmp32_ = NULL; + GObject* _tmp33_ = NULL; + GtkButton* _tmp34_ = NULL; + GtkBuilder* _tmp35_ = NULL; + GObject* _tmp36_ = NULL; + GtkButton* _tmp37_ = NULL; + GtkBuilder* _tmp38_ = NULL; + GObject* _tmp39_ = NULL; + GtkEntry* _tmp40_ = NULL; + GtkBuilder* _tmp41_ = NULL; + GObject* _tmp42_ = NULL; + GtkComboBoxText* _tmp43_ = NULL; + GtkBuilder* _tmp44_ = NULL; + GObject* _tmp45_ = NULL; + GtkLabel* _tmp46_ = NULL; + GtkBuilder* _tmp47_ = NULL; + GObject* _tmp48_ = NULL; + GtkCheckButton* _tmp49_ = NULL; + GtkRadioButton* _tmp50_ = NULL; + GtkRadioButton* _tmp51_ = NULL; + gchar* label_text = NULL; + const gchar* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + SpitPublishingPublisherMediaType _tmp54_ = 0; + GtkLabel* _tmp57_ = NULL; + const gchar* _tmp58_ = NULL; + GtkCheckButton* _tmp59_ = NULL; + gboolean _tmp60_ = FALSE; + GtkComboBoxText* _tmp61_ = NULL; + GtkButton* _tmp62_ = NULL; + GtkButton* _tmp63_ = NULL; + GtkComboBoxText* _tmp64_ = NULL; + PublishingFacebookFacebookPublisher* _tmp65_ = NULL; + gint _tmp66_ = 0; + GtkComboBoxText* _tmp67_ = NULL; + gboolean _tmp68_ = FALSE; + gboolean _tmp69_ = FALSE; + GtkRadioButton* _tmp70_ = NULL; + GtkComboBoxText* _tmp75_ = NULL; + SpitPublishingPublisherMediaType _tmp76_ = 0; +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (username != NULL, NULL); +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_FACEBOOK_PUBLISHER (publisher), NULL); +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookPublishingOptionsPane*) g_object_new (object_type, NULL); +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = builder; +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->builder = _tmp1_; +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = builder; +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp2_ != NULL, "builder != null"); +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = builder; +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = gtk_builder_get_objects (_tmp3_); +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = g_slist_length (_tmp5_); +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0"); +#line 1058 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_slist_free0 (_tmp5_); +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = albums; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7__length1 = albums_length1; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup2 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_); +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8__length1 = _tmp7__length1; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums = (_vala_array_free (self->priv->albums, self->priv->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums = _tmp8_; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums_length1 = _tmp8__length1; +#line 1060 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_albums_size_ = self->priv->albums_length1; +#line 1061 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = publishing_facebook_publishing_options_pane_create_privacy_descriptions (self, &_tmp9_); +#line 1061 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->privacy_descriptions = (_vala_array_free (self->priv->privacy_descriptions, self->priv->privacy_descriptions_length1, (GDestroyNotify) publishing_facebook_publishing_options_pane_privacy_description_unref), NULL); +#line 1061 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->privacy_descriptions = _tmp10_; +#line 1061 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->privacy_descriptions_length1 = _tmp9_; +#line 1061 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_privacy_descriptions_size_ = self->priv->privacy_descriptions_length1; +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = publishing_facebook_publishing_options_pane_create_resolution_list (self, &_tmp11_); +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->possible_resolutions = (g_free (self->priv->possible_resolutions), NULL); +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->possible_resolutions = _tmp12_; +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->possible_resolutions_length1 = _tmp11_; +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_possible_resolutions_size_ = self->priv->possible_resolutions_length1; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = publisher; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = _g_object_ref0 (_tmp13_); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publisher = _tmp14_; +#line 1067 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = media_type; +#line 1067 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->media_type = _tmp15_; +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = builder; +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = gtk_builder_get_object (_tmp16_, "facebook_pane_box"); +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_box_get_type (), GtkBox)); +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->pane_widget = _tmp18_; +#line 1070 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = self->priv->pane_widget; +#line 1070 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_container_get_type (), GtkContainer), (guint) 16); +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->builder; +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = gtk_builder_get_object (_tmp20_, "use_existing_radio"); +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_radio_button_get_type (), GtkRadioButton)); +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->use_existing_radio = _tmp22_; +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = self->priv->builder; +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = gtk_builder_get_object (_tmp23_, "create_new_radio"); +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_radio_button_get_type (), GtkRadioButton)); +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->create_new_radio = _tmp25_; +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = self->priv->builder; +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = gtk_builder_get_object (_tmp26_, "existing_albums_combo"); +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->existing_albums_combo); +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->existing_albums_combo = _tmp28_; +#line 1075 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = self->priv->builder; +#line 1075 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = gtk_builder_get_object (_tmp29_, "visibility_combo"); +#line 1075 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 1075 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->visibility_combo); +#line 1075 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->visibility_combo = _tmp31_; +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = self->priv->builder; +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = gtk_builder_get_object (_tmp32_, "publish_button"); +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_button_get_type (), GtkButton)); +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publish_button = _tmp34_; +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = self->priv->builder; +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = gtk_builder_get_object (_tmp35_, "logout_button"); +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp37_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_button_get_type (), GtkButton)); +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->logout_button = _tmp37_; +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp38_ = self->priv->builder; +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp39_ = gtk_builder_get_object (_tmp38_, "new_album_entry"); +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_entry_get_type (), GtkEntry)); +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->new_album_entry); +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->new_album_entry = _tmp40_; +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp41_ = self->priv->builder; +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp42_ = gtk_builder_get_object (_tmp41_, "resolution_combo"); +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp43_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->resolution_combo); +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->resolution_combo = _tmp43_; +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp44_ = self->priv->builder; +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_ = gtk_builder_get_object (_tmp44_, "how_to_label"); +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp46_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_label_get_type (), GtkLabel)); +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->how_to_label); +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->how_to_label = _tmp46_; +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp47_ = self->priv->builder; +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp48_ = gtk_builder_get_object (_tmp47_, "strip_metadata_check"); +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp49_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, gtk_check_button_get_type (), GtkCheckButton)); +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->strip_metadata_check = _tmp49_; +#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp50_ = self->priv->create_new_radio; +#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_facebook_publishing_options_pane_on_create_new_toggled_gtk_button_clicked, self, 0); +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp51_ = self->priv->use_existing_radio; +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_facebook_publishing_options_pane_on_use_existing_toggled_gtk_button_clicked, self, 0); +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp52_ = username; +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp53_ = g_strdup_printf (PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_HEADER_LABEL_TEXT, _tmp52_); +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + label_text = _tmp53_; +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp54_ = media_type; +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((_tmp54_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0) { +#line 7013 "FacebookPublishing.c" + const gchar* _tmp55_ = NULL; + gchar* _tmp56_ = NULL; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp55_ = label_text; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp56_ = g_strconcat (_tmp55_, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PHOTOS_LABEL_TEXT, NULL); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (label_text); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + label_text = _tmp56_; +#line 7024 "FacebookPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp57_ = self->priv->how_to_label; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp58_ = label_text; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_label_set_label (_tmp57_, _tmp58_); +#line 1090 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp59_ = self->priv->strip_metadata_check; +#line 1090 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp60_ = strip_metadata; +#line 1090 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp60_); +#line 1092 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_setup_visibility_combo (self); +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp61_ = self->priv->visibility_combo; +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp62_ = self->priv->publish_button; +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp62_, "clicked", (GCallback) _publishing_facebook_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked, self, 0); +#line 1096 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp63_ = self->priv->logout_button; +#line 1096 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (_tmp63_, "clicked", (GCallback) _publishing_facebook_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked, self, 0); +#line 1098 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_setup_resolution_combo (self); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp64_ = self->priv->resolution_combo; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp65_ = publisher; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp66_ = publishing_facebook_facebook_publisher_get_persistent_default_size (_tmp65_); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_combo_box_get_type (), GtkComboBox), _tmp66_); +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp67_ = self->priv->resolution_combo; +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_facebook_publishing_options_pane_on_size_changed_gtk_combo_box_changed, self, 0); +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp70_ = self->priv->create_new_radio; +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp70_ != NULL) { +#line 7070 "FacebookPublishing.c" + GtkRadioButton* _tmp71_ = NULL; + gboolean _tmp72_ = FALSE; + gboolean _tmp73_ = FALSE; +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp71_ = self->priv->create_new_radio; +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp72_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp73_ = _tmp72_; +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp69_ = _tmp73_; +#line 7082 "FacebookPublishing.c" + } else { +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp69_ = FALSE; +#line 7086 "FacebookPublishing.c" + } +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp69_) { +#line 1106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp68_ = TRUE; +#line 7092 "FacebookPublishing.c" + } else { + SpitPublishingPublisherMediaType _tmp74_ = 0; +#line 1107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp74_ = media_type; +#line 1107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp68_ = (_tmp74_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) != 0; +#line 7099 "FacebookPublishing.c" + } +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp75_ = self->priv->visibility_combo; +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_widget_get_type (), GtkWidget), _tmp68_); +#line 1110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp76_ = media_type; +#line 1110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp76_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 7109 "FacebookPublishing.c" + GtkCheckButton* _tmp77_ = NULL; + GtkCheckButton* _tmp78_ = NULL; + GtkComboBoxText* _tmp79_ = NULL; + GtkRadioButton* _tmp80_ = NULL; + GtkRadioButton* _tmp81_ = NULL; + GtkComboBoxText* _tmp82_ = NULL; + GtkEntry* _tmp83_ = NULL; +#line 1111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp77_ = self->priv->strip_metadata_check; +#line 1111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_toggle_button_get_type (), GtkToggleButton), FALSE); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp78_ = self->priv->strip_metadata_check; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp79_ = self->priv->resolution_combo; +#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp80_ = self->priv->use_existing_radio; +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp81_ = self->priv->create_new_radio; +#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp82_ = self->priv->existing_albums_combo; +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp83_ = self->priv->new_album_entry; +#line 1117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp83_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 7145 "FacebookPublishing.c" + } +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (label_text); +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 7151 "FacebookPublishing.c" +} + + +PublishingFacebookPublishingOptionsPane* publishing_facebook_publishing_options_pane_new (const gchar* username, PublishingFacebookAlbum** albums, int albums_length1, SpitPublishingPublisherMediaType media_type, PublishingFacebookFacebookPublisher* publisher, GtkBuilder* builder, gboolean strip_metadata) { +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_publishing_options_pane_construct (PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, username, albums, albums_length1, media_type, publisher, builder, strip_metadata); +#line 7158 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_publishing_options_pane_publishing_photos (PublishingFacebookPublishingOptionsPane* self) { + gboolean result = FALSE; + SpitPublishingPublisherMediaType _tmp0_ = 0; +#line 1121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self), FALSE); +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->media_type; +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = (_tmp0_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0; +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 7173 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_publishing_options_pane_privacy_description_ref0 (gpointer self) { +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_publishing_options_pane_privacy_description_ref (self) : NULL; +#line 7180 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_setup_visibility_combo (PublishingFacebookPublishingOptionsPane* self) { + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 1125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->privacy_descriptions; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->priv->privacy_descriptions_length1; +#line 7193 "FacebookPublishing.c" + { + PublishingFacebookPublishingOptionsPanePrivacyDescription** p_collection = NULL; + gint p_collection_length1 = 0; + gint _p_collection_size_ = 0; + gint p_it = 0; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + p_collection = _tmp0_; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + p_collection_length1 = _tmp0__length1; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (p_it = 0; p_it < _tmp0__length1; p_it = p_it + 1) { +#line 7205 "FacebookPublishing.c" + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp1_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription* p = NULL; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _publishing_facebook_publishing_options_pane_privacy_description_ref0 (p_collection[p_it]); +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + p = _tmp1_; +#line 7212 "FacebookPublishing.c" + { + GtkComboBoxText* _tmp2_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->visibility_combo; +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = p; +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _tmp3_->description; +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_text_append_text (_tmp2_, _tmp4_); +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_options_pane_privacy_description_unref0 (p); +#line 7227 "FacebookPublishing.c" + } + } + } +} + + +static void publishing_facebook_publishing_options_pane_setup_resolution_combo (PublishingFacebookPublishingOptionsPane* self) { + PublishingFacebookResolution* _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->possible_resolutions; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->priv->possible_resolutions_length1; +#line 7243 "FacebookPublishing.c" + { + PublishingFacebookResolution* res_collection = NULL; + gint res_collection_length1 = 0; + gint _res_collection_size_ = 0; + gint res_it = 0; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + res_collection = _tmp0_; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + res_collection_length1 = _tmp0__length1; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (res_it = 0; res_it < _tmp0__length1; res_it = res_it + 1) { +#line 7255 "FacebookPublishing.c" + PublishingFacebookResolution res = 0; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + res = res_collection[res_it]; +#line 7259 "FacebookPublishing.c" + { + GtkComboBoxText* _tmp1_ = NULL; + PublishingFacebookResolution _tmp2_ = 0; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->resolution_combo; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = res; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_resolution_get_name (_tmp2_); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _tmp3_; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_text_append_text (_tmp1_, _tmp4_); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp4_); +#line 7277 "FacebookPublishing.c" + } + } + } +} + + +static void publishing_facebook_publishing_options_pane_on_use_existing_toggled (PublishingFacebookPublishingOptionsPane* self) { + GtkRadioButton* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->use_existing_radio; +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_; +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_) { +#line 7298 "FacebookPublishing.c" + GtkComboBoxText* _tmp3_ = NULL; + GtkEntry* _tmp4_ = NULL; + GtkComboBoxText* _tmp5_ = NULL; + SpitPublishingPublisherMediaType _tmp6_ = 0; + GtkComboBoxText* _tmp7_ = NULL; +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->existing_albums_combo; +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->new_album_entry; +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->visibility_combo; +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->media_type; +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), (_tmp6_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) != 0); +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->existing_albums_combo; +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)); +#line 7322 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_on_create_new_toggled (PublishingFacebookPublishingOptionsPane* self) { + GtkRadioButton* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->create_new_radio; +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_; +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_) { +#line 7341 "FacebookPublishing.c" + GtkComboBoxText* _tmp3_ = NULL; + GtkEntry* _tmp4_ = NULL; + GtkEntry* _tmp5_ = NULL; + GtkComboBoxText* _tmp6_ = NULL; +#line 1151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->existing_albums_combo; +#line 1151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->new_album_entry; +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->new_album_entry; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget)); +#line 1157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->visibility_combo; +#line 1157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 7362 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_on_size_changed (PublishingFacebookPublishingOptionsPane* self) { + PublishingFacebookFacebookPublisher* _tmp0_ = NULL; + GtkComboBoxText* _tmp1_ = NULL; + gint _tmp2_ = 0; +#line 1161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publisher; +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->resolution_combo; +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_facebook_publisher_set_persistent_default_size (_tmp0_, _tmp2_); +#line 7381 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_on_logout_button_clicked (PublishingFacebookPublishingOptionsPane* self) { +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 7390 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_on_publish_button_clicked (PublishingFacebookPublishingOptionsPane* self) { + gchar* album_name = NULL; + gchar* privacy_setting = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + GtkComboBoxText* _tmp1_ = NULL; + gint _tmp2_ = 0; + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + PublishingFacebookResolution resolution_setting = 0; + gboolean _tmp6_ = FALSE; + const gchar* _tmp19_ = NULL; + const gchar* _tmp20_ = NULL; + PublishingFacebookResolution _tmp21_ = 0; + GtkCheckButton* _tmp22_ = NULL; + gboolean _tmp23_ = FALSE; +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->privacy_descriptions; +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->priv->privacy_descriptions_length1; +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->visibility_combo; +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp0_[_tmp2_]; +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _tmp3_->privacy_setting; +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 1171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + privacy_setting = _tmp5_; +#line 1175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_publishing_options_pane_publishing_photos (self); +#line 1175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp6_) { +#line 7433 "FacebookPublishing.c" + PublishingFacebookResolution* _tmp7_ = NULL; + gint _tmp7__length1 = 0; + GtkComboBoxText* _tmp8_ = NULL; + gint _tmp9_ = 0; + PublishingFacebookResolution _tmp10_ = 0; + GtkRadioButton* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + gboolean _tmp13_ = FALSE; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->possible_resolutions; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7__length1 = self->priv->possible_resolutions_length1; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->resolution_combo; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp7_[_tmp9_]; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + resolution_setting = _tmp10_; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->use_existing_radio; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _tmp12_; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp13_) { +#line 7462 "FacebookPublishing.c" + GtkComboBoxText* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; +#line 1178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = self->priv->existing_albums_combo; +#line 1178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = gtk_combo_box_text_get_active_text (_tmp14_); +#line 1178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_name); +#line 1178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_name = _tmp15_; +#line 7473 "FacebookPublishing.c" + } else { + GtkEntry* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = self->priv->new_album_entry; +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = gtk_entry_get_text (_tmp16_); +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = g_strdup (_tmp17_); +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_name); +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_name = _tmp18_; +#line 7488 "FacebookPublishing.c" + } + } else { +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + resolution_setting = PUBLISHING_FACEBOOK_RESOLUTION_STANDARD; +#line 1184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_name); +#line 1184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_name = NULL; +#line 7497 "FacebookPublishing.c" + } +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = album_name; +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = privacy_setting; +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = resolution_setting; +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = self->priv->strip_metadata_check; +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "publish", _tmp19_, _tmp20_, _tmp21_, _tmp23_); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (privacy_setting); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (album_name); +#line 7515 "FacebookPublishing.c" +} + + +static void _vala_array_add7 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookPublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 7526 "FacebookPublishing.c" + } +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[*length] = NULL; +#line 7532 "FacebookPublishing.c" +} + + +static void _vala_array_add8 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookPublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 7543 "FacebookPublishing.c" + } +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[*length] = NULL; +#line 7549 "FacebookPublishing.c" +} + + +static void _vala_array_add9 (PublishingFacebookPublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingFacebookPublishingOptionsPanePrivacyDescription* value) { +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookPublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 7560 "FacebookPublishing.c" + } +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[*length] = NULL; +#line 7566 "FacebookPublishing.c" +} + + +static PublishingFacebookPublishingOptionsPanePrivacyDescription** publishing_facebook_publishing_options_pane_create_privacy_descriptions (PublishingFacebookPublishingOptionsPane* self, int* result_length1) { + PublishingFacebookPublishingOptionsPanePrivacyDescription** result = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _result_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp3_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp6_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription* _tmp9_ = NULL; + PublishingFacebookPublishingOptionsPanePrivacyDescription** _tmp10_ = NULL; + gint _tmp10__length1 = 0; +#line 1190 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_new0 (PublishingFacebookPublishingOptionsPanePrivacyDescription*, 0 + 1); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _result_ = _tmp0_; +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _result__length1 = 0; +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __result__size_ = _result__length1; +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _result_; +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _ ("Just me"); +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_publishing_options_pane_privacy_description_new (_tmp2_, "{ 'value' : 'SELF' }"); +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add7 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _result_; +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4__length1 = _result__length1; +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _ ("Friends"); +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_facebook_publishing_options_pane_privacy_description_new (_tmp5_, "{ 'value' : 'ALL_FRIENDS' }"); +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add8 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _result_; +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7__length1 = _result__length1; +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _ ("Everyone"); +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = publishing_facebook_publishing_options_pane_privacy_description_new (_tmp8_, "{ 'value' : 'EVERYONE' }"); +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add9 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _result_; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10__length1 = _result__length1; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (result_length1) { +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *result_length1 = _tmp10__length1; +#line 7638 "FacebookPublishing.c" + } +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp10_; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 7644 "FacebookPublishing.c" +} + + +static void _vala_array_add10 (PublishingFacebookResolution** array, int* length, int* size, PublishingFacebookResolution value) { +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookResolution, *array, *size); +#line 7655 "FacebookPublishing.c" + } +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 7659 "FacebookPublishing.c" +} + + +static void _vala_array_add11 (PublishingFacebookResolution** array, int* length, int* size, PublishingFacebookResolution value) { +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if ((*length) == (*size)) { +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *array = g_renew (PublishingFacebookResolution, *array, *size); +#line 7670 "FacebookPublishing.c" + } +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + (*array)[(*length)++] = value; +#line 7674 "FacebookPublishing.c" +} + + +static PublishingFacebookResolution* publishing_facebook_publishing_options_pane_create_resolution_list (PublishingFacebookPublishingOptionsPane* self, int* result_length1) { + PublishingFacebookResolution* result = NULL; + PublishingFacebookResolution* _result_ = NULL; + PublishingFacebookResolution* _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingFacebookResolution* _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingFacebookResolution* _tmp2_ = NULL; + gint _tmp2__length1 = 0; + PublishingFacebookResolution* _tmp3_ = NULL; + gint _tmp3__length1 = 0; +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_new0 (PublishingFacebookResolution, 0); +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _result_ = _tmp0_; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _result__length1 = 0; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __result__size_ = _result__length1; +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _result_; +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add10 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_STANDARD); +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _result_; +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2__length1 = _result__length1; +#line 1204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_array_add11 (&_result_, &_result__length1, &__result__size_, PUBLISHING_FACEBOOK_RESOLUTION_HIGH); +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _result_; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3__length1 = _result__length1; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (result_length1) { +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *result_length1 = _tmp3__length1; +#line 7720 "FacebookPublishing.c" + } +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp3_; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 7726 "FacebookPublishing.c" +} + + +void publishing_facebook_publishing_options_pane_installed (PublishingFacebookPublishingOptionsPane* self) { + gboolean _tmp0_ = FALSE; + GtkButton* _tmp24_ = NULL; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_publishing_options_pane_publishing_photos (self); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_) { +#line 7739 "FacebookPublishing.c" + PublishingFacebookAlbum** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->albums; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = self->priv->albums_length1; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1__length1 == 0) { +#line 7748 "FacebookPublishing.c" + GtkRadioButton* _tmp2_ = NULL; + GtkEntry* _tmp3_ = NULL; + GtkComboBoxText* _tmp4_ = NULL; + GtkRadioButton* _tmp5_ = NULL; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->create_new_radio; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->new_album_entry; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_entry_set_text (_tmp3_, PUBLISHING_FACEBOOK_DEFAULT_ALBUM_NAME); +#line 1214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->priv->existing_albums_combo; +#line 1214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = self->priv->use_existing_radio; +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 7769 "FacebookPublishing.c" + } else { + gint default_album_seq_num = 0; + gint ticker = 0; + PublishingFacebookAlbum** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + gint _tmp15_ = 0; +#line 1217 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + default_album_seq_num = -1; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ticker = 0; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->albums; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6__length1 = self->priv->albums_length1; +#line 7784 "FacebookPublishing.c" + { + PublishingFacebookAlbum** album_collection = NULL; + gint album_collection_length1 = 0; + gint _album_collection_size_ = 0; + gint album_it = 0; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_collection = _tmp6_; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album_collection_length1 = _tmp6__length1; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (album_it = 0; album_it < _tmp6__length1; album_it = album_it + 1) { +#line 7796 "FacebookPublishing.c" + PublishingFacebookAlbum* _tmp7_ = NULL; + PublishingFacebookAlbum* album = NULL; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _publishing_facebook_album_ref0 (album_collection[album_it]); +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + album = _tmp7_; +#line 7803 "FacebookPublishing.c" + { + GtkComboBoxText* _tmp8_ = NULL; + PublishingFacebookAlbum* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + PublishingFacebookAlbum* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gint _tmp14_ = 0; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->existing_albums_combo; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = album; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_->name; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_text_append_text (_tmp8_, _tmp10_); +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = album; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = _tmp11_->name; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_strcmp0 (_tmp12_, PUBLISHING_FACEBOOK_DEFAULT_ALBUM_NAME) == 0) { +#line 7825 "FacebookPublishing.c" + gint _tmp13_ = 0; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = ticker; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + default_album_seq_num = _tmp13_; +#line 7831 "FacebookPublishing.c" + } +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = ticker; +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ticker = _tmp14_ + 1; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_album_unref0 (album); +#line 7839 "FacebookPublishing.c" + } + } + } +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = default_album_seq_num; +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp15_ != -1) { +#line 7847 "FacebookPublishing.c" + GtkComboBoxText* _tmp16_ = NULL; + gint _tmp17_ = 0; + GtkRadioButton* _tmp18_ = NULL; + GtkEntry* _tmp19_ = NULL; +#line 1226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = self->priv->existing_albums_combo; +#line 1226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = default_album_seq_num; +#line 1226 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_combo_box_get_type (), GtkComboBox), _tmp17_); +#line 1227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = self->priv->use_existing_radio; +#line 1227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = self->priv->new_album_entry; +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 7866 "FacebookPublishing.c" + } else { + GtkRadioButton* _tmp20_ = NULL; + GtkComboBoxText* _tmp21_ = NULL; + GtkComboBoxText* _tmp22_ = NULL; + GtkEntry* _tmp23_ = NULL; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->create_new_radio; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = self->priv->existing_albums_combo; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = self->priv->existing_albums_combo; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = self->priv->new_album_entry; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_entry_set_text (_tmp23_, PUBLISHING_FACEBOOK_DEFAULT_ALBUM_NAME); +#line 7888 "FacebookPublishing.c" + } + } + } +#line 1239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = self->priv->publish_button; +#line 1239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget)); +#line 7896 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_notify_logout (PublishingFacebookPublishingOptionsPane* self) { +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 7905 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_notify_publish (PublishingFacebookPublishingOptionsPane* self, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution) { + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingFacebookResolution _tmp2_ = 0; + GtkCheckButton* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (privacy_setting != NULL); +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = target_album; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = privacy_setting; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = target_resolution; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->strip_metadata_check; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "publish", _tmp0_, _tmp1_, _tmp2_, _tmp4_); +#line 7931 "FacebookPublishing.c" +} + + +static GtkWidget* publishing_facebook_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingFacebookPublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane); +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 7950 "FacebookPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_facebook_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingFacebookPublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 1254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane); +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 7963 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_notify_logout_publishing_facebook_publishing_options_pane_logout (PublishingFacebookPublishingOptionsPane* _sender, gpointer self) { +#line 1259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_notify_logout ((PublishingFacebookPublishingOptionsPane*) self); +#line 7970 "FacebookPublishing.c" +} + + +static void _publishing_facebook_publishing_options_pane_notify_publish_publishing_facebook_publishing_options_pane_publish (PublishingFacebookPublishingOptionsPane* _sender, const gchar* target_album, const gchar* privacy_setting, PublishingFacebookResolution target_resolution, gboolean strip_metadata, gpointer self) { +#line 1260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_notify_publish ((PublishingFacebookPublishingOptionsPane*) self, target_album, privacy_setting, target_resolution); +#line 7977 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingFacebookPublishingOptionsPane * self; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane); +#line 1259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (self, "logout", (GCallback) _publishing_facebook_publishing_options_pane_notify_logout_publishing_facebook_publishing_options_pane_logout, self, 0); +#line 1260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect_object (self, "publish", (GCallback) _publishing_facebook_publishing_options_pane_notify_publish_publishing_facebook_publishing_options_pane_publish, self, 0); +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_installed (self); +#line 7991 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingFacebookPublishingOptionsPane * self; + guint _tmp0_ = 0U; + guint _tmp1_ = 0U; +#line 1265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane); +#line 1266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp0_, NULL, FALSE); +#line 1266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _publishing_facebook_publishing_options_pane_notify_logout_publishing_facebook_publishing_options_pane_logout, self); +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_publishing_options_pane_notify_publish_publishing_facebook_publishing_options_pane_publish, self); +#line 8009 "FacebookPublishing.c" +} + + +static void g_cclosure_user_marshal_VOID__STRING_STRING_ENUM_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__STRING_STRING_ENUM_BOOLEAN) (gpointer data1, const char* arg_1, const char* arg_2, gint arg_3, gboolean arg_4, gpointer data2); + register GMarshalFunc_VOID__STRING_STRING_ENUM_BOOLEAN callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (n_param_values == 5); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data1 = closure->data; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data2 = param_values->data[0].v_pointer; +#line 8028 "FacebookPublishing.c" + } else { +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data1 = param_values->data[0].v_pointer; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data2 = closure->data; +#line 8034 "FacebookPublishing.c" + } +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + callback = (GMarshalFunc_VOID__STRING_STRING_ENUM_BOOLEAN) (marshal_data ? marshal_data : cc->callback); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_enum (param_values + 3), g_value_get_boolean (param_values + 4), data2); +#line 8040 "FacebookPublishing.c" +} + + +static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, const gchar* privacy_setting) { + PublishingFacebookPublishingOptionsPanePrivacyDescription* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1046 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (description != NULL, NULL); +#line 1046 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (privacy_setting != NULL, NULL); +#line 1046 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookPublishingOptionsPanePrivacyDescription*) g_type_create_instance (object_type); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = description; +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->description); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->description = _tmp1_; +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = privacy_setting; +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->privacy_setting); +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->privacy_setting = _tmp3_; +#line 1046 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 8074 "FacebookPublishing.c" +} + + +static PublishingFacebookPublishingOptionsPanePrivacyDescription* publishing_facebook_publishing_options_pane_privacy_description_new (const gchar* description, const gchar* privacy_setting) { +#line 1046 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_publishing_options_pane_privacy_description_construct (PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, description, privacy_setting); +#line 8081 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_value_privacy_description_init (GValue* value) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8088 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_value_privacy_description_free_value (GValue* value) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_privacy_description_unref (value->data[0].v_pointer); +#line 8097 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_value_privacy_description_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_publishing_options_pane_privacy_description_ref (src_value->data[0].v_pointer); +#line 8107 "FacebookPublishing.c" + } else { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 8111 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_publishing_options_pane_value_privacy_description_peek_pointer (const GValue* value) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 8119 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_publishing_options_pane_value_privacy_description_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 8126 "FacebookPublishing.c" + PublishingFacebookPublishingOptionsPanePrivacyDescription* object; + object = collect_values[0].v_pointer; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 8133 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 8137 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_publishing_options_pane_privacy_description_ref (object); +#line 8141 "FacebookPublishing.c" + } else { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8145 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8149 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_publishing_options_pane_value_privacy_description_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookPublishingOptionsPanePrivacyDescription** object_p; + object_p = collect_values[0].v_pointer; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 8160 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 8166 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 8170 "FacebookPublishing.c" + } else { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_publishing_options_pane_privacy_description_ref (value->data[0].v_pointer); +#line 8174 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8178 "FacebookPublishing.c" +} + + +static GParamSpec* publishing_facebook_publishing_options_pane_param_spec_privacy_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookPublishingOptionsPaneParamSpecPrivacyDescription* spec; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION), NULL); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 8192 "FacebookPublishing.c" +} + + +static gpointer publishing_facebook_publishing_options_pane_value_get_privacy_description (const GValue* value) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION), NULL); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 8201 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_value_set_privacy_description (GValue* value, gpointer v_object) { + PublishingFacebookPublishingOptionsPanePrivacyDescription* old; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_privacy_description_ref (value->data[0].v_pointer); +#line 8221 "FacebookPublishing.c" + } else { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8225 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_privacy_description_unref (old); +#line 8231 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_value_take_privacy_description (GValue* value, gpointer v_object) { + PublishingFacebookPublishingOptionsPanePrivacyDescription* old; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 8250 "FacebookPublishing.c" + } else { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8254 "FacebookPublishing.c" + } +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_privacy_description_unref (old); +#line 8260 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_privacy_description_class_init (PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass * klass) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_privacy_description_parent_class = g_type_class_peek_parent (klass); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass *) klass)->finalize = publishing_facebook_publishing_options_pane_privacy_description_finalize; +#line 8270 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_privacy_description_instance_init (PublishingFacebookPublishingOptionsPanePrivacyDescription * self) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 8277 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_privacy_description_finalize (PublishingFacebookPublishingOptionsPanePrivacyDescription* obj) { + PublishingFacebookPublishingOptionsPanePrivacyDescription * self; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingFacebookPublishingOptionsPanePrivacyDescription); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->description); +#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->privacy_setting); +#line 8291 "FacebookPublishing.c" +} + + +static GType publishing_facebook_publishing_options_pane_privacy_description_get_type (void) { + static volatile gsize publishing_facebook_publishing_options_pane_privacy_description_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_publishing_options_pane_privacy_description_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_publishing_options_pane_value_privacy_description_init, publishing_facebook_publishing_options_pane_value_privacy_description_free_value, publishing_facebook_publishing_options_pane_value_privacy_description_copy_value, publishing_facebook_publishing_options_pane_value_privacy_description_peek_pointer, "p", publishing_facebook_publishing_options_pane_value_privacy_description_collect_value, "p", publishing_facebook_publishing_options_pane_value_privacy_description_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookPublishingOptionsPanePrivacyDescriptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_publishing_options_pane_privacy_description_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookPublishingOptionsPanePrivacyDescription), 0, (GInstanceInitFunc) publishing_facebook_publishing_options_pane_privacy_description_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_facebook_publishing_options_pane_privacy_description_type_id; + publishing_facebook_publishing_options_pane_privacy_description_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookPublishingOptionsPanePrivacyDescription", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_publishing_options_pane_privacy_description_type_id__volatile, publishing_facebook_publishing_options_pane_privacy_description_type_id); + } + return publishing_facebook_publishing_options_pane_privacy_description_type_id__volatile; +} + + +static gpointer publishing_facebook_publishing_options_pane_privacy_description_ref (gpointer instance) { + PublishingFacebookPublishingOptionsPanePrivacyDescription* self; + self = instance; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 8316 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_privacy_description_unref (gpointer instance) { + PublishingFacebookPublishingOptionsPanePrivacyDescription* self; + self = instance; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_GET_CLASS (self)->finalize (self); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 8329 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_publishing_options_pane_class_init (PublishingFacebookPublishingOptionsPaneClass * klass) { +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookPublishingOptionsPanePrivate)); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_facebook_publishing_options_pane_finalize; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("logout", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("publish", PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_ENUM_BOOLEAN, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, PUBLISHING_FACEBOOK_TYPE_RESOLUTION, G_TYPE_BOOLEAN); +#line 8345 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_facebook_publishing_options_pane_real_get_widget; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_facebook_publishing_options_pane_real_get_preferred_geometry; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_facebook_publishing_options_pane_real_on_pane_installed; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_facebook_publishing_options_pane_real_on_pane_uninstalled; +#line 8360 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_instance_init (PublishingFacebookPublishingOptionsPane * self) { +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->pane_widget = NULL; +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->use_existing_radio = NULL; +#line 1015 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->create_new_radio = NULL; +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->existing_albums_combo = NULL; +#line 1017 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->visibility_combo = NULL; +#line 1018 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->new_album_entry = NULL; +#line 1019 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->strip_metadata_check = NULL; +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publish_button = NULL; +#line 1021 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->logout_button = NULL; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->how_to_label = NULL; +#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums = NULL; +#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums_length1 = 0; +#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_albums_size_ = self->priv->albums_length1; +#line 1024 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publisher = NULL; +#line 1028 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->resolution_combo = NULL; +#line 8397 "FacebookPublishing.c" +} + + +static void publishing_facebook_publishing_options_pane_finalize (GObject* obj) { + PublishingFacebookPublishingOptionsPane * self; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFacebookPublishingOptionsPane); +#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 1015 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->existing_albums_combo); +#line 1017 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->visibility_combo); +#line 1018 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->new_album_entry); +#line 1019 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1021 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->how_to_label); +#line 1023 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->albums = (_vala_array_free (self->priv->albums, self->priv->albums_length1, (GDestroyNotify) publishing_facebook_album_unref), NULL); +#line 1024 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->privacy_descriptions = (_vala_array_free (self->priv->privacy_descriptions, self->priv->privacy_descriptions_length1, (GDestroyNotify) publishing_facebook_publishing_options_pane_privacy_description_unref), NULL); +#line 1027 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->possible_resolutions = (g_free (self->priv->possible_resolutions), NULL); +#line 1028 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->resolution_combo); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_OBJECT_CLASS (publishing_facebook_publishing_options_pane_parent_class)->finalize (obj); +#line 8439 "FacebookPublishing.c" +} + + +GType publishing_facebook_publishing_options_pane_get_type (void) { + static volatile gsize publishing_facebook_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_facebook_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_facebook_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_facebook_publishing_options_pane_type_id; + publishing_facebook_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFacebookPublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_facebook_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_facebook_publishing_options_pane_type_id__volatile, publishing_facebook_publishing_options_pane_type_id); + } + return publishing_facebook_publishing_options_pane_type_id__volatile; +} + + +gchar* publishing_facebook_endpoint_to_uri (PublishingFacebookEndpoint self) { + gchar* result = NULL; +#line 1277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + switch (self) { +#line 1277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT: +#line 8463 "FacebookPublishing.c" + { + gchar* _tmp0_ = NULL; +#line 1279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = g_strdup ("https://graph.facebook.com/"); +#line 1279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_; +#line 1279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 8472 "FacebookPublishing.c" + } +#line 1277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_ENDPOINT_VIDEO: +#line 8476 "FacebookPublishing.c" + { + gchar* _tmp1_ = NULL; +#line 1282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup ("https://graph-video.facebook.com/"); +#line 1282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 1282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 8485 "FacebookPublishing.c" + } +#line 1277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_ENDPOINT_TEST_CONNECTION: +#line 8489 "FacebookPublishing.c" + { + gchar* _tmp2_ = NULL; +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = g_strdup ("https://www.facebook.com/"); +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp2_; +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 8498 "FacebookPublishing.c" + } + default: + { +#line 1288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_assert_not_reached (); +#line 8504 "FacebookPublishing.c" + } + } +} + + +GType publishing_facebook_endpoint_get_type (void) { + static volatile gsize publishing_facebook_endpoint_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_endpoint_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT, "PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT", "default"}, {PUBLISHING_FACEBOOK_ENDPOINT_VIDEO, "PUBLISHING_FACEBOOK_ENDPOINT_VIDEO", "video"}, {PUBLISHING_FACEBOOK_ENDPOINT_TEST_CONNECTION, "PUBLISHING_FACEBOOK_ENDPOINT_TEST_CONNECTION", "test-connection"}, {0, NULL, NULL}}; + GType publishing_facebook_endpoint_type_id; + publishing_facebook_endpoint_type_id = g_enum_register_static ("PublishingFacebookEndpoint", values); + g_once_init_leave (&publishing_facebook_endpoint_type_id__volatile, publishing_facebook_endpoint_type_id); + } + return publishing_facebook_endpoint_type_id__volatile; +} + + +static gchar* publishing_facebook_graph_message_real_get_uri (PublishingFacebookGraphMessage* self) { +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_facebook_graph_message_get_uri'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8527 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_graph_message_get_uri (PublishingFacebookGraphMessage* self) { +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (self), NULL); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return PUBLISHING_FACEBOOK_GRAPH_MESSAGE_GET_CLASS (self)->get_uri (self); +#line 8536 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_graph_message_real_get_response_body (PublishingFacebookGraphMessage* self) { +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_critical ("Type `%s' does not implement abstract method `publishing_facebook_graph_message_get_response_body'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8545 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_graph_message_get_response_body (PublishingFacebookGraphMessage* self) { +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (self), NULL); +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return PUBLISHING_FACEBOOK_GRAPH_MESSAGE_GET_CLASS (self)->get_response_body (self); +#line 8554 "FacebookPublishing.c" +} + + +PublishingFacebookGraphMessage* publishing_facebook_graph_message_construct (GType object_type) { + PublishingFacebookGraphMessage* self = NULL; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphMessage*) g_type_create_instance (object_type); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 8564 "FacebookPublishing.c" +} + + +static void g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1, gint arg_1, gint arg_2, gpointer data2); + register GMarshalFunc_VOID__INT_INT callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (n_param_values == 3); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data1 = closure->data; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data2 = param_values->data[0].v_pointer; +#line 8583 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data1 = param_values->data[0].v_pointer; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + data2 = closure->data; +#line 8589 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), data2); +#line 8595 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_graph_message_init (GValue* value) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8602 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_graph_message_free_value (GValue* value) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_message_unref (value->data[0].v_pointer); +#line 8611 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_graph_message_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_graph_message_ref (src_value->data[0].v_pointer); +#line 8621 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 8625 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_value_graph_message_peek_pointer (const GValue* value) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 8633 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_graph_message_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 8640 "FacebookPublishing.c" + PublishingFacebookGraphMessage* object; + object = collect_values[0].v_pointer; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 8647 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 8651 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_graph_message_ref (object); +#line 8655 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8659 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8663 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_graph_message_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookGraphMessage** object_p; + object_p = collect_values[0].v_pointer; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 8674 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 8680 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 8684 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_graph_message_ref (value->data[0].v_pointer); +#line 8688 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 8692 "FacebookPublishing.c" +} + + +GParamSpec* publishing_facebook_param_spec_graph_message (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookParamSpecGraphMessage* spec; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE), NULL); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 8706 "FacebookPublishing.c" +} + + +gpointer publishing_facebook_value_get_graph_message (const GValue* value) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE), NULL); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 8715 "FacebookPublishing.c" +} + + +void publishing_facebook_value_set_graph_message (GValue* value, gpointer v_object) { + PublishingFacebookGraphMessage* old; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_message_ref (value->data[0].v_pointer); +#line 8735 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8739 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_message_unref (old); +#line 8745 "FacebookPublishing.c" + } +} + + +void publishing_facebook_value_take_graph_message (GValue* value, gpointer v_object) { + PublishingFacebookGraphMessage* old; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE)); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 8764 "FacebookPublishing.c" + } else { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8768 "FacebookPublishing.c" + } +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_message_unref (old); +#line 8774 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_graph_message_class_init (PublishingFacebookGraphMessageClass * klass) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_message_parent_class = g_type_class_peek_parent (klass); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->finalize = publishing_facebook_graph_message_finalize; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->get_uri = publishing_facebook_graph_message_real_get_uri; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->get_response_body = publishing_facebook_graph_message_real_get_response_body; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("data_transmitted", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); +#line 8794 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_message_instance_init (PublishingFacebookGraphMessage * self) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 8801 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_message_finalize (PublishingFacebookGraphMessage* obj) { + PublishingFacebookGraphMessage * self; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 8811 "FacebookPublishing.c" +} + + +GType publishing_facebook_graph_message_get_type (void) { + static volatile gsize publishing_facebook_graph_message_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_message_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_value_graph_message_init, publishing_facebook_value_graph_message_free_value, publishing_facebook_value_graph_message_copy_value, publishing_facebook_value_graph_message_peek_pointer, "p", publishing_facebook_value_graph_message_collect_value, "p", publishing_facebook_value_graph_message_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphMessage), 0, (GInstanceInitFunc) publishing_facebook_graph_message_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_facebook_graph_message_type_id; + publishing_facebook_graph_message_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookGraphMessage", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&publishing_facebook_graph_message_type_id__volatile, publishing_facebook_graph_message_type_id); + } + return publishing_facebook_graph_message_type_id__volatile; +} + + +gpointer publishing_facebook_graph_message_ref (gpointer instance) { + PublishingFacebookGraphMessage* self; + self = instance; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 8836 "FacebookPublishing.c" +} + + +void publishing_facebook_graph_message_unref (gpointer instance) { + PublishingFacebookGraphMessage* self; + self = instance; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_GRAPH_MESSAGE_GET_CLASS (self)->finalize (self); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 8849 "FacebookPublishing.c" + } +} + + +static void _publishing_facebook_graph_session_on_request_unqueued_soup_session_request_unqueued (SoupSession* _sender, SoupMessage* msg, gpointer self) { +#line 1478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_on_request_unqueued ((PublishingFacebookGraphSession*) self, msg); +#line 8857 "FacebookPublishing.c" +} + + +PublishingFacebookGraphSession* publishing_facebook_graph_session_construct (GType object_type) { + PublishingFacebookGraphSession* self = NULL; + SoupSessionAsync* _tmp0_ = NULL; + SoupSession* _tmp1_ = NULL; + SoupSession* _tmp2_ = NULL; + SoupSession* _tmp3_ = NULL; +#line 1468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSession*) g_type_create_instance (object_type); +#line 1469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = (SoupSessionAsync*) soup_session_async_new (); +#line 1469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->soup_session); +#line 1469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->soup_session = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, soup_session_get_type (), SoupSession); +#line 1470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->soup_session; +#line 1470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp1_, "request-unqueued", (GCallback) _publishing_facebook_graph_session_on_request_unqueued_soup_session_request_unqueued, self); +#line 1471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = self->priv->soup_session; +#line 1471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_set (_tmp2_, "timeout", (guint) 15, NULL); +#line 1472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->access_token); +#line 1472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->access_token = NULL; +#line 1473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (self->priv->current_message); +#line 1473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_message = NULL; +#line 1474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->soup_session; +#line 1474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_set (_tmp3_, "ssl-use-system-ca-file", TRUE, NULL); +#line 1468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 8897 "FacebookPublishing.c" +} + + +PublishingFacebookGraphSession* publishing_facebook_graph_session_new (void) { +#line 1468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_graph_session_construct (PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION); +#line 8904 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_graph_message_ref0 (gpointer self) { +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_graph_message_ref (self) : NULL; +#line 8911 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_manage_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* msg) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + PublishingFacebookGraphMessage* _tmp1_ = NULL; + PublishingFacebookGraphMessage* _tmp2_ = NULL; +#line 1481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (msg)); +#line 1482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->current_message; +#line 1482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp0_ == NULL, "current_message == null"); +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = msg; +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _publishing_facebook_graph_message_ref0 (_tmp1_); +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (self->priv->current_message); +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_message = _tmp2_; +#line 8935 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_unmanage_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* msg) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; +#line 1487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (msg)); +#line 1488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->current_message; +#line 1488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp0_ != NULL, "current_message != null"); +#line 1490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (self->priv->current_message); +#line 1490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_message = NULL; +#line 8953 "FacebookPublishing.c" +} + + +static void _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data (SoupMessage* _sender, SoupBuffer* chunk, gpointer self) { +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data ((PublishingFacebookGraphSessionGraphMessageImpl*) self, chunk); +#line 8960 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_on_request_unqueued (PublishingFacebookGraphSession* self, SoupMessage* msg) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* real_message = NULL; + PublishingFacebookGraphMessage* _tmp1_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp2_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp3_ = NULL; + SoupMessage* _tmp4_ = NULL; + SoupMessage* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; + SoupMessage* _tmp8_ = NULL; + guint _tmp9_ = 0U; + guint _tmp10_ = 0U; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp21_ = NULL; + SoupMessage* _tmp22_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp23_ = NULL; + guint _tmp24_ = 0U; + GError* _error_ = NULL; + SoupMessage* _tmp25_ = NULL; + guint _tmp26_ = 0U; + guint _tmp27_ = 0U; + GError* _tmp68_ = NULL; + GError* _tmp80_ = NULL; +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (SOUP_IS_MESSAGE (msg)); +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->current_message; +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp0_ != NULL, "current_message != null"); +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->current_message; +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _publishing_facebook_graph_message_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)); +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + real_message = _tmp2_; +#line 1496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = real_message; +#line 1496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = _tmp3_->soup_message; +#line 1496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = msg; +#line 1496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp4_ == _tmp5_, "real_message.soup_message == msg"); +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = msg; +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp8_, "status-code", &_tmp9_, NULL); +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp10_ == ((guint) SOUP_STATUS_IO_ERROR)) { +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = TRUE; +#line 9019 "FacebookPublishing.c" + } else { + SoupMessage* _tmp11_ = NULL; + guint _tmp12_ = 0U; + guint _tmp13_ = 0U; +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = msg; +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp11_, "status-code", &_tmp12_, NULL); +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _tmp12_; +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp13_ == ((guint) SOUP_STATUS_MALFORMED); +#line 9032 "FacebookPublishing.c" + } +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp7_) { +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = TRUE; +#line 9038 "FacebookPublishing.c" + } else { + SoupMessage* _tmp14_ = NULL; + guint _tmp15_ = 0U; + guint _tmp16_ = 0U; +#line 1502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = msg; +#line 1502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp14_, "status-code", &_tmp15_, NULL); +#line 1502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = _tmp15_; +#line 1502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp16_ == ((guint) SOUP_STATUS_TRY_AGAIN); +#line 9051 "FacebookPublishing.c" + } +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp6_) { +#line 9055 "FacebookPublishing.c" + PublishingFacebookGraphSessionGraphMessageImpl* _tmp17_ = NULL; + SoupSession* _tmp18_ = NULL; + SoupMessage* _tmp19_ = NULL; + SoupMessage* _tmp20_ = NULL; +#line 1503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = real_message; +#line 1503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_->bytes_so_far = 0; +#line 1504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = self->priv->soup_session; +#line 1504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = msg; +#line 1504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = _g_object_ref0 (_tmp19_); +#line 1504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_session_queue_message (_tmp18_, _tmp20_, NULL, NULL); +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (real_message); +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 9076 "FacebookPublishing.c" + } +#line 1508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = real_message; +#line 1508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_unmanage_message (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = msg; +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = real_message; +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("wrote-body-data", soup_message_get_type (), &_tmp24_, NULL, FALSE); +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp24_, 0, NULL, (GCallback) _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data, _tmp23_); +#line 1511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = NULL; +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = msg; +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp25_, "status-code", &_tmp26_, NULL); +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = _tmp26_; +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + switch (_tmp27_) { +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_OK: +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_CREATED: +#line 9104 "FacebookPublishing.c" + { +#line 1517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 9108 "FacebookPublishing.c" + } +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case PUBLISHING_FACEBOOK_EXPIRED_SESSION_STATUS_CODE: +#line 9112 "FacebookPublishing.c" + { + GError* _tmp28_ = NULL; +#line 1520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION, "OAuth Access Token has Expired. Logout user."); +#line 1520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp28_; +#line 1522 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 9123 "FacebookPublishing.c" + } +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_CANT_RESOLVE: +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_CANT_RESOLVE_PROXY: +#line 9129 "FacebookPublishing.c" + { + PublishingFacebookGraphSessionGraphMessageImpl* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + SoupMessage* _tmp32_ = NULL; + guint _tmp33_ = 0U; + guint _tmp34_ = 0U; + GError* _tmp35_ = NULL; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = real_message; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = publishing_facebook_graph_message_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = _tmp30_; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = msg; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp32_, "status-code", &_tmp33_, NULL); +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = _tmp33_; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to resolve %s (error code %u)", _tmp31_, _tmp34_); +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp35_; +#line 1526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp31_); +#line 1528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 9160 "FacebookPublishing.c" + } +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_CANT_CONNECT: +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + case SOUP_STATUS_CANT_CONNECT_PROXY: +#line 9166 "FacebookPublishing.c" + { + PublishingFacebookGraphSessionGraphMessageImpl* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + SoupMessage* _tmp39_ = NULL; + guint _tmp40_ = 0U; + guint _tmp41_ = 0U; + GError* _tmp42_ = NULL; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = real_message; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp37_ = publishing_facebook_graph_message_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp38_ = _tmp37_; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp39_ = msg; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp39_, "status-code", &_tmp40_, NULL); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp41_ = _tmp40_; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp42_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Unable to connect to %s (error code %u)", _tmp38_, _tmp41_); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp42_; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp38_); +#line 1534 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 9197 "FacebookPublishing.c" + } + default: + { + SoupMessage* _tmp43_ = NULL; + guint _tmp44_ = 0U; + guint _tmp45_ = 0U; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp43_ = msg; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp43_, "status-code", &_tmp44_, NULL); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_ = _tmp44_; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp45_ >= ((guint) 100)) { +#line 9212 "FacebookPublishing.c" + PublishingFacebookGraphSessionGraphMessageImpl* _tmp46_ = NULL; + gchar* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; + SoupMessage* _tmp49_ = NULL; + guint _tmp50_ = 0U; + guint _tmp51_ = 0U; + SoupMessage* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + gchar* _tmp54_ = NULL; + gchar* _tmp55_ = NULL; + GError* _tmp56_ = NULL; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp46_ = real_message; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp47_ = publishing_facebook_graph_message_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp48_ = _tmp47_; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp49_ = msg; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp49_, "status-code", &_tmp50_, NULL); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp51_ = _tmp50_; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp52_ = msg; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp52_, "reason-phrase", &_tmp53_, NULL); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp54_ = _tmp53_; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp55_ = _tmp54_; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp56_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Service %s returned HTTP status code %u %s", _tmp48_, _tmp51_, _tmp55_); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp56_; +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp55_); +#line 1540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp48_); +#line 9254 "FacebookPublishing.c" + } else { + SoupMessage* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + gchar* _tmp59_ = NULL; + gchar* _tmp60_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + gchar* _tmp63_ = NULL; + SoupMessage* _tmp64_ = NULL; + guint _tmp65_ = 0U; + guint _tmp66_ = 0U; + GError* _tmp67_ = NULL; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp57_ = msg; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp57_, "reason-phrase", &_tmp58_, NULL); +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp59_ = _tmp58_; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp60_ = _tmp59_; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:1544: %s", _tmp60_); +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp60_); +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp61_ = real_message; +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp62_ = publishing_facebook_graph_message_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp63_ = _tmp62_; +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp64_ = msg; +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_object_get (_tmp64_, "status-code", &_tmp65_, NULL); +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp66_ = _tmp65_; +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp67_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER, "Failure communicating with %s (error code %u)", _tmp63_, _tmp66_); +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp67_; +#line 1545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp63_); +#line 9299 "FacebookPublishing.c" + } +#line 1549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + break; +#line 9303 "FacebookPublishing.c" + } + } +#line 1553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp68_ = _error_; +#line 1553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp68_ == NULL) { +#line 9310 "FacebookPublishing.c" + gboolean _tmp69_ = FALSE; + SoupMessage* _tmp70_ = NULL; + SoupMessageBody* _tmp71_ = NULL; + guint8* _tmp72_ = NULL; + gint _tmp72__length1 = 0; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp70_ = msg; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp71_ = _tmp70_->response_body; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp72_ = _tmp71_->data; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp72__length1 = (gint) _tmp71_->length; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp72_ == NULL) { +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp69_ = TRUE; +#line 9328 "FacebookPublishing.c" + } else { + SoupMessage* _tmp73_ = NULL; + SoupMessageBody* _tmp74_ = NULL; + guint8* _tmp75_ = NULL; + gint _tmp75__length1 = 0; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp73_ = msg; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp74_ = _tmp73_->response_body; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp75_ = _tmp74_->data; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp75__length1 = (gint) _tmp74_->length; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp69_ = _tmp75__length1 == 0; +#line 9344 "FacebookPublishing.c" + } +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp69_) { +#line 9348 "FacebookPublishing.c" + PublishingFacebookGraphSessionGraphMessageImpl* _tmp76_ = NULL; + gchar* _tmp77_ = NULL; + gchar* _tmp78_ = NULL; + GError* _tmp79_ = NULL; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp76_ = real_message; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp77_ = publishing_facebook_graph_message_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage)); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp78_ = _tmp77_; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp79_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "No response data from %s", _tmp78_); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _error_ = _tmp79_; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp78_); +#line 9367 "FacebookPublishing.c" + } + } +#line 1558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp80_ = _error_; +#line 1558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp80_ == NULL) { +#line 9374 "FacebookPublishing.c" + PublishingFacebookGraphSessionGraphMessageImpl* _tmp81_ = NULL; +#line 1559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp81_ = real_message; +#line 1559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage), "completed"); +#line 9380 "FacebookPublishing.c" + } else { + PublishingFacebookGraphSessionGraphMessageImpl* _tmp82_ = NULL; + GError* _tmp83_ = NULL; +#line 1561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp82_ = real_message; +#line 1561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp83_ = _error_; +#line 1561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage), "failed", _tmp83_); +#line 9390 "FacebookPublishing.c" + } +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_error_); +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (real_message); +#line 9396 "FacebookPublishing.c" +} + + +void publishing_facebook_graph_session_authenticate (PublishingFacebookGraphSession* self, const gchar* access_token) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (access_token != NULL); +#line 1565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = access_token; +#line 1565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->access_token); +#line 1565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->access_token = _tmp1_; +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "authenticated"); +#line 9417 "FacebookPublishing.c" +} + + +gboolean publishing_facebook_graph_session_is_authenticated (PublishingFacebookGraphSession* self) { + gboolean result = FALSE; + const gchar* _tmp0_ = NULL; +#line 1569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), FALSE); +#line 1570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->access_token; +#line 1570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp0_ != NULL; +#line 1570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9432 "FacebookPublishing.c" +} + + +gchar* publishing_facebook_graph_session_get_access_token (PublishingFacebookGraphSession* self) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), NULL); +#line 1574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_graph_session_is_authenticated (self); +#line 1574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp0_, "is_authenticated()"); +#line 1575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->access_token; +#line 1575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp2_; +#line 1575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9455 "FacebookPublishing.c" +} + + +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_endpoint_test (PublishingFacebookGraphSession* self) { + PublishingFacebookGraphMessage* result = NULL; + PublishingFacebookGraphSessionGraphEndpointProbeMessage* _tmp0_ = NULL; +#line 1578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), NULL); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishing_facebook_graph_session_graph_endpoint_probe_message_new (self); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9470 "FacebookPublishing.c" +} + + +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_query (PublishingFacebookGraphSession* self, const gchar* resource_path) { + PublishingFacebookGraphMessage* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingFacebookGraphSessionGraphQueryMessage* _tmp2_ = NULL; +#line 1582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), NULL); +#line 1582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (resource_path != NULL, NULL); +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = resource_path; +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->access_token; +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishing_facebook_graph_session_graph_query_message_new (self, _tmp0_, _tmp1_); +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage); +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9493 "FacebookPublishing.c" +} + + +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_upload (PublishingFacebookGraphSession* self, const gchar* resource_path, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy) { + PublishingFacebookGraphMessage* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + SpitPublishingPublishable* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + const gchar* _tmp4_ = NULL; + PublishingFacebookGraphSessionGraphUploadMessage* _tmp5_ = NULL; +#line 1586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), NULL); +#line 1586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (resource_path != NULL, NULL); +#line 1586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->access_token; +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = resource_path; +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishable; +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = suppress_titling; +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = resource_privacy; +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = publishing_facebook_graph_session_graph_upload_message_new (self, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_); +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage); +#line 1588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9527 "FacebookPublishing.c" +} + + +PublishingFacebookGraphMessage* publishing_facebook_graph_session_new_create_album (PublishingFacebookGraphSession* self, const gchar* album_name, const gchar* privacy) { + PublishingFacebookGraphMessage* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingFacebookGraphSessionGraphCreateAlbumMessage* _tmp3_ = NULL; +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self), NULL); +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (album_name != NULL, NULL); +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (privacy != NULL, NULL); +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->access_token; +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = album_name; +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = privacy; +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = publishing_facebook_graph_session_graph_create_album_message_new (self, _tmp0_, _tmp1_, _tmp2_); +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage); +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9555 "FacebookPublishing.c" +} + + +void publishing_facebook_graph_session_send_message (PublishingFacebookGraphSession* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphSessionGraphMessageImpl* real_message = NULL; + PublishingFacebookGraphMessage* _tmp0_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp1_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp2_ = NULL; + SoupMessage* _tmp3_ = NULL; + SoupURI* _tmp4_ = NULL; + SoupURI* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp10_ = NULL; + gboolean _tmp11_ = FALSE; +#line 1596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 1597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 1597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _publishing_facebook_graph_message_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)); +#line 1597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + real_message = _tmp1_; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = real_message; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp2_->soup_message; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = soup_message_get_uri (_tmp3_); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = soup_uri_to_string (_tmp5_, FALSE); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = g_strconcat ("making HTTP request to URI: ", _tmp7_, NULL); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_debug ("FacebookPublishing.vala:1599: %s", _tmp9_); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp9_); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 1601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = real_message; +#line 1601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = publishing_facebook_graph_session_graph_message_impl_prepare_for_transmission (_tmp10_); +#line 1601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp11_) { +#line 9611 "FacebookPublishing.c" + PublishingFacebookGraphMessage* _tmp12_ = NULL; + SoupSession* _tmp13_ = NULL; + PublishingFacebookGraphSessionGraphMessageImpl* _tmp14_ = NULL; + SoupMessage* _tmp15_ = NULL; + SoupMessage* _tmp16_ = NULL; +#line 1602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = message; +#line 1602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_manage_message (self, _tmp12_); +#line 1603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = self->priv->soup_session; +#line 1603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = real_message; +#line 1603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = _tmp14_->soup_message; +#line 1603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = _g_object_ref0 (_tmp15_); +#line 1603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_session_queue_message (_tmp13_, _tmp16_, NULL, NULL); +#line 9631 "FacebookPublishing.c" + } +#line 1596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (real_message); +#line 9635 "FacebookPublishing.c" +} + + +void publishing_facebook_graph_session_stop_transactions (PublishingFacebookGraphSession* self) { + SoupSession* _tmp0_ = NULL; +#line 1607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (self)); +#line 1608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->soup_session; +#line 1608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_session_abort (_tmp0_); +#line 9647 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphMessageImpl* publishing_facebook_graph_session_graph_message_impl_construct (GType object_type, PublishingFacebookGraphSession* host_session, PublishingRESTSupportHttpMethod method, const gchar* relative_uri, const gchar* access_token, PublishingFacebookEndpoint endpoint) { + PublishingFacebookGraphSessionGraphMessageImpl* self = NULL; + PublishingRESTSupportHttpMethod _tmp0_ = 0; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + PublishingFacebookGraphSession* _tmp3_ = NULL; + gchar* endpoint_uri = NULL; + PublishingFacebookEndpoint _tmp4_ = 0; + gchar* _tmp5_ = NULL; + GError * _inner_error_ = NULL; +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (host_session), NULL); +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (relative_uri != NULL, NULL); +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (access_token != NULL, NULL); +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSessionGraphMessageImpl*) publishing_facebook_graph_message_construct (object_type); +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = method; +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->method = _tmp0_; +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = access_token; +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->access_token); +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->access_token = _tmp2_; +#line 1315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = host_session; +#line 1315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->host_session = _tmp3_; +#line 1316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->bytes_so_far = 0; +#line 1318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = endpoint; +#line 1318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = publishing_facebook_endpoint_to_uri (_tmp4_); +#line 1318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + endpoint_uri = _tmp5_; +#line 9693 "FacebookPublishing.c" + { + GRegex* starting_slashes = NULL; + GRegex* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GRegex* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = g_regex_new ("^/+", 0, 0, &_inner_error_); +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + starting_slashes = _tmp6_; +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 9713 "FacebookPublishing.c" + goto __catch5_g_regex_error; + } +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (endpoint_uri); +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 9724 "FacebookPublishing.c" + } +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = starting_slashes; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = relative_uri; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = g_regex_replace (_tmp8_, _tmp9_, (gssize) -1, 0, "", 0, &_inner_error_); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp10_; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_regex_unref0 (starting_slashes); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 9740 "FacebookPublishing.c" + goto __catch5_g_regex_error; + } +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_regex_unref0 (starting_slashes); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (endpoint_uri); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 9753 "FacebookPublishing.c" + } +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = endpoint_uri; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = _tmp7_; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = NULL; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _tmp12_; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = g_strconcat (_tmp11_, _tmp13_, NULL); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->uri); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->uri = _tmp14_; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp13_); +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_regex_unref0 (starting_slashes); +#line 9775 "FacebookPublishing.c" + } + goto __finally5; + __catch5_g_regex_error: + { + GError* err = NULL; +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + err = _inner_error_; +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 1323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_assert_not_reached (); +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (err); +#line 9789 "FacebookPublishing.c" + } + __finally5: +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (endpoint_uri); +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 9802 "FacebookPublishing.c" + } +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (endpoint_uri); +#line 1311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 9808 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_graph_session_graph_message_impl_real_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* self) { + gboolean result = FALSE; +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = TRUE; +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9818 "FacebookPublishing.c" +} + + +gboolean publishing_facebook_graph_session_graph_message_impl_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* self) { +#line 1327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_MESSAGE_IMPL (self), FALSE); +#line 1327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_MESSAGE_IMPL_GET_CLASS (self)->prepare_for_transmission (self); +#line 9827 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_graph_session_graph_message_impl_real_get_uri (PublishingFacebookGraphMessage* base) { + PublishingFacebookGraphSessionGraphMessageImpl * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl); +#line 1332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->uri; +#line 1332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp1_; +#line 1332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9846 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_graph_session_graph_message_impl_real_get_response_body (PublishingFacebookGraphMessage* base) { + PublishingFacebookGraphSessionGraphMessageImpl * self; + gchar* result = NULL; + SoupMessage* _tmp0_ = NULL; + SoupMessageBody* _tmp1_ = NULL; + guint8* _tmp2_ = NULL; + gint _tmp2__length1 = 0; + gchar* _tmp3_ = NULL; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl); +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->soup_message; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = _tmp0_->response_body; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_->data; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2__length1 = (gint) _tmp1_->length; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = g_strdup ((const gchar*) _tmp2_); +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = _tmp3_; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 9874 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data (PublishingFacebookGraphSessionGraphMessageImpl* self, SoupBuffer* chunk) { + gint _tmp0_ = 0; + SoupBuffer* _tmp1_ = NULL; + gsize _tmp2_ = 0UL; + gint _tmp3_ = 0; + SoupMessage* _tmp4_ = NULL; + SoupMessageBody* _tmp5_ = NULL; + gint64 _tmp6_ = 0LL; +#line 1339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_GRAPH_SESSION_IS_GRAPH_MESSAGE_IMPL (self)); +#line 1339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (chunk != NULL); +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->bytes_so_far; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = chunk; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp1_->length; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->bytes_so_far = _tmp0_ + ((gint) _tmp2_); +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->bytes_so_far; +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = self->soup_message; +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_->request_body; +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_->length; +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage), "data-transmitted", _tmp3_, (gint) _tmp6_); +#line 9908 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_message_impl_class_init (PublishingFacebookGraphSessionGraphMessageImplClass * klass) { +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_message_impl_parent_class = g_type_class_peek_parent (klass); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->finalize = publishing_facebook_graph_session_graph_message_impl_finalize; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphSessionGraphMessageImplClass *) klass)->prepare_for_transmission = publishing_facebook_graph_session_graph_message_impl_real_prepare_for_transmission; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->get_uri = publishing_facebook_graph_session_graph_message_impl_real_get_uri; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->get_response_body = publishing_facebook_graph_session_graph_message_impl_real_get_response_body; +#line 9923 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_message_impl_instance_init (PublishingFacebookGraphSessionGraphMessageImpl * self) { +} + + +static void publishing_facebook_graph_session_graph_message_impl_finalize (PublishingFacebookGraphMessage* obj) { + PublishingFacebookGraphSessionGraphMessageImpl * self; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl); +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->uri); +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->access_token); +#line 1307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->soup_message); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_GRAPH_MESSAGE_CLASS (publishing_facebook_graph_session_graph_message_impl_parent_class)->finalize (obj); +#line 9943 "FacebookPublishing.c" +} + + +static GType publishing_facebook_graph_session_graph_message_impl_get_type (void) { + static volatile gsize publishing_facebook_graph_session_graph_message_impl_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_graph_message_impl_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionGraphMessageImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_graph_message_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSessionGraphMessageImpl), 0, (GInstanceInitFunc) publishing_facebook_graph_session_graph_message_impl_instance_init, NULL }; + GType publishing_facebook_graph_session_graph_message_impl_type_id; + publishing_facebook_graph_session_graph_message_impl_type_id = g_type_register_static (PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, "PublishingFacebookGraphSessionGraphMessageImpl", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&publishing_facebook_graph_session_graph_message_impl_type_id__volatile, publishing_facebook_graph_session_graph_message_impl_type_id); + } + return publishing_facebook_graph_session_graph_message_impl_type_id__volatile; +} + + +static void _vala_SoupURI_free (SoupURI* self) { +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_boxed_free (soup_uri_get_type (), self); +#line 9962 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphQueryMessage* publishing_facebook_graph_session_graph_query_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* relative_uri, const gchar* access_token) { + PublishingFacebookGraphSessionGraphQueryMessage* self = NULL; + PublishingFacebookGraphSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + SoupURI* destination_uri = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + SoupURI* _tmp9_ = NULL; + SoupURI* _tmp10_ = NULL; + PublishingRESTSupportHttpMethod _tmp11_ = 0; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + SoupMessage* _tmp14_ = NULL; + SoupMessage* _tmp15_ = NULL; +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (host_session), NULL); +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (relative_uri != NULL, NULL); +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (access_token != NULL, NULL); +#line 1349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = host_session; +#line 1349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = relative_uri; +#line 1349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = access_token; +#line 1349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSessionGraphQueryMessage*) publishing_facebook_graph_session_graph_message_impl_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, _tmp1_, _tmp2_, PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->uri; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_strconcat (_tmp3_, "?access_token=", NULL); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = access_token; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp7_; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = soup_uri_new (_tmp8_); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp8_); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp5_); +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + destination_uri = _tmp10_; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->method; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = publishing_rest_support_http_method_to_string (_tmp11_); +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _tmp12_; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = soup_message_new_from_uri (_tmp13_, destination_uri); +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message); +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message = _tmp14_; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp13_); +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp15_, "wrote-body-data", (GCallback) _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)); +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupURI_free0 (destination_uri); +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 10043 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphQueryMessage* publishing_facebook_graph_session_graph_query_message_new (PublishingFacebookGraphSession* host_session, const gchar* relative_uri, const gchar* access_token) { +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_graph_session_graph_query_message_construct (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_QUERY_MESSAGE, host_session, relative_uri, access_token); +#line 10050 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_query_message_class_init (PublishingFacebookGraphSessionGraphQueryMessageClass * klass) { +#line 1346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_query_message_parent_class = g_type_class_peek_parent (klass); +#line 10057 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_query_message_instance_init (PublishingFacebookGraphSessionGraphQueryMessage * self) { +} + + +static GType publishing_facebook_graph_session_graph_query_message_get_type (void) { + static volatile gsize publishing_facebook_graph_session_graph_query_message_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_graph_query_message_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionGraphQueryMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_graph_query_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSessionGraphQueryMessage), 0, (GInstanceInitFunc) publishing_facebook_graph_session_graph_query_message_instance_init, NULL }; + GType publishing_facebook_graph_session_graph_query_message_type_id; + publishing_facebook_graph_session_graph_query_message_type_id = g_type_register_static (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, "PublishingFacebookGraphSessionGraphQueryMessage", &g_define_type_info, 0); + g_once_init_leave (&publishing_facebook_graph_session_graph_query_message_type_id__volatile, publishing_facebook_graph_session_graph_query_message_type_id); + } + return publishing_facebook_graph_session_graph_query_message_type_id__volatile; +} + + +static PublishingFacebookGraphSessionGraphEndpointProbeMessage* publishing_facebook_graph_session_graph_endpoint_probe_message_construct (GType object_type, PublishingFacebookGraphSession* host_session) { + PublishingFacebookGraphSessionGraphEndpointProbeMessage* self = NULL; + PublishingFacebookGraphSession* _tmp0_ = NULL; + PublishingRESTSupportHttpMethod _tmp1_ = 0; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + SoupURI* _tmp5_ = NULL; + SoupURI* _tmp6_ = NULL; + SoupMessage* _tmp7_ = NULL; + SoupMessage* _tmp8_ = NULL; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (host_session), NULL); +#line 1359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = host_session; +#line 1359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSessionGraphEndpointProbeMessage*) publishing_facebook_graph_session_graph_message_impl_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET, "/", "", PUBLISHING_FACEBOOK_ENDPOINT_TEST_CONNECTION); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->method; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp2_; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->uri; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = soup_uri_new (_tmp4_); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp5_; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = soup_message_new_from_uri (_tmp3_, _tmp6_); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message = _tmp7_; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupURI_free0 (_tmp6_); +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp3_); +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp8_, "wrote-body-data", (GCallback) _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)); +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 10122 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphEndpointProbeMessage* publishing_facebook_graph_session_graph_endpoint_probe_message_new (PublishingFacebookGraphSession* host_session) { +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_graph_session_graph_endpoint_probe_message_construct (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_ENDPOINT_PROBE_MESSAGE, host_session); +#line 10129 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_endpoint_probe_message_class_init (PublishingFacebookGraphSessionGraphEndpointProbeMessageClass * klass) { +#line 1357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_endpoint_probe_message_parent_class = g_type_class_peek_parent (klass); +#line 10136 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_endpoint_probe_message_instance_init (PublishingFacebookGraphSessionGraphEndpointProbeMessage * self) { +} + + +static GType publishing_facebook_graph_session_graph_endpoint_probe_message_get_type (void) { + static volatile gsize publishing_facebook_graph_session_graph_endpoint_probe_message_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_graph_endpoint_probe_message_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionGraphEndpointProbeMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_graph_endpoint_probe_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSessionGraphEndpointProbeMessage), 0, (GInstanceInitFunc) publishing_facebook_graph_session_graph_endpoint_probe_message_instance_init, NULL }; + GType publishing_facebook_graph_session_graph_endpoint_probe_message_type_id; + publishing_facebook_graph_session_graph_endpoint_probe_message_type_id = g_type_register_static (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, "PublishingFacebookGraphSessionGraphEndpointProbeMessage", &g_define_type_info, 0); + g_once_init_leave (&publishing_facebook_graph_session_graph_endpoint_probe_message_type_id__volatile, publishing_facebook_graph_session_graph_endpoint_probe_message_type_id); + } + return publishing_facebook_graph_session_graph_endpoint_probe_message_type_id__volatile; +} + + +static gchar* g_date_time_to_string (GDateTime* self) { + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 2785 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 2786 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = g_date_time_format (self, "%FT%H:%M:%S%z"); +#line 2786 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp0_; +#line 2786 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 10167 "FacebookPublishing.c" +} + + +static void _vala_SoupMultipart_free (SoupMultipart* self) { +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_boxed_free (soup_multipart_get_type (), self); +#line 10174 "FacebookPublishing.c" +} + + +static void _vala_SoupBuffer_free (SoupBuffer* self) { +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_boxed_free (soup_buffer_get_type (), self); +#line 10181 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphUploadMessage* publishing_facebook_graph_session_graph_upload_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* relative_uri, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy) { + PublishingFacebookGraphSessionGraphUploadMessage* self = NULL; + PublishingFacebookEndpoint _tmp0_ = 0; + SpitPublishingPublishable* _tmp1_ = NULL; + SpitPublishingPublisherMediaType _tmp2_ = 0; + PublishingFacebookGraphSession* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + SpitPublishingPublishable* _tmp7_ = NULL; + SpitPublishingPublisherMediaType _tmp8_ = 0; + SpitPublishingPublishable* _tmp10_ = NULL; + SpitPublishingPublishable* _tmp11_ = NULL; + PublishingRESTSupportHttpMethod _tmp21_ = 0; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + SoupURI* _tmp25_ = NULL; + SoupURI* _tmp26_ = NULL; + SoupMessage* _tmp27_ = NULL; + SoupMessage* _tmp28_ = NULL; + guint8* payload = NULL; + GMappedFile* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gint payload_length1 = 0; + gint _payload_size_ = 0; + GMappedFile* _tmp31_ = NULL; + gsize _tmp32_ = 0UL; + gint _tmp33_ = 0; + SoupBuffer* image_data = NULL; + guint8* _tmp34_ = NULL; + gint _tmp34__length1 = 0; + SoupBuffer* _tmp35_ = NULL; + SoupMultipart* mp_envelope = NULL; + SoupMultipart* _tmp36_ = NULL; + SoupMultipart* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; + SpitPublishingPublishable* _tmp39_ = NULL; + SpitPublishingPublisherMediaType _tmp40_ = 0; + gchar* publishable_title = NULL; + SpitPublishingPublishable* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gboolean _tmp45_ = FALSE; + gboolean _tmp46_ = FALSE; + gchar* publishable_comment = NULL; + SpitPublishingPublishable* _tmp50_ = NULL; + gchar* _tmp51_ = NULL; + gboolean _tmp52_ = FALSE; + gboolean _tmp53_ = FALSE; + gboolean _tmp57_ = FALSE; + const gchar* _tmp64_ = NULL; + SpitPublishingPublishable* _tmp65_ = NULL; + SpitPublishingPublisherMediaType _tmp66_ = 0; + gchar* source_file_mime_type = NULL; + gchar* _tmp67_ = NULL; + SoupMultipart* _tmp68_ = NULL; + SpitPublishingPublishable* _tmp69_ = NULL; + GFile* _tmp70_ = NULL; + GFile* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; + gchar* _tmp73_ = NULL; + const gchar* _tmp74_ = NULL; + SoupBuffer* _tmp75_ = NULL; + SoupMultipart* _tmp76_ = NULL; + SoupMessage* _tmp77_ = NULL; + SoupMessageHeaders* _tmp78_ = NULL; + SoupMessage* _tmp79_ = NULL; + SoupMessageBody* _tmp80_ = NULL; + GError * _inner_error_ = NULL; +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (host_session), NULL); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (access_token != NULL, NULL); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (relative_uri != NULL, NULL); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = publishable; +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = spit_publishing_publishable_get_media_type (_tmp1_); +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp2_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 1376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = PUBLISHING_FACEBOOK_ENDPOINT_VIDEO; +#line 10270 "FacebookPublishing.c" + } else { +#line 1376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT; +#line 10274 "FacebookPublishing.c" + } +#line 1374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = host_session; +#line 1374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = relative_uri; +#line 1374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = access_token; +#line 1374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSessionGraphUploadMessage*) publishing_facebook_graph_session_graph_message_impl_construct (object_type, _tmp3_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST, _tmp4_, _tmp5_, _tmp0_); +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = publishable; +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = spit_publishing_publishable_get_media_type (_tmp7_); +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp8_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = TRUE; +#line 10292 "FacebookPublishing.c" + } else { + const gchar* _tmp9_ = NULL; +#line 1382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = resource_privacy; +#line 1382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _tmp9_ != NULL; +#line 10299 "FacebookPublishing.c" + } +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp6_, "publishable.get_media_type() != Spit.Publishing.Publisher.MediaType.VIDEO || resource_privacy != null"); +#line 1384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = publishable; +#line 1384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = _g_object_ref0 (_tmp10_); +#line 1384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 1384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishable = _tmp11_; +#line 10311 "FacebookPublishing.c" + { + GMappedFile* _tmp12_ = NULL; + SpitPublishingPublishable* _tmp13_ = NULL; + GFile* _tmp14_ = NULL; + GFile* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + GMappedFile* _tmp18_ = NULL; + GMappedFile* _tmp19_ = NULL; + GMappedFile* _tmp20_ = NULL; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = publishable; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = spit_publishing_publishable_get_serialized_file (_tmp13_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = _tmp14_; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = g_file_get_path (_tmp15_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = _tmp16_; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = g_mapped_file_new (_tmp17_, FALSE, &_inner_error_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp17_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (_tmp15_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = _tmp19_; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_inner_error_->domain == G_FILE_ERROR) { +#line 10346 "FacebookPublishing.c" + goto __catch6_g_file_error; + } +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 10355 "FacebookPublishing.c" + } +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = _tmp12_; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = NULL; +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_mapped_file_unref0 (self->priv->mapped_file); +#line 1388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->mapped_file = _tmp20_; +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_mapped_file_unref0 (_tmp12_); +#line 10367 "FacebookPublishing.c" + } + goto __finally6; + __catch6_g_file_error: + { + GError* e = NULL; +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + e = _inner_error_; +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _inner_error_ = NULL; +#line 1391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (e); +#line 1391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 10381 "FacebookPublishing.c" + } + __finally6: +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_clear_error (&_inner_error_); +#line 1387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 10392 "FacebookPublishing.c" + } +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->method; +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = publishing_rest_support_http_method_to_string (_tmp21_); +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = _tmp22_; +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->uri; +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = soup_uri_new (_tmp24_); +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = _tmp25_; +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = soup_message_new_from_uri (_tmp23_, _tmp26_); +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message); +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message = _tmp27_; +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupURI_free0 (_tmp26_); +#line 1394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp23_); +#line 1395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp28_, "wrote-body-data", (GCallback) _publishing_facebook_graph_session_graph_message_impl_on_wrote_body_data_soup_message_wrote_body_data, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)); +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = self->priv->mapped_file; +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = g_mapped_file_get_contents (_tmp29_); +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + payload = (guint8*) _tmp30_; +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + payload_length1 = -1; +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _payload_size_ = payload_length1; +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = self->priv->mapped_file; +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = g_mapped_file_get_length (_tmp31_); +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + payload_length1 = (gint) _tmp32_; +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = payload_length1; +#line 1400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = payload; +#line 1400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34__length1 = payload_length1; +#line 1400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp35_ = soup_buffer_new (SOUP_MEMORY_TEMPORARY, _tmp34_, _tmp34__length1); +#line 1400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + image_data = _tmp35_; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp36_ = soup_multipart_new ("multipart/form-data"); +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + mp_envelope = _tmp36_; +#line 1404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp37_ = mp_envelope; +#line 1404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp38_ = access_token; +#line 1404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (_tmp37_, "access_token", _tmp38_); +#line 1406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp39_ = publishable; +#line 1406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp40_ = spit_publishing_publishable_get_media_type (_tmp39_); +#line 1406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp40_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 10462 "FacebookPublishing.c" + SoupMultipart* _tmp41_ = NULL; + const gchar* _tmp42_ = NULL; +#line 1407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp41_ = mp_envelope; +#line 1407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp42_ = resource_privacy; +#line 1407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (_tmp41_, "privacy", _tmp42_); +#line 10471 "FacebookPublishing.c" + } +#line 1410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp43_ = publishable; +#line 1410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp44_ = spit_publishing_publishable_get_param_string (_tmp43_, "title"); +#line 1410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishable_title = _tmp44_; +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp46_ = suppress_titling; +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp46_) { +#line 10483 "FacebookPublishing.c" + const gchar* _tmp47_ = NULL; +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp47_ = publishable_title; +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_ = _tmp47_ != NULL; +#line 10489 "FacebookPublishing.c" + } else { +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp45_ = FALSE; +#line 10493 "FacebookPublishing.c" + } +#line 1411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp45_) { +#line 10497 "FacebookPublishing.c" + SoupMultipart* _tmp48_ = NULL; + const gchar* _tmp49_ = NULL; +#line 1412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp48_ = mp_envelope; +#line 1412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp49_ = publishable_title; +#line 1412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (_tmp48_, "name", _tmp49_); +#line 10506 "FacebookPublishing.c" + } +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp50_ = publishable; +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp51_ = spit_publishing_publishable_get_param_string (_tmp50_, "comment"); +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishable_comment = _tmp51_; +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp53_ = suppress_titling; +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp53_) { +#line 10518 "FacebookPublishing.c" + const gchar* _tmp54_ = NULL; +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp54_ = publishable_comment; +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp52_ = _tmp54_ != NULL; +#line 10524 "FacebookPublishing.c" + } else { +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp52_ = FALSE; +#line 10528 "FacebookPublishing.c" + } +#line 1416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp52_) { +#line 10532 "FacebookPublishing.c" + SoupMultipart* _tmp55_ = NULL; + const gchar* _tmp56_ = NULL; +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp55_ = mp_envelope; +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp56_ = publishable_comment; +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (_tmp55_, "message", _tmp56_); +#line 10541 "FacebookPublishing.c" + } +#line 1420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp57_ = suppress_titling; +#line 1420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!_tmp57_) { +#line 10547 "FacebookPublishing.c" + SoupMultipart* _tmp58_ = NULL; + SpitPublishingPublishable* _tmp59_ = NULL; + GDateTime* _tmp60_ = NULL; + GDateTime* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + gchar* _tmp63_ = NULL; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp58_ = mp_envelope; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp59_ = publishable; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp60_ = spit_publishing_publishable_get_exposure_date_time (_tmp59_); +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp61_ = _tmp60_; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp62_ = g_date_time_to_string (_tmp61_); +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp63_ = _tmp62_; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (_tmp58_, "backdated_time", _tmp63_); +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp63_); +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_date_time_unref0 (_tmp61_); +#line 10572 "FacebookPublishing.c" + } +#line 1424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp65_ = publishable; +#line 1424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp66_ = spit_publishing_publishable_get_media_type (_tmp65_); +#line 1424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp66_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 1425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp64_ = "video"; +#line 10582 "FacebookPublishing.c" + } else { +#line 1425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp64_ = "image/jpeg"; +#line 10586 "FacebookPublishing.c" + } +#line 1423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp67_ = g_strdup (_tmp64_); +#line 1423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + source_file_mime_type = _tmp67_; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp68_ = mp_envelope; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp69_ = publishable; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp70_ = spit_publishing_publishable_get_serialized_file (_tmp69_); +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp71_ = _tmp70_; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp72_ = g_file_get_basename (_tmp71_); +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp73_ = _tmp72_; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp74_ = source_file_mime_type; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp75_ = image_data; +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_file (_tmp68_, "source", _tmp73_, _tmp74_, _tmp75_); +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp73_); +#line 1426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (_tmp71_); +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp76_ = mp_envelope; +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp77_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp78_ = _tmp77_->request_headers; +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp79_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp80_ = _tmp79_->request_body; +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_to_message (_tmp76_, _tmp78_, _tmp80_); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (source_file_mime_type); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (publishable_comment); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (publishable_title); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupMultipart_free0 (mp_envelope); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupBuffer_free0 (image_data); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 10638 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphUploadMessage* publishing_facebook_graph_session_graph_upload_message_new (PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* relative_uri, SpitPublishingPublishable* publishable, gboolean suppress_titling, const gchar* resource_privacy) { +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_graph_session_graph_upload_message_construct (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, host_session, access_token, relative_uri, publishable, suppress_titling, resource_privacy); +#line 10645 "FacebookPublishing.c" +} + + +static gboolean publishing_facebook_graph_session_graph_upload_message_real_prepare_for_transmission (PublishingFacebookGraphSessionGraphMessageImpl* base) { + PublishingFacebookGraphSessionGraphUploadMessage * self; + gboolean result = FALSE; + GMappedFile* _tmp0_ = NULL; +#line 1432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessage); +#line 1433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->mapped_file; +#line 1433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp0_ == NULL) { +#line 10659 "FacebookPublishing.c" + SpitPublishingPublishable* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GError* _tmp8_ = NULL; + GError* _tmp9_ = NULL; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->publishable; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = spit_publishing_publishable_get_serialized_file (_tmp1_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _tmp2_; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = g_file_get_path (_tmp3_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _tmp4_; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = g_strdup_printf ("File %s is unavailable.", _tmp5_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp7_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = _tmp8_; +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, PublishingFacebookGraphMessage), "failed", _tmp9_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_error_free0 (_tmp9_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp5_); +#line 1434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (_tmp3_); +#line 1436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = FALSE; +#line 1436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 10701 "FacebookPublishing.c" + } else { +#line 1438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = TRUE; +#line 1438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 10707 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_graph_session_graph_upload_message_class_init (PublishingFacebookGraphSessionGraphUploadMessageClass * klass) { +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_upload_message_parent_class = g_type_class_peek_parent (klass); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphMessageClass *) klass)->finalize = publishing_facebook_graph_session_graph_upload_message_finalize; +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookGraphSessionGraphUploadMessagePrivate)); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphSessionGraphMessageImplClass *) klass)->prepare_for_transmission = publishing_facebook_graph_session_graph_upload_message_real_prepare_for_transmission; +#line 10721 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_upload_message_instance_init (PublishingFacebookGraphSessionGraphUploadMessage * self) { +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_GRAPH_SESSION_GRAPH_UPLOAD_MESSAGE_GET_PRIVATE (self); +#line 1368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->mapped_file = NULL; +#line 10730 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_upload_message_finalize (PublishingFacebookGraphMessage* obj) { + PublishingFacebookGraphSessionGraphUploadMessage * self; +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_UPLOAD_MESSAGE, PublishingFacebookGraphSessionGraphUploadMessage); +#line 1368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_mapped_file_unref0 (self->priv->mapped_file); +#line 1369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_GRAPH_MESSAGE_CLASS (publishing_facebook_graph_session_graph_upload_message_parent_class)->finalize (obj); +#line 10744 "FacebookPublishing.c" +} + + +static GType publishing_facebook_graph_session_graph_upload_message_get_type (void) { + static volatile gsize publishing_facebook_graph_session_graph_upload_message_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_graph_upload_message_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionGraphUploadMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_graph_upload_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSessionGraphUploadMessage), 0, (GInstanceInitFunc) publishing_facebook_graph_session_graph_upload_message_instance_init, NULL }; + GType publishing_facebook_graph_session_graph_upload_message_type_id; + publishing_facebook_graph_session_graph_upload_message_type_id = g_type_register_static (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, "PublishingFacebookGraphSessionGraphUploadMessage", &g_define_type_info, 0); + g_once_init_leave (&publishing_facebook_graph_session_graph_upload_message_type_id__volatile, publishing_facebook_graph_session_graph_upload_message_type_id); + } + return publishing_facebook_graph_session_graph_upload_message_type_id__volatile; +} + + +static PublishingFacebookGraphSessionGraphCreateAlbumMessage* publishing_facebook_graph_session_graph_create_album_message_construct (GType object_type, PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* album_name, const gchar* album_privacy) { + PublishingFacebookGraphSessionGraphCreateAlbumMessage* self = NULL; + PublishingFacebookGraphSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + const gchar* _tmp3_ = NULL; + PublishingRESTSupportHttpMethod _tmp5_ = 0; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + SoupURI* _tmp9_ = NULL; + SoupURI* _tmp10_ = NULL; + SoupMessage* _tmp11_ = NULL; + SoupMultipart* mp_envelope = NULL; + SoupMultipart* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + SoupMessage* _tmp16_ = NULL; + SoupMessageHeaders* _tmp17_ = NULL; + SoupMessage* _tmp18_ = NULL; + SoupMessageBody* _tmp19_ = NULL; +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (host_session), NULL); +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (access_token != NULL, NULL); +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (album_name != NULL, NULL); +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (album_privacy != NULL, NULL); +#line 1446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = host_session; +#line 1446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = access_token; +#line 1446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookGraphSessionGraphCreateAlbumMessage*) publishing_facebook_graph_session_graph_message_impl_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST, "/me/albums", _tmp1_, PUBLISHING_FACEBOOK_ENDPOINT_DEFAULT); +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = album_privacy; +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp3_ != NULL) { +#line 10800 "FacebookPublishing.c" + const gchar* _tmp4_ = NULL; +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = album_privacy; +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = g_strcmp0 (_tmp4_, "") != 0; +#line 10806 "FacebookPublishing.c" + } else { +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = FALSE; +#line 10810 "FacebookPublishing.c" + } +#line 1448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _vala_assert (_tmp2_, "album_privacy != null && album_privacy != \"\""); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->method; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = publishing_rest_support_http_method_to_string (_tmp5_); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = _tmp6_; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->uri; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = soup_uri_new (_tmp8_); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = _tmp9_; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = soup_message_new_from_uri (_tmp7_, _tmp10_); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message = _tmp11_; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupURI_free0 (_tmp10_); +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp7_); +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = soup_multipart_new ("multipart/form-data"); +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + mp_envelope = _tmp12_; +#line 1454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = access_token; +#line 1454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (mp_envelope, "access_token", _tmp13_); +#line 1455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = album_name; +#line 1455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (mp_envelope, "name", _tmp14_); +#line 1456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = album_privacy; +#line 1456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_append_form_string (mp_envelope, "privacy", _tmp15_); +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = _tmp16_->request_headers; +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, PublishingFacebookGraphSessionGraphMessageImpl)->soup_message; +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = _tmp18_->request_body; +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + soup_multipart_to_message (mp_envelope, _tmp17_, _tmp19_); +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + __vala_SoupMultipart_free0 (mp_envelope); +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 10866 "FacebookPublishing.c" +} + + +static PublishingFacebookGraphSessionGraphCreateAlbumMessage* publishing_facebook_graph_session_graph_create_album_message_new (PublishingFacebookGraphSession* host_session, const gchar* access_token, const gchar* album_name, const gchar* album_privacy) { +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_graph_session_graph_create_album_message_construct (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_CREATE_ALBUM_MESSAGE, host_session, access_token, album_name, album_privacy); +#line 10873 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_create_album_message_class_init (PublishingFacebookGraphSessionGraphCreateAlbumMessageClass * klass) { +#line 1443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_graph_create_album_message_parent_class = g_type_class_peek_parent (klass); +#line 10880 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_graph_create_album_message_instance_init (PublishingFacebookGraphSessionGraphCreateAlbumMessage * self) { +} + + +static GType publishing_facebook_graph_session_graph_create_album_message_get_type (void) { + static volatile gsize publishing_facebook_graph_session_graph_create_album_message_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_graph_create_album_message_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionGraphCreateAlbumMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_graph_create_album_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSessionGraphCreateAlbumMessage), 0, (GInstanceInitFunc) publishing_facebook_graph_session_graph_create_album_message_instance_init, NULL }; + GType publishing_facebook_graph_session_graph_create_album_message_type_id; + publishing_facebook_graph_session_graph_create_album_message_type_id = g_type_register_static (PUBLISHING_FACEBOOK_GRAPH_SESSION_TYPE_GRAPH_MESSAGE_IMPL, "PublishingFacebookGraphSessionGraphCreateAlbumMessage", &g_define_type_info, 0); + g_once_init_leave (&publishing_facebook_graph_session_graph_create_album_message_type_id__volatile, publishing_facebook_graph_session_graph_create_album_message_type_id); + } + return publishing_facebook_graph_session_graph_create_album_message_type_id__volatile; +} + + +static void publishing_facebook_value_graph_session_init (GValue* value) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 10903 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_graph_session_free_value (GValue* value) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_unref (value->data[0].v_pointer); +#line 10912 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_graph_session_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_graph_session_ref (src_value->data[0].v_pointer); +#line 10922 "FacebookPublishing.c" + } else { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 10926 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_value_graph_session_peek_pointer (const GValue* value) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 10934 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_graph_session_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 10941 "FacebookPublishing.c" + PublishingFacebookGraphSession* object; + object = collect_values[0].v_pointer; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 10948 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 10952 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_graph_session_ref (object); +#line 10956 "FacebookPublishing.c" + } else { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 10960 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 10964 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_graph_session_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookGraphSession** object_p; + object_p = collect_values[0].v_pointer; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 10975 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 10981 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 10985 "FacebookPublishing.c" + } else { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_graph_session_ref (value->data[0].v_pointer); +#line 10989 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 10993 "FacebookPublishing.c" +} + + +GParamSpec* publishing_facebook_param_spec_graph_session (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookParamSpecGraphSession* spec; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION), NULL); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 11007 "FacebookPublishing.c" +} + + +gpointer publishing_facebook_value_get_graph_session (const GValue* value) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION), NULL); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 11016 "FacebookPublishing.c" +} + + +void publishing_facebook_value_set_graph_session (GValue* value, gpointer v_object) { + PublishingFacebookGraphSession* old; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_ref (value->data[0].v_pointer); +#line 11036 "FacebookPublishing.c" + } else { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11040 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_unref (old); +#line 11046 "FacebookPublishing.c" + } +} + + +void publishing_facebook_value_take_graph_session (GValue* value, gpointer v_object) { + PublishingFacebookGraphSession* old; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION)); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 11065 "FacebookPublishing.c" + } else { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11069 "FacebookPublishing.c" + } +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_unref (old); +#line 11075 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_graph_session_class_init (PublishingFacebookGraphSessionClass * klass) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_parent_class = g_type_class_peek_parent (klass); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookGraphSessionClass *) klass)->finalize = publishing_facebook_graph_session_finalize; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookGraphSessionPrivate)); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("authenticated", PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 11089 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_instance_init (PublishingFacebookGraphSession * self) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_GRAPH_SESSION_GET_PRIVATE (self); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 11098 "FacebookPublishing.c" +} + + +static void publishing_facebook_graph_session_finalize (PublishingFacebookGraphSession* obj) { + PublishingFacebookGraphSession * self; + SoupSession* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_GRAPH_SESSION, PublishingFacebookGraphSession); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 1478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->soup_session; +#line 1478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("request-unqueued", soup_session_get_type (), &_tmp1_, NULL, FALSE); +#line 1478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_graph_session_on_request_unqueued_soup_session_request_unqueued, self); +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (self->priv->soup_session); +#line 1465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (self->priv->access_token); +#line 1466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (self->priv->current_message); +#line 11122 "FacebookPublishing.c" +} + + +GType publishing_facebook_graph_session_get_type (void) { + static volatile gsize publishing_facebook_graph_session_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_graph_session_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_value_graph_session_init, publishing_facebook_value_graph_session_free_value, publishing_facebook_value_graph_session_copy_value, publishing_facebook_value_graph_session_peek_pointer, "p", publishing_facebook_value_graph_session_collect_value, "p", publishing_facebook_value_graph_session_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookGraphSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_graph_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookGraphSession), 0, (GInstanceInitFunc) publishing_facebook_graph_session_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_facebook_graph_session_type_id; + publishing_facebook_graph_session_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookGraphSession", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_graph_session_type_id__volatile, publishing_facebook_graph_session_type_id); + } + return publishing_facebook_graph_session_type_id__volatile; +} + + +gpointer publishing_facebook_graph_session_ref (gpointer instance) { + PublishingFacebookGraphSession* self; + self = instance; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 11147 "FacebookPublishing.c" +} + + +void publishing_facebook_graph_session_unref (gpointer instance) { + PublishingFacebookGraphSession* self; + self = instance; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_GRAPH_SESSION_GET_CLASS (self)->finalize (self); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 11160 "FacebookPublishing.c" + } +} + + +static SpitPublishingPublishable** _vala_array_dup3 (SpitPublishingPublishable** self, int length) { + SpitPublishingPublishable** result; + int i; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result = g_new0 (SpitPublishingPublishable*, length + 1); +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + for (i = 0; i < length; i++) { +#line 11172 "FacebookPublishing.c" + SpitPublishingPublishable* _tmp0_ = NULL; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + result[i] = _tmp0_; +#line 11178 "FacebookPublishing.c" + } +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return result; +#line 11182 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_graph_session_ref0 (gpointer self) { +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_graph_session_ref (self) : NULL; +#line 11189 "FacebookPublishing.c" +} + + +static gpointer _publishing_facebook_publishing_parameters_ref0 (gpointer self) { +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self ? publishing_facebook_publishing_parameters_ref (self) : NULL; +#line 11196 "FacebookPublishing.c" +} + + +PublishingFacebookUploader* publishing_facebook_uploader_construct (GType object_type, PublishingFacebookGraphSession* session, PublishingFacebookPublishingParameters* publishing_params, SpitPublishingPublishable** publishables, int publishables_length1) { + PublishingFacebookUploader* self = NULL; + SpitPublishingPublishable** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingFacebookGraphSession* _tmp2_ = NULL; + PublishingFacebookGraphSession* _tmp3_ = NULL; + PublishingFacebookPublishingParameters* _tmp4_ = NULL; + PublishingFacebookPublishingParameters* _tmp5_ = NULL; +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_SESSION (session), NULL); +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (PUBLISHING_FACEBOOK_IS_PUBLISHING_PARAMETERS (publishing_params), NULL); +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = (PublishingFacebookUploader*) g_type_create_instance (object_type); +#line 1624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_file = 0; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = publishables; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = publishables_length1; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = _tmp0__length1; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishables = _tmp1_; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishables_length1 = _tmp1__length1; +#line 1625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->_publishables_size_ = self->priv->publishables_length1; +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = session; +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _publishing_facebook_graph_session_ref0 (_tmp2_); +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_session_unref0 (self->priv->session); +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->session = _tmp3_; +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishing_params; +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = _publishing_facebook_publishing_parameters_ref0 (_tmp4_); +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_parameters_unref0 (self->priv->publishing_params); +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishing_params = _tmp5_; +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return self; +#line 11252 "FacebookPublishing.c" +} + + +PublishingFacebookUploader* publishing_facebook_uploader_new (PublishingFacebookGraphSession* session, PublishingFacebookPublishingParameters* publishing_params, SpitPublishingPublishable** publishables, int publishables_length1) { +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return publishing_facebook_uploader_construct (PUBLISHING_FACEBOOK_TYPE_UPLOADER, session, publishing_params, publishables, publishables_length1); +#line 11259 "FacebookPublishing.c" +} + + +static void _publishing_facebook_uploader_on_chunk_transmitted_publishing_facebook_graph_message_data_transmitted (PublishingFacebookGraphMessage* _sender, gint bytes_sent_so_far, gint total_bytes, gpointer self) { +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_on_chunk_transmitted ((PublishingFacebookUploader*) self, bytes_sent_so_far, total_bytes); +#line 11266 "FacebookPublishing.c" +} + + +static void _publishing_facebook_uploader_on_message_completed_publishing_facebook_graph_message_completed (PublishingFacebookGraphMessage* _sender, gpointer self) { +#line 1650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_on_message_completed ((PublishingFacebookUploader*) self, _sender); +#line 11273 "FacebookPublishing.c" +} + + +static void _publishing_facebook_uploader_on_message_failed_publishing_facebook_graph_message_failed (PublishingFacebookGraphMessage* _sender, GError* err, gpointer self) { +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_on_message_failed ((PublishingFacebookUploader*) self, _sender, err); +#line 11280 "FacebookPublishing.c" +} + + +static void publishing_facebook_uploader_send_current_file (PublishingFacebookUploader* self) { + SpitPublishingPublishable* publishable = NULL; + SpitPublishingPublishable** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + gint _tmp1_ = 0; + SpitPublishingPublishable* _tmp2_ = NULL; + SpitPublishingPublishable* _tmp3_ = NULL; + GFile* file = NULL; + SpitPublishingPublishable* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; + gchar* _tmp8_ = NULL; + SpitPublishingPublishable* _tmp9_ = NULL; + SpitPublishingPublisherMediaType _tmp10_ = 0; + gchar* resource_uri = NULL; + gchar* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + SpitPublishingPublishable* _tmp18_ = NULL; + SpitPublishingPublisherMediaType _tmp19_ = 0; + gchar* resource_privacy = NULL; + gchar* _tmp22_ = NULL; + PublishingFacebookGraphMessage* upload_message = NULL; + PublishingFacebookGraphSession* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + SpitPublishingPublishable* _tmp25_ = NULL; + PublishingFacebookPublishingParameters* _tmp26_ = NULL; + gboolean _tmp27_ = FALSE; + const gchar* _tmp28_ = NULL; + PublishingFacebookGraphMessage* _tmp29_ = NULL; + PublishingFacebookGraphMessage* _tmp30_ = NULL; + PublishingFacebookGraphMessage* _tmp31_ = NULL; + PublishingFacebookGraphMessage* _tmp32_ = NULL; + PublishingFacebookGraphSession* _tmp33_ = NULL; + PublishingFacebookGraphMessage* _tmp34_ = NULL; +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publishables; +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->priv->publishables_length1; +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->current_file; +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = _tmp0_[_tmp1_]; +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishable = _tmp3_; +#line 1632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = publishable; +#line 1632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = spit_publishing_publishable_get_serialized_file (_tmp4_); +#line 1632 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + file = _tmp5_; +#line 1635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = file; +#line 1635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp6_ == NULL) { +#line 11342 "FacebookPublishing.c" + gint _tmp7_ = 0; +#line 1636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->current_file; +#line 1636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_file = _tmp7_ + 1; +#line 1637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (file); +#line 1637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (publishable); +#line 1637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return; +#line 11354 "FacebookPublishing.c" + } +#line 1641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = publishable; +#line 1641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = spit_publishing_publishable_get_media_type (_tmp9_); +#line 1641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp10_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) { +#line 11362 "FacebookPublishing.c" + PublishingFacebookPublishingParameters* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp11_ = self->priv->publishing_params; +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp12_ = publishing_facebook_publishing_parameters_get_target_album_id (_tmp11_); +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp13_ = _tmp12_; +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp14_ = g_strdup_printf ("/%s/photos", _tmp13_); +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp8_); +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp14_; +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp13_); +#line 11381 "FacebookPublishing.c" + } else { + gchar* _tmp15_ = NULL; +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp15_ = g_strdup ("/me/videos"); +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp8_); +#line 1642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = _tmp15_; +#line 11390 "FacebookPublishing.c" + } +#line 1640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp16_ = g_strdup (_tmp8_); +#line 1640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + resource_uri = _tmp16_; +#line 1644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp18_ = publishable; +#line 1644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp19_ = spit_publishing_publishable_get_media_type (_tmp18_); +#line 1644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp19_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 11402 "FacebookPublishing.c" + PublishingFacebookPublishingParameters* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; +#line 1645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp20_ = self->priv->publishing_params; +#line 1645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp21_ = _tmp20_->privacy_object; +#line 1645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = _tmp21_; +#line 11411 "FacebookPublishing.c" + } else { +#line 1645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp17_ = NULL; +#line 11415 "FacebookPublishing.c" + } +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp22_ = g_strdup (_tmp17_); +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + resource_privacy = _tmp22_; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp23_ = self->priv->session; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp24_ = resource_uri; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp25_ = publishable; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp26_ = self->priv->publishing_params; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp27_ = _tmp26_->strip_metadata; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp28_ = resource_privacy; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp29_ = publishing_facebook_graph_session_new_upload (_tmp23_, _tmp24_, _tmp25_, _tmp27_, _tmp28_); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + upload_message = _tmp29_; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp30_ = upload_message; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp30_, "data-transmitted", (GCallback) _publishing_facebook_uploader_on_chunk_transmitted_publishing_facebook_graph_message_data_transmitted, self); +#line 1650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp31_ = upload_message; +#line 1650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp31_, "completed", (GCallback) _publishing_facebook_uploader_on_message_completed_publishing_facebook_graph_message_completed, self); +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp32_ = upload_message; +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_connect (_tmp32_, "failed", (GCallback) _publishing_facebook_uploader_on_message_failed_publishing_facebook_graph_message_failed, self); +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp33_ = self->priv->session; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp34_ = upload_message; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_graph_session_send_message (_tmp33_, _tmp34_); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_message_unref0 (upload_message); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (resource_privacy); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (resource_uri); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_free0 (_tmp8_); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (file); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _g_object_unref0 (publishable); +#line 11467 "FacebookPublishing.c" +} + + +static void publishing_facebook_uploader_send_files (PublishingFacebookUploader* self) { +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_file = 0; +#line 1658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_send_current_file (self); +#line 11478 "FacebookPublishing.c" +} + + +static void publishing_facebook_uploader_on_chunk_transmitted (PublishingFacebookUploader* self, gint bytes_written_so_far, gint total_bytes) { + gdouble file_span = 0.0; + SpitPublishingPublishable** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + gdouble this_file_fraction_complete = 0.0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + gdouble fraction_complete = 0.0; + gint _tmp3_ = 0; + gdouble _tmp4_ = 0.0; + gdouble _tmp5_ = 0.0; + gdouble _tmp6_ = 0.0; + SpitPublishingProgressCallback _tmp7_ = NULL; + void* _tmp7__target = NULL; +#line 1661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = self->priv->publishables; +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__length1 = self->priv->publishables_length1; +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + file_span = 1.0 / _tmp0__length1; +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = bytes_written_so_far; +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = total_bytes; +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + this_file_fraction_complete = ((gdouble) _tmp1_) / _tmp2_; +#line 1664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp3_ = self->priv->current_file; +#line 1664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = file_span; +#line 1664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp5_ = this_file_fraction_complete; +#line 1664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = file_span; +#line 1664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + fraction_complete = (_tmp3_ * _tmp4_) + (_tmp5_ * _tmp6_); +#line 1667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->status_updated; +#line 1667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7__target = self->priv->status_updated_target; +#line 1667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp7_ != NULL) { +#line 11526 "FacebookPublishing.c" + SpitPublishingProgressCallback _tmp8_ = NULL; + void* _tmp8__target = NULL; + gint _tmp9_ = 0; + gdouble _tmp10_ = 0.0; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->status_updated; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8__target = self->priv->status_updated_target; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = self->priv->current_file; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp10_ = fraction_complete; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ (_tmp9_ + 1, _tmp10_, _tmp8__target); +#line 11541 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_uploader_on_message_completed (PublishingFacebookUploader* self, PublishingFacebookGraphMessage* message) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingFacebookGraphMessage* _tmp4_ = NULL; + guint _tmp5_ = 0U; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + SpitPublishingPublishable** _tmp8_ = NULL; + gint _tmp8__length1 = 0; +#line 1671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 1672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 1672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("data-transmitted", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 1672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_chunk_transmitted_publishing_facebook_graph_message_data_transmitted, self); +#line 1673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 1673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 1673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_message_completed_publishing_facebook_graph_message_completed, self); +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = message; +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp5_, NULL, FALSE); +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_message_failed_publishing_facebook_graph_message_failed, self); +#line 1676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = self->priv->current_file; +#line 1676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->current_file = _tmp6_ + 1; +#line 1677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp7_ = self->priv->current_file; +#line 1677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8_ = self->priv->publishables; +#line 1677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp8__length1 = self->priv->publishables_length1; +#line 1677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp7_ < _tmp8__length1) { +#line 1678 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_send_current_file (self); +#line 11593 "FacebookPublishing.c" + } else { + gint _tmp9_ = 0; +#line 1680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp9_ = self->priv->current_file; +#line 1680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "upload-complete", _tmp9_); +#line 11600 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_uploader_on_message_failed (PublishingFacebookUploader* self, PublishingFacebookGraphMessage* message, GError* _error_) { + PublishingFacebookGraphMessage* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFacebookGraphMessage* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingFacebookGraphMessage* _tmp4_ = NULL; + guint _tmp5_ = 0U; + GError* _tmp6_ = NULL; +#line 1684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_GRAPH_MESSAGE (message)); +#line 1685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = message; +#line 1685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("data-transmitted", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp1_, NULL, FALSE); +#line 1685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_chunk_transmitted_publishing_facebook_graph_message_data_transmitted, self); +#line 1686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp2_ = message; +#line 1686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp3_, NULL, FALSE); +#line 1686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_message_completed_publishing_facebook_graph_message_completed, self); +#line 1687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp4_ = message; +#line 1687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_parse_name ("failed", PUBLISHING_FACEBOOK_TYPE_GRAPH_MESSAGE, &_tmp5_, NULL, FALSE); +#line 1687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_facebook_uploader_on_message_failed_publishing_facebook_graph_message_failed, self); +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp6_ = _error_; +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_emit_by_name (self, "upload-error", _tmp6_); +#line 11639 "FacebookPublishing.c" +} + + +void publishing_facebook_uploader_upload (PublishingFacebookUploader* self, SpitPublishingProgressCallback status_updated, void* status_updated_target) { + SpitPublishingProgressCallback _tmp0_ = NULL; + void* _tmp0__target = NULL; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 1692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (PUBLISHING_FACEBOOK_IS_UPLOADER (self)); +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0_ = status_updated; +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp0__target = status_updated_target; +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->status_updated = _tmp0_; +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->status_updated_target = _tmp0__target; +#line 1695 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1_ = self->priv->publishables; +#line 1695 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _tmp1__length1 = self->priv->publishables_length1; +#line 1695 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (_tmp1__length1 > 0) { +#line 1696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_send_files (self); +#line 11666 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_uploader_init (GValue* value) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11674 "FacebookPublishing.c" +} + + +static void publishing_facebook_value_uploader_free_value (GValue* value) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (value->data[0].v_pointer) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_unref (value->data[0].v_pointer); +#line 11683 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_value_uploader_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = publishing_facebook_uploader_ref (src_value->data[0].v_pointer); +#line 11693 "FacebookPublishing.c" + } else { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 11697 "FacebookPublishing.c" + } +} + + +static gpointer publishing_facebook_value_uploader_peek_pointer (const GValue* value) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 11705 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_uploader_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (collect_values[0].v_pointer) { +#line 11712 "FacebookPublishing.c" + PublishingFacebookUploader* object; + object = collect_values[0].v_pointer; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 11719 "FacebookPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.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 11723 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = publishing_facebook_uploader_ref (object); +#line 11727 "FacebookPublishing.c" + } else { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11731 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 11735 "FacebookPublishing.c" +} + + +static gchar* publishing_facebook_value_uploader_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFacebookUploader** object_p; + object_p = collect_values[0].v_pointer; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!object_p) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 11746 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = NULL; +#line 11752 "FacebookPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 11756 "FacebookPublishing.c" + } else { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + *object_p = publishing_facebook_uploader_ref (value->data[0].v_pointer); +#line 11760 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return NULL; +#line 11764 "FacebookPublishing.c" +} + + +GParamSpec* publishing_facebook_param_spec_uploader (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFacebookParamSpecUploader* spec; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FACEBOOK_TYPE_UPLOADER), NULL); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return G_PARAM_SPEC (spec); +#line 11778 "FacebookPublishing.c" +} + + +gpointer publishing_facebook_value_get_uploader (const GValue* value) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_UPLOADER), NULL); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return value->data[0].v_pointer; +#line 11787 "FacebookPublishing.c" +} + + +void publishing_facebook_value_set_uploader (GValue* value, gpointer v_object) { + PublishingFacebookUploader* old; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_UPLOADER)); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_UPLOADER)); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_ref (value->data[0].v_pointer); +#line 11807 "FacebookPublishing.c" + } else { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11811 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_unref (old); +#line 11817 "FacebookPublishing.c" + } +} + + +void publishing_facebook_value_take_uploader (GValue* value, gpointer v_object) { + PublishingFacebookUploader* old; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FACEBOOK_TYPE_UPLOADER)); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + old = value->data[0].v_pointer; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (v_object) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FACEBOOK_TYPE_UPLOADER)); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = v_object; +#line 11836 "FacebookPublishing.c" + } else { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + value->data[0].v_pointer = NULL; +#line 11840 "FacebookPublishing.c" + } +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (old) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_unref (old); +#line 11846 "FacebookPublishing.c" + } +} + + +static void publishing_facebook_uploader_class_init (PublishingFacebookUploaderClass * klass) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + publishing_facebook_uploader_parent_class = g_type_class_peek_parent (klass); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + ((PublishingFacebookUploaderClass *) klass)->finalize = publishing_facebook_uploader_finalize; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFacebookUploaderPrivate)); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("upload_complete", PUBLISHING_FACEBOOK_TYPE_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_new ("upload_error", PUBLISHING_FACEBOOK_TYPE_UPLOADER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); +#line 11862 "FacebookPublishing.c" +} + + +static void publishing_facebook_uploader_instance_init (PublishingFacebookUploader * self) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv = PUBLISHING_FACEBOOK_UPLOADER_GET_PRIVATE (self); +#line 1617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->status_updated = NULL; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->ref_count = 1; +#line 11873 "FacebookPublishing.c" +} + + +static void publishing_facebook_uploader_finalize (PublishingFacebookUploader* obj) { + PublishingFacebookUploader * self; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FACEBOOK_TYPE_UPLOADER, PublishingFacebookUploader); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_signal_handlers_destroy (self); +#line 1614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + self->priv->publishables = (_vala_array_free (self->priv->publishables, self->priv->publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 1615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_graph_session_unref0 (self->priv->session); +#line 1616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + _publishing_facebook_publishing_parameters_unref0 (self->priv->publishing_params); +#line 11889 "FacebookPublishing.c" +} + + +GType publishing_facebook_uploader_get_type (void) { + static volatile gsize publishing_facebook_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_facebook_uploader_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_facebook_value_uploader_init, publishing_facebook_value_uploader_free_value, publishing_facebook_value_uploader_copy_value, publishing_facebook_value_uploader_peek_pointer, "p", publishing_facebook_value_uploader_collect_value, "p", publishing_facebook_value_uploader_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFacebookUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_facebook_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFacebookUploader), 0, (GInstanceInitFunc) publishing_facebook_uploader_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_facebook_uploader_type_id; + publishing_facebook_uploader_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFacebookUploader", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_facebook_uploader_type_id__volatile, publishing_facebook_uploader_type_id); + } + return publishing_facebook_uploader_type_id__volatile; +} + + +gpointer publishing_facebook_uploader_ref (gpointer instance) { + PublishingFacebookUploader* self; + self = instance; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + return instance; +#line 11914 "FacebookPublishing.c" +} + + +void publishing_facebook_uploader_unref (gpointer instance) { + PublishingFacebookUploader* self; + self = instance; +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + PUBLISHING_FACEBOOK_UPLOADER_GET_CLASS (self)->finalize (self); +#line 1612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FacebookPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 11927 "FacebookPublishing.c" + } +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + +static gint _vala_array_length (gpointer array) { + int length; + length = 0; + if (array) { + while (((gpointer*) array)[length]) { + length++; + } + } + return length; +} + + + diff --git a/plugins/shotwell-publishing/FacebookPublishing.vala b/plugins/shotwell-publishing/FacebookPublishing.vala index f6cccb6..608e5c5 100644 --- a/plugins/shotwell-publishing/FacebookPublishing.vala +++ b/plugins/shotwell-publishing/FacebookPublishing.vala @@ -11,7 +11,8 @@ public class FacebookService : Object, Spit.Pluggable, Spit.Publishing.Service { public FacebookService(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = Resources.load_from_resource + (Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { @@ -364,9 +365,8 @@ public class FacebookPublisher : Spit.Publishing.Publisher, GLib.Object { try { // the trailing get_path() is required, since add_from_file can't cope // with File objects directly and expects a pathname instead. - builder.add_from_file( - host.get_module_file().get_parent(). - get_child("facebook_publishing_options_pane.glade").get_path()); + builder.add_from_resource (Resources.RESOURCE_PATH + "/" + + "facebook_publishing_options_pane.ui"); } catch (Error e) { warning("Could not parse UI file! Error: %s.", e.message); host.post_error( diff --git a/plugins/shotwell-publishing/FlickrPublishing.c b/plugins/shotwell-publishing/FlickrPublishing.c new file mode 100644 index 0000000..b4d74aa --- /dev/null +++ b/plugins/shotwell-publishing/FlickrPublishing.c @@ -0,0 +1,10304 @@ +/* FlickrPublishing.c generated by valac 0.32.1, the Vala compiler + * generated from FlickrPublishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include "shotwell-plugin-common.h" +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <gtk/gtk.h> +#include <libxml/tree.h> +#include <gee.h> +#include <libsoup/soup.h> +#include <gexiv2/gexiv2.h> +#include <gobject/gvaluecollector.h> + + +#define TYPE_FLICKR_SERVICE (flickr_service_get_type ()) +#define FLICKR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLICKR_SERVICE, FlickrService)) +#define FLICKR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FLICKR_SERVICE, FlickrServiceClass)) +#define IS_FLICKR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLICKR_SERVICE)) +#define IS_FLICKR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FLICKR_SERVICE)) +#define FLICKR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FLICKR_SERVICE, FlickrServiceClass)) + +typedef struct _FlickrService FlickrService; +typedef struct _FlickrServiceClass FlickrServiceClass; +typedef struct _FlickrServicePrivate FlickrServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER (publishing_flickr_flickr_publisher_get_type ()) +#define PUBLISHING_FLICKR_FLICKR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher)) +#define PUBLISHING_FLICKR_FLICKR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisherClass)) +#define PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER)) +#define PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER)) +#define PUBLISHING_FLICKR_FLICKR_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisherClass)) + +typedef struct _PublishingFlickrFlickrPublisher PublishingFlickrFlickrPublisher; +typedef struct _PublishingFlickrFlickrPublisherClass PublishingFlickrFlickrPublisherClass; + +#define PUBLISHING_FLICKR_TYPE_USER_KIND (publishing_flickr_user_kind_get_type ()) + +#define PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION (publishing_flickr_visibility_specification_get_type ()) +#define PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, PublishingFlickrVisibilitySpecification)) +#define PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, PublishingFlickrVisibilitySpecificationClass)) +#define PUBLISHING_FLICKR_IS_VISIBILITY_SPECIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)) +#define PUBLISHING_FLICKR_IS_VISIBILITY_SPECIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)) +#define PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, PublishingFlickrVisibilitySpecificationClass)) + +typedef struct _PublishingFlickrVisibilitySpecification PublishingFlickrVisibilitySpecification; +typedef struct _PublishingFlickrVisibilitySpecificationClass PublishingFlickrVisibilitySpecificationClass; +typedef struct _PublishingFlickrVisibilitySpecificationPrivate PublishingFlickrVisibilitySpecificationPrivate; +typedef struct _PublishingFlickrParamSpecVisibilitySpecification PublishingFlickrParamSpecVisibilitySpecification; + +#define PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS (publishing_flickr_publishing_parameters_get_type ()) +#define PUBLISHING_FLICKR_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS, PublishingFlickrPublishingParameters)) +#define PUBLISHING_FLICKR_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS, PublishingFlickrPublishingParametersClass)) +#define PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_FLICKR_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS, PublishingFlickrPublishingParametersClass)) + +typedef struct _PublishingFlickrPublishingParameters PublishingFlickrPublishingParameters; +typedef struct _PublishingFlickrPublishingParametersClass PublishingFlickrPublishingParametersClass; +typedef struct _PublishingFlickrPublishingParametersPrivate PublishingFlickrPublishingParametersPrivate; +#define _publishing_flickr_visibility_specification_unref0(var) ((var == NULL) ? NULL : (var = (publishing_flickr_visibility_specification_unref (var), NULL))) +typedef struct _PublishingFlickrParamSpecPublishingParameters PublishingFlickrParamSpecPublishingParameters; +typedef struct _PublishingFlickrFlickrPublisherPrivate PublishingFlickrFlickrPublisherPrivate; + +#define PUBLISHING_FLICKR_TYPE_SESSION (publishing_flickr_session_get_type ()) +#define PUBLISHING_FLICKR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession)) +#define PUBLISHING_FLICKR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionClass)) +#define PUBLISHING_FLICKR_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_SESSION)) +#define PUBLISHING_FLICKR_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_SESSION)) +#define PUBLISHING_FLICKR_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionClass)) + +typedef struct _PublishingFlickrSession PublishingFlickrSession; +typedef struct _PublishingFlickrSessionClass PublishingFlickrSessionClass; + +#define PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE (publishing_flickr_publishing_options_pane_get_type ()) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPaneClass)) +#define PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPaneClass)) + +typedef struct _PublishingFlickrPublishingOptionsPane PublishingFlickrPublishingOptionsPane; +typedef struct _PublishingFlickrPublishingOptionsPaneClass PublishingFlickrPublishingOptionsPaneClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) +#define _publishing_flickr_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_flickr_publishing_parameters_unref (var), NULL))) + +#define PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE (publishing_flickr_pin_entry_pane_get_type ()) +#define PUBLISHING_FLICKR_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane)) +#define PUBLISHING_FLICKR_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPaneClass)) +#define PUBLISHING_FLICKR_IS_PIN_ENTRY_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE)) +#define PUBLISHING_FLICKR_IS_PIN_ENTRY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE)) +#define PUBLISHING_FLICKR_PIN_ENTRY_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPaneClass)) + +typedef struct _PublishingFlickrPinEntryPane PublishingFlickrPinEntryPane; +typedef struct _PublishingFlickrPinEntryPaneClass PublishingFlickrPinEntryPaneClass; + +#define PUBLISHING_FLICKR_TYPE_TRANSACTION (publishing_flickr_transaction_get_type ()) +#define PUBLISHING_FLICKR_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransaction)) +#define PUBLISHING_FLICKR_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransactionClass)) +#define PUBLISHING_FLICKR_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION)) +#define PUBLISHING_FLICKR_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_TRANSACTION)) +#define PUBLISHING_FLICKR_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransactionClass)) + +typedef struct _PublishingFlickrTransaction PublishingFlickrTransaction; +typedef struct _PublishingFlickrTransactionClass PublishingFlickrTransactionClass; + +#define PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION (publishing_flickr_authentication_request_transaction_get_type ()) +#define PUBLISHING_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingFlickrAuthenticationRequestTransaction)) +#define PUBLISHING_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingFlickrAuthenticationRequestTransactionClass)) +#define PUBLISHING_FLICKR_IS_AUTHENTICATION_REQUEST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION)) +#define PUBLISHING_FLICKR_IS_AUTHENTICATION_REQUEST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION)) +#define PUBLISHING_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, PublishingFlickrAuthenticationRequestTransactionClass)) + +typedef struct _PublishingFlickrAuthenticationRequestTransaction PublishingFlickrAuthenticationRequestTransaction; +typedef struct _PublishingFlickrAuthenticationRequestTransactionClass PublishingFlickrAuthenticationRequestTransactionClass; +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION (publishing_flickr_access_token_fetch_transaction_get_type ()) +#define PUBLISHING_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingFlickrAccessTokenFetchTransaction)) +#define PUBLISHING_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingFlickrAccessTokenFetchTransactionClass)) +#define PUBLISHING_FLICKR_IS_ACCESS_TOKEN_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) +#define PUBLISHING_FLICKR_IS_ACCESS_TOKEN_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION)) +#define PUBLISHING_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, PublishingFlickrAccessTokenFetchTransactionClass)) + +typedef struct _PublishingFlickrAccessTokenFetchTransaction PublishingFlickrAccessTokenFetchTransaction; +typedef struct _PublishingFlickrAccessTokenFetchTransactionClass PublishingFlickrAccessTokenFetchTransactionClass; + +#define PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION (publishing_flickr_account_info_fetch_transaction_get_type ()) +#define PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, PublishingFlickrAccountInfoFetchTransaction)) +#define PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, PublishingFlickrAccountInfoFetchTransactionClass)) +#define PUBLISHING_FLICKR_IS_ACCOUNT_INFO_FETCH_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION)) +#define PUBLISHING_FLICKR_IS_ACCOUNT_INFO_FETCH_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION)) +#define PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, PublishingFlickrAccountInfoFetchTransactionClass)) + +typedef struct _PublishingFlickrAccountInfoFetchTransaction PublishingFlickrAccountInfoFetchTransaction; +typedef struct _PublishingFlickrAccountInfoFetchTransactionClass PublishingFlickrAccountInfoFetchTransactionClass; +#define _publishing_rest_support_xml_document_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_xml_document_unref (var), NULL))) +#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL))) + +#define PUBLISHING_FLICKR_TYPE_UPLOADER (publishing_flickr_uploader_get_type ()) +#define PUBLISHING_FLICKR_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploader)) +#define PUBLISHING_FLICKR_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploaderClass)) +#define PUBLISHING_FLICKR_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_UPLOADER)) +#define PUBLISHING_FLICKR_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_UPLOADER)) +#define PUBLISHING_FLICKR_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploaderClass)) + +typedef struct _PublishingFlickrUploader PublishingFlickrUploader; +typedef struct _PublishingFlickrUploaderClass PublishingFlickrUploaderClass; +#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) +typedef struct _PublishingFlickrPinEntryPanePrivate PublishingFlickrPinEntryPanePrivate; +#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) +typedef struct _PublishingFlickrTransactionPrivate PublishingFlickrTransactionPrivate; +typedef struct _PublishingFlickrAuthenticationRequestTransactionPrivate PublishingFlickrAuthenticationRequestTransactionPrivate; +typedef struct _PublishingFlickrAccessTokenFetchTransactionPrivate PublishingFlickrAccessTokenFetchTransactionPrivate; +typedef struct _PublishingFlickrAccountInfoFetchTransactionPrivate PublishingFlickrAccountInfoFetchTransactionPrivate; + +#define PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION (publishing_flickr_upload_transaction_get_type ()) +#define PUBLISHING_FLICKR_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransaction)) +#define PUBLISHING_FLICKR_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransactionClass)) +#define PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_FLICKR_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransactionClass)) + +typedef struct _PublishingFlickrUploadTransaction PublishingFlickrUploadTransaction; +typedef struct _PublishingFlickrUploadTransactionClass PublishingFlickrUploadTransactionClass; +typedef struct _PublishingFlickrUploadTransactionPrivate PublishingFlickrUploadTransactionPrivate; +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) +typedef struct _PublishingFlickrSessionPrivate PublishingFlickrSessionPrivate; +#define _publishing_rest_support_argument_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_argument_unref (var), NULL))) +typedef struct _PublishingFlickrPublishingOptionsPanePrivate PublishingFlickrPublishingOptionsPanePrivate; + +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY (publishing_flickr_publishing_options_pane_visibility_entry_get_type ()) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, PublishingFlickrPublishingOptionsPaneVisibilityEntry)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, PublishingFlickrPublishingOptionsPaneVisibilityEntryClass)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_IS_VISIBILITY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_IS_VISIBILITY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, PublishingFlickrPublishingOptionsPaneVisibilityEntryClass)) + +typedef struct _PublishingFlickrPublishingOptionsPaneVisibilityEntry PublishingFlickrPublishingOptionsPaneVisibilityEntry; +typedef struct _PublishingFlickrPublishingOptionsPaneVisibilityEntryClass PublishingFlickrPublishingOptionsPaneVisibilityEntryClass; + +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY (publishing_flickr_publishing_options_pane_size_entry_get_type ()) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, PublishingFlickrPublishingOptionsPaneSizeEntry)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, PublishingFlickrPublishingOptionsPaneSizeEntryClass)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_IS_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_IS_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)) +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, PublishingFlickrPublishingOptionsPaneSizeEntryClass)) + +typedef struct _PublishingFlickrPublishingOptionsPaneSizeEntry PublishingFlickrPublishingOptionsPaneSizeEntry; +typedef struct _PublishingFlickrPublishingOptionsPaneSizeEntryClass PublishingFlickrPublishingOptionsPaneSizeEntryClass; +typedef struct _PublishingFlickrPublishingOptionsPaneVisibilityEntryPrivate PublishingFlickrPublishingOptionsPaneVisibilityEntryPrivate; +typedef struct _PublishingFlickrPublishingOptionsPaneSizeEntryPrivate PublishingFlickrPublishingOptionsPaneSizeEntryPrivate; +#define _publishing_flickr_publishing_options_pane_visibility_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_flickr_publishing_options_pane_visibility_entry_unref (var), NULL))) +#define _publishing_flickr_publishing_options_pane_size_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_flickr_publishing_options_pane_size_entry_unref (var), NULL))) +typedef struct _PublishingFlickrPublishingOptionsPaneParamSpecSizeEntry PublishingFlickrPublishingOptionsPaneParamSpecSizeEntry; +typedef struct _PublishingFlickrPublishingOptionsPaneParamSpecVisibilityEntry PublishingFlickrPublishingOptionsPaneParamSpecVisibilityEntry; +typedef struct _PublishingFlickrUploaderPrivate PublishingFlickrUploaderPrivate; +#define _gexiv2_metadata_free0(var) ((var == NULL) ? NULL : (var = (gexiv2_metadata_free (var), NULL))) +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _FlickrService { + GObject parent_instance; + FlickrServicePrivate * priv; +}; + +struct _FlickrServiceClass { + GObjectClass parent_class; +}; + +typedef enum { + PUBLISHING_FLICKR_USER_KIND_PRO, + PUBLISHING_FLICKR_USER_KIND_FREE +} PublishingFlickrUserKind; + +struct _PublishingFlickrVisibilitySpecification { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFlickrVisibilitySpecificationPrivate * priv; + gint friends_level; + gint family_level; + gint everyone_level; +}; + +struct _PublishingFlickrVisibilitySpecificationClass { + GTypeClass parent_class; + void (*finalize) (PublishingFlickrVisibilitySpecification *self); +}; + +struct _PublishingFlickrParamSpecVisibilitySpecification { + GParamSpec parent_instance; +}; + +struct _PublishingFlickrPublishingParameters { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFlickrPublishingParametersPrivate * priv; + PublishingFlickrUserKind user_kind; + gint quota_free_mb; + gint photo_major_axis_size; + gchar* username; + PublishingFlickrVisibilitySpecification* visibility_specification; +}; + +struct _PublishingFlickrPublishingParametersClass { + GTypeClass parent_class; + void (*finalize) (PublishingFlickrPublishingParameters *self); +}; + +struct _PublishingFlickrParamSpecPublishingParameters { + GParamSpec parent_instance; +}; + +struct _PublishingFlickrFlickrPublisher { + GObject parent_instance; + PublishingFlickrFlickrPublisherPrivate * priv; +}; + +struct _PublishingFlickrFlickrPublisherClass { + GObjectClass parent_class; +}; + +struct _PublishingFlickrFlickrPublisherPrivate { + SpitPublishingService* service; + SpitPublishingPluginHost* host; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; + gboolean running; + gboolean was_started; + PublishingFlickrSession* session; + PublishingFlickrPublishingOptionsPane* publishing_options_pane; + PublishingFlickrPublishingParameters* parameters; +}; + +struct _PublishingFlickrPinEntryPane { + GObject parent_instance; + PublishingFlickrPinEntryPanePrivate * priv; +}; + +struct _PublishingFlickrPinEntryPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingFlickrPinEntryPanePrivate { + GtkBox* pane_widget; + GtkButton* continue_button; + GtkEntry* pin_entry; + GtkLabel* pin_entry_caption; + GtkLabel* explanatory_text; + GtkBuilder* builder; +}; + +struct _PublishingFlickrTransaction { + PublishingRESTSupportTransaction parent_instance; + PublishingFlickrTransactionPrivate * priv; +}; + +struct _PublishingFlickrTransactionClass { + PublishingRESTSupportTransactionClass parent_class; +}; + +struct _PublishingFlickrAuthenticationRequestTransaction { + PublishingFlickrTransaction parent_instance; + PublishingFlickrAuthenticationRequestTransactionPrivate * priv; +}; + +struct _PublishingFlickrAuthenticationRequestTransactionClass { + PublishingFlickrTransactionClass parent_class; +}; + +struct _PublishingFlickrAccessTokenFetchTransaction { + PublishingFlickrTransaction parent_instance; + PublishingFlickrAccessTokenFetchTransactionPrivate * priv; +}; + +struct _PublishingFlickrAccessTokenFetchTransactionClass { + PublishingFlickrTransactionClass parent_class; +}; + +struct _PublishingFlickrAccountInfoFetchTransaction { + PublishingFlickrTransaction parent_instance; + PublishingFlickrAccountInfoFetchTransactionPrivate * priv; +}; + +struct _PublishingFlickrAccountInfoFetchTransactionClass { + PublishingFlickrTransactionClass parent_class; +}; + +struct _PublishingFlickrUploadTransaction { + PublishingRESTSupportUploadTransaction parent_instance; + PublishingFlickrUploadTransactionPrivate * priv; +}; + +struct _PublishingFlickrUploadTransactionClass { + PublishingRESTSupportUploadTransactionClass parent_class; +}; + +struct _PublishingFlickrUploadTransactionPrivate { + PublishingFlickrPublishingParameters* parameters; + PublishingFlickrSession* session; + PublishingRESTSupportArgument** auth_header_fields; + gint auth_header_fields_length1; + gint _auth_header_fields_size_; +}; + +struct _PublishingFlickrSession { + PublishingRESTSupportSession parent_instance; + PublishingFlickrSessionPrivate * priv; +}; + +struct _PublishingFlickrSessionClass { + PublishingRESTSupportSessionClass parent_class; +}; + +struct _PublishingFlickrSessionPrivate { + gchar* request_phase_token; + gchar* request_phase_token_secret; + gchar* access_phase_token; + gchar* access_phase_token_secret; + gchar* username; +}; + +struct _PublishingFlickrPublishingOptionsPane { + GObject parent_instance; + PublishingFlickrPublishingOptionsPanePrivate * priv; +}; + +struct _PublishingFlickrPublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingFlickrPublishingOptionsPanePrivate { + GtkBuilder* builder; + GtkBox* pane_widget; + GtkLabel* visibility_label; + GtkLabel* upload_info_label; + GtkLabel* size_label; + GtkButton* logout_button; + GtkButton* publish_button; + GtkComboBoxText* visibility_combo; + GtkComboBoxText* size_combo; + GtkCheckButton* strip_metadata_check; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** visibilities; + gint visibilities_length1; + gint _visibilities_size_; + PublishingFlickrPublishingOptionsPaneSizeEntry** sizes; + gint sizes_length1; + gint _sizes_size_; + PublishingFlickrPublishingParameters* parameters; + PublishingFlickrFlickrPublisher* publisher; + SpitPublishingPublisherMediaType media_type; +}; + +struct _PublishingFlickrPublishingOptionsPaneVisibilityEntry { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFlickrPublishingOptionsPaneVisibilityEntryPrivate * priv; + PublishingFlickrVisibilitySpecification* specification; + gchar* title; +}; + +struct _PublishingFlickrPublishingOptionsPaneVisibilityEntryClass { + GTypeClass parent_class; + void (*finalize) (PublishingFlickrPublishingOptionsPaneVisibilityEntry *self); +}; + +struct _PublishingFlickrPublishingOptionsPaneSizeEntry { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingFlickrPublishingOptionsPaneSizeEntryPrivate * priv; + gchar* title; + gint size; +}; + +struct _PublishingFlickrPublishingOptionsPaneSizeEntryClass { + GTypeClass parent_class; + void (*finalize) (PublishingFlickrPublishingOptionsPaneSizeEntry *self); +}; + +struct _PublishingFlickrPublishingOptionsPaneParamSpecSizeEntry { + GParamSpec parent_instance; +}; + +struct _PublishingFlickrPublishingOptionsPaneParamSpecVisibilityEntry { + GParamSpec parent_instance; +}; + +struct _PublishingFlickrUploader { + PublishingRESTSupportBatchUploader parent_instance; + PublishingFlickrUploaderPrivate * priv; +}; + +struct _PublishingFlickrUploaderClass { + PublishingRESTSupportBatchUploaderClass parent_class; +}; + +struct _PublishingFlickrUploaderPrivate { + PublishingFlickrPublishingParameters* parameters; + gboolean strip_metadata; +}; + + +static gpointer flickr_service_parent_class = NULL; +static GdkPixbuf** flickr_service_icon_pixbuf_set; +static gint flickr_service_icon_pixbuf_set_length1; +static GdkPixbuf** flickr_service_icon_pixbuf_set = NULL; +static gint flickr_service_icon_pixbuf_set_length1 = 0; +static gint _flickr_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* flickr_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface* flickr_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_flickr_visibility_specification_parent_class = NULL; +static gpointer publishing_flickr_publishing_parameters_parent_class = NULL; +static gpointer publishing_flickr_flickr_publisher_parent_class = NULL; +static SpitPublishingPublisherIface* publishing_flickr_flickr_publisher_spit_publishing_publisher_parent_iface = NULL; +static gpointer publishing_flickr_pin_entry_pane_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_flickr_transaction_parent_class = NULL; +static gpointer publishing_flickr_authentication_request_transaction_parent_class = NULL; +static gpointer publishing_flickr_access_token_fetch_transaction_parent_class = NULL; +static gpointer publishing_flickr_account_info_fetch_transaction_parent_class = NULL; +static gpointer publishing_flickr_upload_transaction_parent_class = NULL; +static gpointer publishing_flickr_session_parent_class = NULL; +static gpointer publishing_flickr_publishing_options_pane_parent_class = NULL; +static gpointer publishing_flickr_publishing_options_pane_size_entry_parent_class = NULL; +static gpointer publishing_flickr_publishing_options_pane_visibility_entry_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_flickr_uploader_parent_class = NULL; + +GType flickr_service_get_type (void) G_GNUC_CONST; +enum { + FLICKR_SERVICE_DUMMY_PROPERTY +}; +#define FLICKR_SERVICE_ICON_FILENAME "flickr.png" +FlickrService* flickr_service_new (GFile* resource_directory); +FlickrService* flickr_service_construct (GType object_type, GFile* resource_directory); +static gint flickr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* flickr_service_real_get_id (SpitPluggable* base); +static const gchar* flickr_service_real_get_pluggable_name (SpitPluggable* base); +static void flickr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup7 (GdkPixbuf** self, int length); +static void flickr_service_real_activation (SpitPluggable* base, gboolean enabled); +static SpitPublishingPublisher* flickr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_flickr_flickr_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType flickr_service_real_get_supported_media (SpitPublishingService* base); +static void flickr_service_finalize (GObject* obj); +#define PUBLISHING_FLICKR_SERVICE_NAME "Flickr" +#define PUBLISHING_FLICKR_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Flickr.\n" \ +"\n" \ +"Click Login to log into Flickr in your Web browser. You will have to " \ +"authorize Shotwell Connect to link to your Flickr account.") +#define PUBLISHING_FLICKR_RESTART_ERROR_MESSAGE _ ("You have already logged in and out of Flickr during this Shotwell sess" \ +"ion.\n" \ +"To continue publishing to Flickr, quit and restart Shotwell, then try " \ +"publishing again.") +#define PUBLISHING_FLICKR_ENDPOINT_URL "https://api.flickr.com/services/rest" +#define PUBLISHING_FLICKR_API_KEY "60dd96d4a2ad04888b09c9e18d82c26f" +#define PUBLISHING_FLICKR_API_SECRET "d0960565e03547c1" +#define PUBLISHING_FLICKR_ORIGINAL_SIZE -1 +#define PUBLISHING_FLICKR_EXPIRED_SESSION_ERROR_CODE "98" +#define PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA "!*'();:@&=+$,/?%#[] \\" +GType publishing_flickr_user_kind_get_type (void) G_GNUC_CONST; +gpointer publishing_flickr_visibility_specification_ref (gpointer instance); +void publishing_flickr_visibility_specification_unref (gpointer instance); +GParamSpec* publishing_flickr_param_spec_visibility_specification (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_flickr_value_set_visibility_specification (GValue* value, gpointer v_object); +void publishing_flickr_value_take_visibility_specification (GValue* value, gpointer v_object); +gpointer publishing_flickr_value_get_visibility_specification (const GValue* value); +GType publishing_flickr_visibility_specification_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION_DUMMY_PROPERTY +}; +PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specification_new (gint friends_level, gint family_level, gint everyone_level); +PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specification_construct (GType object_type, gint friends_level, gint family_level, gint everyone_level); +static void publishing_flickr_visibility_specification_finalize (PublishingFlickrVisibilitySpecification* obj); +gpointer publishing_flickr_publishing_parameters_ref (gpointer instance); +void publishing_flickr_publishing_parameters_unref (gpointer instance); +GParamSpec* publishing_flickr_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_flickr_value_set_publishing_parameters (GValue* value, gpointer v_object); +void publishing_flickr_value_take_publishing_parameters (GValue* value, gpointer v_object); +gpointer publishing_flickr_value_get_publishing_parameters (const GValue* value); +GType publishing_flickr_publishing_parameters_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_FLICKR_PUBLISHING_PARAMETERS_DUMMY_PROPERTY +}; +PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_new (void); +PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_construct (GType object_type); +static void publishing_flickr_publishing_parameters_finalize (PublishingFlickrPublishingParameters* obj); +GType publishing_flickr_session_get_type (void) G_GNUC_CONST; +GType publishing_flickr_publishing_options_pane_get_type (void) G_GNUC_CONST; +#define PUBLISHING_FLICKR_FLICKR_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisherPrivate)) +enum { + PUBLISHING_FLICKR_FLICKR_PUBLISHER_DUMMY_PROPERTY +}; +static void publishing_flickr_flickr_publisher_on_session_authenticated (PublishingFlickrFlickrPublisher* self); +static void _publishing_flickr_flickr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self); +PublishingFlickrSession* publishing_flickr_session_new (void); +PublishingFlickrSession* publishing_flickr_session_construct (GType object_type); +static void publishing_flickr_flickr_publisher_invalidate_persistent_session (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_token (PublishingFlickrFlickrPublisher* self, const gchar* token); +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_token_secret (PublishingFlickrFlickrPublisher* self, const gchar* secret); +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_username (PublishingFlickrFlickrPublisher* self, const gchar* username); +static gboolean publishing_flickr_flickr_publisher_is_persistent_session_valid (PublishingFlickrFlickrPublisher* self); +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_username (PublishingFlickrFlickrPublisher* self); +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_token (PublishingFlickrFlickrPublisher* self); +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_token_secret (PublishingFlickrFlickrPublisher* self); +static gboolean publishing_flickr_flickr_publisher_get_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_set_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata); +static void publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_do_run_authentication_request_transaction (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_on_auth_request_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_flickr_flickr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_flickr_flickr_publisher_on_auth_request_txn_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); +static void _publishing_flickr_flickr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_flickr_flickr_publisher_do_parse_token_info_from_auth_request (PublishingFlickrFlickrPublisher* self, const gchar* response); +static void publishing_flickr_flickr_publisher_on_authentication_token_available (PublishingFlickrFlickrPublisher* self, const gchar* token, const gchar* token_secret); +void publishing_flickr_session_set_request_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret); +static void publishing_flickr_flickr_publisher_do_launch_system_browser (PublishingFlickrFlickrPublisher* self, const gchar* token); +static void publishing_flickr_flickr_publisher_on_system_browser_launched (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_do_show_pin_entry_pane (PublishingFlickrFlickrPublisher* self); +GType publishing_flickr_pin_entry_pane_get_type (void) G_GNUC_CONST; +static void publishing_flickr_flickr_publisher_on_pin_entry_proceed (PublishingFlickrFlickrPublisher* self, PublishingFlickrPinEntryPane* sender, const gchar* pin); +static void _publishing_flickr_flickr_publisher_on_pin_entry_proceed_publishing_flickr_pin_entry_pane_proceed (PublishingFlickrPinEntryPane* _sender, PublishingFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self); +static void publishing_flickr_flickr_publisher_do_verify_pin (PublishingFlickrFlickrPublisher* self, const gchar* pin); +static void publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_flickr_flickr_publisher_on_access_token_fetch_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); +static void _publishing_flickr_flickr_publisher_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_flickr_flickr_publisher_do_extract_access_phase_credentials_from_reponse (PublishingFlickrFlickrPublisher* self, const gchar* response); +gchar* publishing_flickr_session_get_username (PublishingFlickrSession* self); +gchar* publishing_flickr_session_get_access_phase_token (PublishingFlickrSession* self); +gchar* publishing_flickr_session_get_access_phase_token_secret (PublishingFlickrSession* self); +static void publishing_flickr_flickr_publisher_do_fetch_account_info (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_on_account_fetch_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_flickr_flickr_publisher_on_account_fetch_txn_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err); +static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (PublishingFlickrFlickrPublisher* self, const gchar* xml); +static void publishing_flickr_flickr_publisher_on_account_info_available (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_do_show_publishing_options_pane (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_on_publishing_options_pane_publish (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata); +static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self); +static void publishing_flickr_flickr_publisher_on_publishing_options_pane_logout (PublishingFlickrFlickrPublisher* self); +static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self); +static void publishing_flickr_flickr_publisher_do_publish (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata); +static void publishing_flickr_flickr_publisher_do_logout (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_on_upload_status_updated (PublishingFlickrFlickrPublisher* self, gint file_number, gdouble completed_fraction); +static void publishing_flickr_flickr_publisher_on_upload_complete (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); +static void _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_flickr_flickr_publisher_on_upload_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); +static void _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); +static void publishing_flickr_flickr_publisher_do_show_success_pane (PublishingFlickrFlickrPublisher* self); +static void publishing_flickr_flickr_publisher_do_show_login_welcome_pane (PublishingFlickrFlickrPublisher* self); +static void _publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self); +GType publishing_flickr_transaction_get_type (void) G_GNUC_CONST; +GType publishing_flickr_authentication_request_transaction_get_type (void) G_GNUC_CONST; +PublishingFlickrAuthenticationRequestTransaction* publishing_flickr_authentication_request_transaction_new (PublishingFlickrSession* session); +PublishingFlickrAuthenticationRequestTransaction* publishing_flickr_authentication_request_transaction_construct (GType object_type, PublishingFlickrSession* session); +PublishingFlickrPinEntryPane* publishing_flickr_pin_entry_pane_new (GtkBuilder* builder); +PublishingFlickrPinEntryPane* publishing_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder); +GType publishing_flickr_access_token_fetch_transaction_get_type (void) G_GNUC_CONST; +PublishingFlickrAccessTokenFetchTransaction* publishing_flickr_access_token_fetch_transaction_new (PublishingFlickrSession* session, const gchar* user_verifier); +PublishingFlickrAccessTokenFetchTransaction* publishing_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session, const gchar* user_verifier); +void publishing_flickr_session_set_access_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username); +GType publishing_flickr_account_info_fetch_transaction_get_type (void) G_GNUC_CONST; +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingFlickrSession* session); +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session); +PublishingRESTSupportXmlDocument* publishing_flickr_transaction_parse_flickr_response (const gchar* xml, GError** error); +void publishing_flickr_session_deauthenticate (PublishingFlickrSession* self); +static void publishing_flickr_flickr_publisher_attempt_start (PublishingFlickrFlickrPublisher* self); +PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_new (PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata); +PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_construct (GType object_type, PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata); +gint publishing_flickr_flickr_publisher_flickr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b); +static gint _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self); +GType publishing_flickr_uploader_get_type (void) G_GNUC_CONST; +PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); +PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata); +static void _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +gint publishing_flickr_flickr_publisher_get_persistent_visibility (PublishingFlickrFlickrPublisher* self); +void publishing_flickr_flickr_publisher_set_persistent_visibility (PublishingFlickrFlickrPublisher* self, gint vis); +gint publishing_flickr_flickr_publisher_get_persistent_default_size (PublishingFlickrFlickrPublisher* self); +void publishing_flickr_flickr_publisher_set_persistent_default_size (PublishingFlickrFlickrPublisher* self, gint size); +static SpitPublishingService* publishing_flickr_flickr_publisher_real_get_service (SpitPublishingPublisher* base); +static gboolean publishing_flickr_flickr_publisher_real_is_running (SpitPublishingPublisher* base); +void publishing_flickr_session_authenticate_from_persistent_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username); +static void publishing_flickr_flickr_publisher_real_start (SpitPublishingPublisher* base); +static void publishing_flickr_flickr_publisher_real_stop (SpitPublishingPublisher* base); +static void publishing_flickr_flickr_publisher_finalize (GObject* obj); +#define PUBLISHING_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPanePrivate)) +enum { + PUBLISHING_FLICKR_PIN_ENTRY_PANE_DUMMY_PROPERTY +}; +static void publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingFlickrPinEntryPane* self); +static void publishing_flickr_pin_entry_pane_on_continue_clicked (PublishingFlickrPinEntryPane* self); +static GtkWidget* publishing_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void _publishing_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void publishing_flickr_pin_entry_pane_finalize (GObject* obj); +enum { + PUBLISHING_FLICKR_TRANSACTION_DUMMY_PROPERTY +}; +PublishingFlickrTransaction* publishing_flickr_transaction_new (PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method); +PublishingFlickrTransaction* publishing_flickr_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method); +gchar* publishing_flickr_session_get_oauth_nonce (PublishingFlickrSession* self); +gchar* publishing_flickr_session_get_oauth_timestamp (PublishingFlickrSession* self); +PublishingFlickrTransaction* publishing_flickr_transaction_new_with_uri (PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); +PublishingFlickrTransaction* publishing_flickr_transaction_construct_with_uri (GType object_type, PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method); +static void publishing_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); +void publishing_flickr_session_sign_transaction (PublishingFlickrSession* self, PublishingRESTSupportTransaction* txn); +gchar* publishing_flickr_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc); +static gchar* _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); +enum { + PUBLISHING_FLICKR_AUTHENTICATION_REQUEST_TRANSACTION_DUMMY_PROPERTY +}; +enum { + PUBLISHING_FLICKR_ACCESS_TOKEN_FETCH_TRANSACTION_DUMMY_PROPERTY +}; +gchar* publishing_flickr_session_get_request_phase_token (PublishingFlickrSession* self); +enum { + PUBLISHING_FLICKR_ACCOUNT_INFO_FETCH_TRANSACTION_DUMMY_PROPERTY +}; +GType publishing_flickr_upload_transaction_get_type (void) G_GNUC_CONST; +#define PUBLISHING_FLICKR_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransactionPrivate)) +enum { + PUBLISHING_FLICKR_UPLOAD_TRANSACTION_DUMMY_PROPERTY +}; +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable); +void publishing_flickr_upload_transaction_add_authorization_header_field (PublishingFlickrUploadTransaction* self, const gchar* key, const gchar* value); +static void _g_free0_ (gpointer var); +static void _vala_array_add18 (PublishingRESTSupportArgument*** array, int* length, int* size, PublishingRESTSupportArgument* value); +PublishingRESTSupportArgument** publishing_flickr_upload_transaction_get_authorization_header_fields (PublishingFlickrUploadTransaction* self, int* result_length1); +static PublishingRESTSupportArgument** _vala_array_dup8 (PublishingRESTSupportArgument** self, int length); +gchar* publishing_flickr_upload_transaction_get_authorization_header_string (PublishingFlickrUploadTransaction* self); +static void publishing_flickr_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); +static void publishing_flickr_upload_transaction_finalize (PublishingRESTSupportTransaction* obj); +#define PUBLISHING_FLICKR_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSessionPrivate)) +enum { + PUBLISHING_FLICKR_SESSION_DUMMY_PROPERTY +}; +static gboolean publishing_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base); +static void _vala_array_add19 (PublishingRESTSupportArgument*** array, int* length, int* size, PublishingRESTSupportArgument* value); +static void publishing_flickr_session_finalize (PublishingRESTSupportSession* obj); +static gpointer publishing_flickr_publishing_options_pane_visibility_entry_ref (gpointer instance); +static void publishing_flickr_publishing_options_pane_visibility_entry_unref (gpointer instance); +static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_visibility_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_flickr_publishing_options_pane_value_set_visibility_entry (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_flickr_publishing_options_pane_value_take_visibility_entry (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_flickr_publishing_options_pane_value_get_visibility_entry (const GValue* value) G_GNUC_UNUSED; +static GType publishing_flickr_publishing_options_pane_visibility_entry_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static gpointer publishing_flickr_publishing_options_pane_size_entry_ref (gpointer instance); +static void publishing_flickr_publishing_options_pane_size_entry_unref (gpointer instance); +static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_flickr_publishing_options_pane_value_set_size_entry (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_flickr_publishing_options_pane_value_take_size_entry (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_flickr_publishing_options_pane_value_get_size_entry (const GValue* value) G_GNUC_UNUSED; +static GType publishing_flickr_publishing_options_pane_size_entry_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPanePrivate)) +enum { + PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +static PublishingFlickrPublishingOptionsPaneVisibilityEntry** publishing_flickr_publishing_options_pane_create_visibilities (PublishingFlickrPublishingOptionsPane* self, int* result_length1); +static PublishingFlickrPublishingOptionsPaneSizeEntry** publishing_flickr_publishing_options_pane_create_sizes (PublishingFlickrPublishingOptionsPane* self, int* result_length1); +static void publishing_flickr_publishing_options_pane_populate_visibility_combo (PublishingFlickrPublishingOptionsPane* self); +static void publishing_flickr_publishing_options_pane_on_visibility_changed (PublishingFlickrPublishingOptionsPane* self); +static void _publishing_flickr_publishing_options_pane_on_visibility_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static void publishing_flickr_publishing_options_pane_populate_size_combo (PublishingFlickrPublishingOptionsPane* self); +static void publishing_flickr_publishing_options_pane_on_size_changed (PublishingFlickrPublishingOptionsPane* self); +static void _publishing_flickr_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static void publishing_flickr_publishing_options_pane_on_logout_clicked (PublishingFlickrPublishingOptionsPane* self); +static void _publishing_flickr_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_flickr_publishing_options_pane_on_publish_clicked (PublishingFlickrPublishingOptionsPane* self); +static void _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_new (const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification); +static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_construct (GType object_type, const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification); +static void _vala_array_add20 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); +static void _vala_array_add21 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); +static void _vala_array_add22 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); +static void _vala_array_add23 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); +static void _vala_array_add24 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value); +static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_new (const gchar* creator_title, gint creator_size); +static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size); +static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); +static void _vala_array_add26 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); +static void _vala_array_add27 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); +static void _vala_array_add28 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); +static void _vala_array_add29 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value); +void publishing_flickr_publishing_options_pane_notify_publish (PublishingFlickrPublishingOptionsPane* self); +void publishing_flickr_publishing_options_pane_notify_logout (PublishingFlickrPublishingOptionsPane* self); +static GtkWidget* publishing_flickr_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_flickr_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_flickr_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self); +static void _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self); +static void publishing_flickr_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +enum { + PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY_DUMMY_PROPERTY +}; +static void publishing_flickr_publishing_options_pane_size_entry_finalize (PublishingFlickrPublishingOptionsPaneSizeEntry* obj); +enum { + PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY_DUMMY_PROPERTY +}; +static void publishing_flickr_publishing_options_pane_visibility_entry_finalize (PublishingFlickrPublishingOptionsPaneVisibilityEntry* obj); +static void publishing_flickr_publishing_options_pane_finalize (GObject* obj); +#define PUBLISHING_FLICKR_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploaderPrivate)) +enum { + PUBLISHING_FLICKR_UPLOADER_DUMMY_PROPERTY +}; +static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrUploader* self, SpitPublishingPublishable* publishable); +static void _vala_array_add30 (gchar*** array, int* length, int* size, gchar* value); +static PublishingRESTSupportTransaction* publishing_flickr_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); +static void publishing_flickr_uploader_finalize (PublishingRESTSupportBatchUploader* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static gint _vala_array_length (gpointer array); + + +FlickrService* flickr_service_construct (GType object_type, GFile* resource_directory) { + FlickrService * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (FlickrService*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = flickr_service_icon_pixbuf_set; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0__length1 = flickr_service_icon_pixbuf_set_length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_ == NULL) { +#line 791 "FlickrPublishing.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" FLICKR_SERVICE_ICON_FILENAME, &_tmp1_); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_icon_pixbuf_set = (_vala_array_free (flickr_service_icon_pixbuf_set, flickr_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_icon_pixbuf_set = _tmp2_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_icon_pixbuf_set_length1 = _tmp1_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _flickr_service_icon_pixbuf_set_size_ = flickr_service_icon_pixbuf_set_length1; +#line 804 "FlickrPublishing.c" + } +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 808 "FlickrPublishing.c" +} + + +FlickrService* flickr_service_new (GFile* resource_directory) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return flickr_service_construct (TYPE_FLICKR_SERVICE, resource_directory); +#line 815 "FlickrPublishing.c" +} + + +static gint flickr_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + FlickrService * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = min_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = max_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 837 "FlickrPublishing.c" +} + + +static const gchar* flickr_service_real_get_id (SpitPluggable* base) { + FlickrService * self; + const gchar* result = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = "org.yorba.shotwell.publishing.flickr"; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 850 "FlickrPublishing.c" +} + + +static const gchar* flickr_service_real_get_pluggable_name (SpitPluggable* base) { + FlickrService * self; + const gchar* result = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = "Flickr"; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 863 "FlickrPublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 870 "FlickrPublishing.c" +} + + +static GdkPixbuf** _vala_array_dup7 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (i = 0; i < length; i++) { +#line 881 "FlickrPublishing.c" + GdkPixbuf* _tmp0_ = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result[i] = _tmp0_; +#line 887 "FlickrPublishing.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 891 "FlickrPublishing.c" +} + + +static void flickr_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + FlickrService * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (info != NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = g_strdup ("Lucas Beeler"); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).authors); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).authors = _tmp0_; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _ ("Copyright 2016 Software Freedom Conservancy Inc."); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).copyright); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).copyright = _tmp2_; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).translators); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).translators = _tmp3_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = g_strdup (_VERSION); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).version); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).version = _tmp4_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).website_name); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).website_name = _tmp5_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).website_url); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).website_url = _tmp6_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 ((*info).license); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).license = _tmp7_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = flickr_service_icon_pixbuf_set; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8__length1 = flickr_service_icon_pixbuf_set_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup7 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).icons = _tmp9_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*info).icons_length1 = _tmp9__length1; +#line 973 "FlickrPublishing.c" +} + + +static void flickr_service_real_activation (SpitPluggable* base, gboolean enabled) { + FlickrService * self; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 981 "FlickrPublishing.c" +} + + +static SpitPublishingPublisher* flickr_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + FlickrService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingFlickrFlickrPublisher* _tmp1_ = NULL; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = host; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishing_flickr_flickr_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1002 "FlickrPublishing.c" +} + + +static SpitPublishingPublisherMediaType flickr_service_real_get_supported_media (SpitPublishingService* base) { + FlickrService * self; + SpitPublishingPublisherMediaType result = 0; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLICKR_SERVICE, FlickrService); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1015 "FlickrPublishing.c" +} + + +static void flickr_service_class_init (FlickrServiceClass * klass) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = flickr_service_finalize; +#line 1024 "FlickrPublishing.c" +} + + +static void flickr_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) flickr_service_real_get_pluggable_interface; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) flickr_service_real_get_id; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) flickr_service_real_get_pluggable_name; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) flickr_service_real_get_info; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) flickr_service_real_activation; +#line 1041 "FlickrPublishing.c" +} + + +static void flickr_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + flickr_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*)(SpitPublishingService*, SpitPublishingPluginHost*)) flickr_service_real_create_publisher; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*)(SpitPublishingService*)) flickr_service_real_get_supported_media; +#line 1052 "FlickrPublishing.c" +} + + +static void flickr_service_instance_init (FlickrService * self) { +} + + +static void flickr_service_finalize (GObject* obj) { + FlickrService * self; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FLICKR_SERVICE, FlickrService); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (flickr_service_parent_class)->finalize (obj); +#line 1066 "FlickrPublishing.c" +} + + +GType flickr_service_get_type (void) { + static volatile gsize flickr_service_type_id__volatile = 0; + if (g_once_init_enter (&flickr_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FlickrServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) flickr_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FlickrService), 0, (GInstanceInitFunc) flickr_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) flickr_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) flickr_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType flickr_service_type_id; + flickr_service_type_id = g_type_register_static (G_TYPE_OBJECT, "FlickrService", &g_define_type_info, 0); + g_type_add_interface_static (flickr_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (flickr_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&flickr_service_type_id__volatile, flickr_service_type_id); + } + return flickr_service_type_id__volatile; +} + + +GType publishing_flickr_user_kind_get_type (void) { + static volatile gsize publishing_flickr_user_kind_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_user_kind_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_FLICKR_USER_KIND_PRO, "PUBLISHING_FLICKR_USER_KIND_PRO", "pro"}, {PUBLISHING_FLICKR_USER_KIND_FREE, "PUBLISHING_FLICKR_USER_KIND_FREE", "free"}, {0, NULL, NULL}}; + GType publishing_flickr_user_kind_type_id; + publishing_flickr_user_kind_type_id = g_enum_register_static ("PublishingFlickrUserKind", values); + g_once_init_leave (&publishing_flickr_user_kind_type_id__volatile, publishing_flickr_user_kind_type_id); + } + return publishing_flickr_user_kind_type_id__volatile; +} + + +PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specification_construct (GType object_type, gint friends_level, gint family_level, gint everyone_level) { + PublishingFlickrVisibilitySpecification* self = NULL; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrVisibilitySpecification*) g_type_create_instance (object_type); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = friends_level; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->friends_level = _tmp0_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = family_level; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->family_level = _tmp1_; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = everyone_level; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->everyone_level = _tmp2_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 1119 "FlickrPublishing.c" +} + + +PublishingFlickrVisibilitySpecification* publishing_flickr_visibility_specification_new (gint friends_level, gint family_level, gint everyone_level) { +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_visibility_specification_construct (PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, friends_level, family_level, everyone_level); +#line 1126 "FlickrPublishing.c" +} + + +static void publishing_flickr_value_visibility_specification_init (GValue* value) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1133 "FlickrPublishing.c" +} + + +static void publishing_flickr_value_visibility_specification_free_value (GValue* value) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (value->data[0].v_pointer) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_visibility_specification_unref (value->data[0].v_pointer); +#line 1142 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_value_visibility_specification_copy_value (const GValue* src_value, GValue* dest_value) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = publishing_flickr_visibility_specification_ref (src_value->data[0].v_pointer); +#line 1152 "FlickrPublishing.c" + } else { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1156 "FlickrPublishing.c" + } +} + + +static gpointer publishing_flickr_value_visibility_specification_peek_pointer (const GValue* value) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 1164 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_value_visibility_specification_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1171 "FlickrPublishing.c" + PublishingFlickrVisibilitySpecification* object; + object = collect_values[0].v_pointer; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1178 "FlickrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1182 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = publishing_flickr_visibility_specification_ref (object); +#line 1186 "FlickrPublishing.c" + } else { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1190 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 1194 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_value_visibility_specification_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFlickrVisibilitySpecification** object_p; + object_p = collect_values[0].v_pointer; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!object_p) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1205 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = NULL; +#line 1211 "FlickrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1215 "FlickrPublishing.c" + } else { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = publishing_flickr_visibility_specification_ref (value->data[0].v_pointer); +#line 1219 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 1223 "FlickrPublishing.c" +} + + +GParamSpec* publishing_flickr_param_spec_visibility_specification (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFlickrParamSpecVisibilitySpecification* spec; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION), NULL); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1237 "FlickrPublishing.c" +} + + +gpointer publishing_flickr_value_get_visibility_specification (const GValue* value) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION), NULL); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 1246 "FlickrPublishing.c" +} + + +void publishing_flickr_value_set_visibility_specification (GValue* value, gpointer v_object) { + PublishingFlickrVisibilitySpecification* old; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_visibility_specification_ref (value->data[0].v_pointer); +#line 1266 "FlickrPublishing.c" + } else { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1270 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_visibility_specification_unref (old); +#line 1276 "FlickrPublishing.c" + } +} + + +void publishing_flickr_value_take_visibility_specification (GValue* value, gpointer v_object) { + PublishingFlickrVisibilitySpecification* old; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION)); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1295 "FlickrPublishing.c" + } else { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1299 "FlickrPublishing.c" + } +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_visibility_specification_unref (old); +#line 1305 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_visibility_specification_class_init (PublishingFlickrVisibilitySpecificationClass * klass) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_visibility_specification_parent_class = g_type_class_peek_parent (klass); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingFlickrVisibilitySpecificationClass *) klass)->finalize = publishing_flickr_visibility_specification_finalize; +#line 1315 "FlickrPublishing.c" +} + + +static void publishing_flickr_visibility_specification_instance_init (PublishingFlickrVisibilitySpecification * self) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->ref_count = 1; +#line 1322 "FlickrPublishing.c" +} + + +static void publishing_flickr_visibility_specification_finalize (PublishingFlickrVisibilitySpecification* obj) { + PublishingFlickrVisibilitySpecification * self; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_VISIBILITY_SPECIFICATION, PublishingFlickrVisibilitySpecification); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_destroy (self); +#line 1332 "FlickrPublishing.c" +} + + +GType publishing_flickr_visibility_specification_get_type (void) { + static volatile gsize publishing_flickr_visibility_specification_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_visibility_specification_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_flickr_value_visibility_specification_init, publishing_flickr_value_visibility_specification_free_value, publishing_flickr_value_visibility_specification_copy_value, publishing_flickr_value_visibility_specification_peek_pointer, "p", publishing_flickr_value_visibility_specification_collect_value, "p", publishing_flickr_value_visibility_specification_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrVisibilitySpecificationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_visibility_specification_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrVisibilitySpecification), 0, (GInstanceInitFunc) publishing_flickr_visibility_specification_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_flickr_visibility_specification_type_id; + publishing_flickr_visibility_specification_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFlickrVisibilitySpecification", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_flickr_visibility_specification_type_id__volatile, publishing_flickr_visibility_specification_type_id); + } + return publishing_flickr_visibility_specification_type_id__volatile; +} + + +gpointer publishing_flickr_visibility_specification_ref (gpointer instance) { + PublishingFlickrVisibilitySpecification* self; + self = instance; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return instance; +#line 1357 "FlickrPublishing.c" +} + + +void publishing_flickr_visibility_specification_unref (gpointer instance) { + PublishingFlickrVisibilitySpecification* self; + self = instance; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_FLICKR_VISIBILITY_SPECIFICATION_GET_CLASS (self)->finalize (self); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1370 "FlickrPublishing.c" + } +} + + +PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_construct (GType object_type) { + PublishingFlickrPublishingParameters* self = NULL; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrPublishingParameters*) g_type_create_instance (object_type); +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 1381 "FlickrPublishing.c" +} + + +PublishingFlickrPublishingParameters* publishing_flickr_publishing_parameters_new (void) { +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_publishing_parameters_construct (PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS); +#line 1388 "FlickrPublishing.c" +} + + +static void publishing_flickr_value_publishing_parameters_init (GValue* value) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1395 "FlickrPublishing.c" +} + + +static void publishing_flickr_value_publishing_parameters_free_value (GValue* value) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (value->data[0].v_pointer) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_parameters_unref (value->data[0].v_pointer); +#line 1404 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = publishing_flickr_publishing_parameters_ref (src_value->data[0].v_pointer); +#line 1414 "FlickrPublishing.c" + } else { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1418 "FlickrPublishing.c" + } +} + + +static gpointer publishing_flickr_value_publishing_parameters_peek_pointer (const GValue* value) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 1426 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1433 "FlickrPublishing.c" + PublishingFlickrPublishingParameters* object; + object = collect_values[0].v_pointer; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1440 "FlickrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1444 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = publishing_flickr_publishing_parameters_ref (object); +#line 1448 "FlickrPublishing.c" + } else { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1452 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 1456 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFlickrPublishingParameters** object_p; + object_p = collect_values[0].v_pointer; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!object_p) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1467 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = NULL; +#line 1473 "FlickrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1477 "FlickrPublishing.c" + } else { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = publishing_flickr_publishing_parameters_ref (value->data[0].v_pointer); +#line 1481 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 1485 "FlickrPublishing.c" +} + + +GParamSpec* publishing_flickr_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFlickrParamSpecPublishingParameters* spec; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1499 "FlickrPublishing.c" +} + + +gpointer publishing_flickr_value_get_publishing_parameters (const GValue* value) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 1508 "FlickrPublishing.c" +} + + +void publishing_flickr_value_set_publishing_parameters (GValue* value, gpointer v_object) { + PublishingFlickrPublishingParameters* old; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_parameters_ref (value->data[0].v_pointer); +#line 1528 "FlickrPublishing.c" + } else { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1532 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_parameters_unref (old); +#line 1538 "FlickrPublishing.c" + } +} + + +void publishing_flickr_value_take_publishing_parameters (GValue* value, gpointer v_object) { + PublishingFlickrPublishingParameters* old; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS)); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1557 "FlickrPublishing.c" + } else { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1561 "FlickrPublishing.c" + } +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_parameters_unref (old); +#line 1567 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_parameters_class_init (PublishingFlickrPublishingParametersClass * klass) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_parameters_parent_class = g_type_class_peek_parent (klass); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingFlickrPublishingParametersClass *) klass)->finalize = publishing_flickr_publishing_parameters_finalize; +#line 1577 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_parameters_instance_init (PublishingFlickrPublishingParameters * self) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->ref_count = 1; +#line 1584 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_parameters_finalize (PublishingFlickrPublishingParameters* obj) { + PublishingFlickrPublishingParameters * self; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_PUBLISHING_PARAMETERS, PublishingFlickrPublishingParameters); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_destroy (self); +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->username); +#line 93 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (self->visibility_specification); +#line 1598 "FlickrPublishing.c" +} + + +GType publishing_flickr_publishing_parameters_get_type (void) { + static volatile gsize publishing_flickr_publishing_parameters_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_publishing_parameters_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_flickr_value_publishing_parameters_init, publishing_flickr_value_publishing_parameters_free_value, publishing_flickr_value_publishing_parameters_copy_value, publishing_flickr_value_publishing_parameters_peek_pointer, "p", publishing_flickr_value_publishing_parameters_collect_value, "p", publishing_flickr_value_publishing_parameters_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrPublishingParametersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_publishing_parameters_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrPublishingParameters), 0, (GInstanceInitFunc) publishing_flickr_publishing_parameters_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_flickr_publishing_parameters_type_id; + publishing_flickr_publishing_parameters_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFlickrPublishingParameters", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_flickr_publishing_parameters_type_id__volatile, publishing_flickr_publishing_parameters_type_id); + } + return publishing_flickr_publishing_parameters_type_id__volatile; +} + + +gpointer publishing_flickr_publishing_parameters_ref (gpointer instance) { + PublishingFlickrPublishingParameters* self; + self = instance; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return instance; +#line 1623 "FlickrPublishing.c" +} + + +void publishing_flickr_publishing_parameters_unref (gpointer instance) { + PublishingFlickrPublishingParameters* self; + self = instance; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_FLICKR_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1636 "FlickrPublishing.c" + } +} + + +static void _publishing_flickr_flickr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated (PublishingRESTSupportSession* _sender, gpointer self) { +#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_session_authenticated ((PublishingFlickrFlickrPublisher*) self); +#line 1644 "FlickrPublishing.c" +} + + +PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingFlickrFlickrPublisher * self = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingService* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + SpitPublishingPluginHost* _tmp3_ = NULL; + PublishingFlickrSession* _tmp4_ = NULL; + PublishingFlickrPublishingParameters* _tmp5_ = NULL; + PublishingFlickrSession* _tmp6_ = NULL; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrFlickrPublisher*) g_object_new (object_type, NULL); +#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:112: FlickrPublisher instantiated."); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = service; +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->service = _tmp1_; +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = host; +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->host = _tmp3_; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_flickr_session_new (); +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->session = _tmp4_; +#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = publishing_flickr_publishing_parameters_new (); +#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = _tmp5_; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = self->priv->session; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated", (GCallback) _publishing_flickr_flickr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated, self, 0); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 1699 "FlickrPublishing.c" +} + + +PublishingFlickrFlickrPublisher* publishing_flickr_flickr_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_flickr_publisher_construct (PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, service, host); +#line 1706 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_invalidate_persistent_session (PublishingFlickrFlickrPublisher* self) { +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_token (self, ""); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_token_secret (self, ""); +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_username (self, ""); +#line 1719 "FlickrPublishing.c" +} + + +static gboolean publishing_flickr_flickr_publisher_is_persistent_session_valid (PublishingFlickrFlickrPublisher* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), FALSE); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_username (self); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_ != NULL; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp3_); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp4_) { +#line 1742 "FlickrPublishing.c" + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_token (self); +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _tmp5_; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _tmp6_ != NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp6_); +#line 1753 "FlickrPublishing.c" + } else { +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = FALSE; +#line 1757 "FlickrPublishing.c" + } +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp1_) { +#line 1761 "FlickrPublishing.c" + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_token_secret (self); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = _tmp8_ != NULL; +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp8_); +#line 1772 "FlickrPublishing.c" + } else { +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = FALSE; +#line 1776 "FlickrPublishing.c" + } +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp0_; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1782 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_username (PublishingFlickrFlickrPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), NULL); +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", NULL); +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1800 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_username (PublishingFlickrFlickrPublisher* self, const gchar* username) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (username != NULL); +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = username; +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_username", _tmp1_); +#line 1817 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_token (PublishingFlickrFlickrPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), NULL); +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", NULL); +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1835 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_token (PublishingFlickrFlickrPublisher* self, const gchar* token) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = token; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token", _tmp1_); +#line 1852 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_flickr_publisher_get_persistent_access_phase_token_secret (PublishingFlickrFlickrPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), NULL); +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", NULL); +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1870 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_set_persistent_access_phase_token_secret (PublishingFlickrFlickrPublisher* self, const gchar* secret) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (secret != NULL); +#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = secret; +#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "access_phase_token_secret", _tmp1_); +#line 1887 "FlickrPublishing.c" +} + + +static gboolean publishing_flickr_flickr_publisher_get_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), FALSE); +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", FALSE); +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 1905 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_set_persistent_strip_metadata (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = strip_metadata; +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", _tmp1_); +#line 1920 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked (PublishingFlickrFlickrPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->running; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 1934 "FlickrPublishing.c" + } +#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:173: EVENT: user clicked 'Login' button in the w" \ +"elcome pane"); +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_run_authentication_request_transaction (self); +#line 1940 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_auth_request_txn_completed ((PublishingFlickrFlickrPublisher*) self, _sender); +#line 1947 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_auth_request_txn_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); +#line 1954 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_auth_request_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + PublishingRESTSupportTransaction* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 1992 "FlickrPublishing.c" + } +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = txn; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:185: EVENT: OAuth authentication request transac" \ +"tion completed; response = '%s'", _tmp7_); +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = txn; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = publishing_rest_support_transaction_get_response (_tmp8_); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = _tmp9_; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_parse_token_info_from_auth_request (self, _tmp10_); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp10_); +#line 2014 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_auth_request_txn_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + SpitPublishingPluginHost* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self); +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2048 "FlickrPublishing.c" + } +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:199: EVENT: OAuth authentication request transac" \ +"tion caused a network error"); +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->host; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = err; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); +#line 2058 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_authentication_token_available (PublishingFlickrFlickrPublisher* self, const gchar* token, const gchar* token_secret) { + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingFlickrSession* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token_secret != NULL); +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = token; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = token_secret; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:204: EVENT: OAuth authentication token (%s) and " \ +"token secret (%s) available", _tmp0_, _tmp1_); +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->session; +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = token; +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = token_secret; +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_set_request_phase_credentials (_tmp2_, _tmp3_, _tmp4_); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = token; +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_launch_system_browser (self, _tmp5_); +#line 2093 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_system_browser_launched (PublishingFlickrFlickrPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2107 "FlickrPublishing.c" + } +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:216: EVENT: system browser launched."); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_show_pin_entry_pane (self); +#line 2113 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_pin_entry_proceed_publishing_flickr_pin_entry_pane_proceed (PublishingFlickrPinEntryPane* _sender, PublishingFlickrPinEntryPane* sender, const gchar* authorization_pin, gpointer self) { +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_pin_entry_proceed ((PublishingFlickrFlickrPublisher*) self, sender, authorization_pin); +#line 2120 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_pin_entry_proceed (PublishingFlickrFlickrPublisher* self, PublishingFlickrPinEntryPane* sender, const gchar* pin) { + PublishingFlickrPinEntryPane* _tmp0_ = NULL; + guint _tmp1_ = 0U; + gboolean _tmp2_ = FALSE; + const gchar* _tmp3_ = NULL; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PIN_ENTRY_PANE (sender)); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (pin != NULL); +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = sender; +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("proceed", PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, &_tmp1_, NULL, FALSE); +#line 222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_pin_entry_proceed_publishing_flickr_pin_entry_pane_proceed, self); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp2_) { +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2147 "FlickrPublishing.c" + } +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:227: EVENT: user clicked 'Continue' in PIN entry" \ +" pane."); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = pin; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_verify_pin (self, _tmp3_); +#line 2155 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed ((PublishingFlickrFlickrPublisher*) self, _sender); +#line 2162 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_access_token_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_access_token_fetch_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); +#line 2169 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2204 "FlickrPublishing.c" + } +#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:239: EVENT: fetching OAuth access token over the" \ +" network succeeded"); +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = txn; +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_extract_access_phase_credentials_from_reponse (self, _tmp7_); +#line 241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 2218 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_access_token_fetch_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + SpitPublishingPluginHost* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self); +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2252 "FlickrPublishing.c" + } +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:252: EVENT: fetching OAuth access token over the" \ +" network caused an error."); +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->host; +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = err; +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); +#line 2262 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_session_authenticated (PublishingFlickrFlickrPublisher* self) { + gboolean _tmp0_ = FALSE; + PublishingFlickrPublishingParameters* _tmp1_ = NULL; + PublishingFlickrSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingFlickrSession* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + PublishingFlickrSession* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + PublishingFlickrSession* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; +#line 257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2288 "FlickrPublishing.c" + } +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:261: EVENT: a fully authenticated session has be" \ +"come available"); +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->parameters; +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->session; +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_session_get_username (_tmp2_); +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp1_->username); +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_->username = _tmp3_; +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->session; +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = publishing_flickr_session_get_access_phase_token (_tmp4_); +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _tmp5_; +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_token (self, _tmp6_); +#line 265 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp6_); +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = self->priv->session; +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = publishing_flickr_session_get_access_phase_token_secret (_tmp7_); +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_; +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_token_secret (self, _tmp9_); +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp9_); +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->session; +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = publishing_flickr_session_get_username (_tmp10_); +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _tmp11_; +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_access_phase_username (self, _tmp12_); +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp12_); +#line 269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_fetch_account_info (self); +#line 2334 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_account_fetch_txn_completed ((PublishingFlickrFlickrPublisher*) self, _sender); +#line 2341 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_account_fetch_txn_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); +#line 2348 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_account_fetch_txn_completed (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self); +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self); +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2383 "FlickrPublishing.c" + } +#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:279: EVENT: account fetch transaction response r" \ +"eceived over the network"); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = txn; +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (self, _tmp7_); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 2397 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_account_fetch_txn_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportTransaction* txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + SpitPublishingPluginHost* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self); +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = txn; +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self); +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2431 "FlickrPublishing.c" + } +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:291: EVENT: account fetch transaction caused a n" \ +"etwork error"); +#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->host; +#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = err; +#line 292 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); +#line 2441 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_account_info_available (PublishingFlickrFlickrPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2455 "FlickrPublishing.c" + } +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:299: EVENT: account information has become avail" \ +"able"); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_show_publishing_options_pane (self); +#line 2461 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self) { +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_publishing_options_pane_publish ((PublishingFlickrFlickrPublisher*) self, strip_metadata); +#line 2468 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self) { +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_publishing_options_pane_logout ((PublishingFlickrFlickrPublisher*) self); +#line 2475 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_publishing_options_pane_publish (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata) { + PublishingFlickrPublishingOptionsPane* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFlickrPublishingOptionsPane* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self); +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->publishing_options_pane; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self); +#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2506 "FlickrPublishing.c" + } +#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:310: EVENT: user clicked the 'Publish' button in" \ +" the publishing options pane"); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = strip_metadata; +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_publish (self, _tmp5_); +#line 2514 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_publishing_options_pane_logout (PublishingFlickrFlickrPublisher* self) { + PublishingFlickrPublishingOptionsPane* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingFlickrPublishingOptionsPane* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->publishing_options_pane; +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 315 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->publishing_options_pane; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp3_, NULL, FALSE); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self); +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp4_) { +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2544 "FlickrPublishing.c" + } +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:321: EVENT: user clicked the 'Logout' button in " \ +"the publishing options pane"); +#line 323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_logout (self); +#line 2550 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_upload_status_updated (PublishingFlickrFlickrPublisher* self, gint file_number, gdouble completed_fraction) { + gboolean _tmp0_ = FALSE; + gdouble _tmp1_ = 0.0; + SpitPublishingProgressCallback _tmp2_ = NULL; + void* _tmp2__target = NULL; + SpitPublishingProgressCallback _tmp3_ = NULL; + void* _tmp3__target = NULL; + gint _tmp4_ = 0; + gdouble _tmp5_ = 0.0; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2571 "FlickrPublishing.c" + } +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = completed_fraction; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:330: EVENT: uploader reports upload %.2f percent" \ +" complete.", 100.0 * _tmp1_); +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->progress_reporter; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2__target = self->priv->progress_reporter_target; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = file_number; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = completed_fraction; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 2593 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_upload_complete ((PublishingFlickrFlickrPublisher*) self, _sender, num_photos_published); +#line 2600 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_upload_error ((PublishingFlickrFlickrPublisher*) self, _sender, err); +#line 2607 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_upload_complete (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { + gboolean _tmp0_ = FALSE; + gint _tmp1_ = 0; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportBatchUploader* _tmp4_ = NULL; + guint _tmp5_ = 0U; +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2628 "FlickrPublishing.c" + } +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = num_published; +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:342: EVENT: uploader reports upload complete; %d" \ +" items published.", _tmp1_); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = uploader; +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = uploader; +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp5_, NULL, FALSE); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_show_success_pane (self); +#line 2648 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_on_upload_error (PublishingFlickrFlickrPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { + gboolean _tmp0_ = FALSE; + GError* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingRESTSupportBatchUploader* _tmp3_ = NULL; + guint _tmp4_ = 0U; + PublishingRESTSupportBatchUploader* _tmp5_ = NULL; + guint _tmp6_ = 0U; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp0_) { +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2672 "FlickrPublishing.c" + } +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = err; +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _tmp1_->message; +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:355: EVENT: uploader reports upload error = '%s'" \ +".", _tmp2_); +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = uploader; +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp4_, NULL, FALSE); +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = uploader; +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp6_, NULL, FALSE); +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = self->priv->host; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = err; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 2698 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked_spit_publishing_login_callback (gpointer self) { +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked ((PublishingFlickrFlickrPublisher*) self); +#line 2705 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_show_login_welcome_pane (PublishingFlickrFlickrPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:364: ACTION: installing login welcome pane"); +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_welcome_pane (_tmp1_, PUBLISHING_FLICKR_SERVICE_WELCOME_MESSAGE, _publishing_flickr_flickr_publisher_on_welcome_pane_login_clicked_spit_publishing_login_callback, self); +#line 2724 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_run_authentication_request_transaction (PublishingFlickrFlickrPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingFlickrAuthenticationRequestTransaction* txn = NULL; + PublishingFlickrSession* _tmp3_ = NULL; + PublishingFlickrAuthenticationRequestTransaction* _tmp4_ = NULL; + GError * _inner_error_ = NULL; +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:371: ACTION: running authentication request tran" \ +"saction"); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _ ("Preparing for login..."); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp1_, _tmp2_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->session; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_flickr_authentication_request_transaction_new (_tmp3_); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + txn = _tmp4_; +#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_completed_publishing_rest_support_transaction_completed, self, 0); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_flickr_flickr_publisher_on_auth_request_txn_error_publishing_rest_support_transaction_network_error, self, 0); +#line 2760 "FlickrPublishing.c" + { +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2768 "FlickrPublishing.c" + goto __catch16_spit_publishing_publishing_error; + } +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2779 "FlickrPublishing.c" + } + } + goto __finally16; + __catch16_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->host; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = err; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp6_); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 2800 "FlickrPublishing.c" + } + __finally16: +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 2813 "FlickrPublishing.c" + } +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 2817 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_parse_token_info_from_auth_request (PublishingFlickrFlickrPublisher* self, const gchar* response) { + const gchar* _tmp0_ = NULL; + gchar* oauth_token = NULL; + gchar* oauth_token_secret = NULL; + gchar** key_value_pairs = NULL; + const gchar* _tmp1_ = NULL; + gchar** _tmp2_ = NULL; + gchar** _tmp3_ = NULL; + gint key_value_pairs_length1 = 0; + gint _key_value_pairs_size_ = 0; + gchar** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + gboolean _tmp24_ = FALSE; + const gchar* _tmp25_ = NULL; + const gchar* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (response != NULL); +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = response; +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:388: ACTION: parsing authorization request respo" \ +"nse '%s' into token and secret", _tmp0_); +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + oauth_token = NULL; +#line 391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + oauth_token_secret = NULL; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = response; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "&", 0); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs = _tmp3_; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs_length1 = _vala_array_length (_tmp2_); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _key_value_pairs_size_ = key_value_pairs_length1; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = key_value_pairs; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4__length1 = key_value_pairs_length1; +#line 2863 "FlickrPublishing.c" + { + gchar** pair_collection = NULL; + gint pair_collection_length1 = 0; + gint _pair_collection_size_ = 0; + gint pair_it = 0; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + pair_collection = _tmp4_; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + pair_collection_length1 = _tmp4__length1; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (pair_it = 0; pair_it < _tmp4__length1; pair_it = pair_it + 1) { +#line 2875 "FlickrPublishing.c" + gchar* _tmp5_ = NULL; + gchar* pair = NULL; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup (pair_collection[pair_it]); +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + pair = _tmp5_; +#line 2882 "FlickrPublishing.c" + { + gchar** split_pair = NULL; + const gchar* _tmp6_ = NULL; + gchar** _tmp7_ = NULL; + gchar** _tmp8_ = NULL; + gint split_pair_length1 = 0; + gint _split_pair_size_ = 0; + gchar** _tmp9_ = NULL; + gint _tmp9__length1 = 0; + gchar** _tmp14_ = NULL; + gint _tmp14__length1 = 0; + const gchar* _tmp15_ = NULL; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = pair; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_ = g_strsplit (_tmp6_, "=", 0); +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair = _tmp8_; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair_length1 = _vala_array_length (_tmp7_); +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _split_pair_size_ = split_pair_length1; +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = split_pair; +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9__length1 = split_pair_length1; +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp9__length1 != 2) { +#line 2911 "FlickrPublishing.c" + SpitPublishingPluginHost* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + GError* _tmp12_ = NULL; + GError* _tmp13_ = NULL; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->host; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = response; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "'%s' isn't a valid response to an OAuth authentication request", _tmp11_); +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _tmp12_; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp10_, _tmp13_); +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp13_); +#line 2928 "FlickrPublishing.c" + } +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = split_pair; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14__length1 = split_pair_length1; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _tmp14_[0]; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp15_, "oauth_token") == 0) { +#line 2938 "FlickrPublishing.c" + gchar** _tmp16_ = NULL; + gint _tmp16__length1 = 0; + const gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = split_pair; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16__length1 = split_pair_length1; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = _tmp16_[1]; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = g_strdup (_tmp17_); +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (oauth_token); +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + oauth_token = _tmp18_; +#line 2955 "FlickrPublishing.c" + } else { + gchar** _tmp19_ = NULL; + gint _tmp19__length1 = 0; + const gchar* _tmp20_ = NULL; +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = split_pair; +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19__length1 = split_pair_length1; +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = _tmp19_[0]; +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp20_, "oauth_token_secret") == 0) { +#line 2968 "FlickrPublishing.c" + gchar** _tmp21_ = NULL; + gint _tmp21__length1 = 0; + const gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = split_pair; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21__length1 = split_pair_length1; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = _tmp21_[1]; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = g_strdup (_tmp22_); +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (oauth_token_secret); +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + oauth_token_secret = _tmp23_; +#line 2985 "FlickrPublishing.c" + } + } +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair = (_vala_array_free (split_pair, split_pair_length1, (GDestroyNotify) g_free), NULL); +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (pair); +#line 2992 "FlickrPublishing.c" + } + } + } +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = oauth_token; +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp25_ == NULL) { +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = TRUE; +#line 3002 "FlickrPublishing.c" + } else { + const gchar* _tmp26_ = NULL; +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = oauth_token_secret; +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = _tmp26_ == NULL; +#line 3009 "FlickrPublishing.c" + } +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp24_) { +#line 3013 "FlickrPublishing.c" + SpitPublishingPluginHost* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GError* _tmp29_ = NULL; + GError* _tmp30_ = NULL; +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = self->priv->host; +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = response; +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = g_error_new (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "'%s' isn't a valid response to an OAuth authentication request", _tmp28_); +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = _tmp29_; +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp27_, _tmp30_); +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp30_); +#line 3030 "FlickrPublishing.c" + } +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = oauth_token; +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = oauth_token_secret; +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_authentication_token_available (self, _tmp31_, _tmp32_); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs = (_vala_array_free (key_value_pairs, key_value_pairs_length1, (GDestroyNotify) g_free), NULL); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (oauth_token_secret); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (oauth_token); +#line 3044 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_launch_system_browser (PublishingFlickrFlickrPublisher* self, const gchar* token) { + gchar* login_uri = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GError * _inner_error_ = NULL; +#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = token; +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strconcat ("https://www.flickr.com/services/oauth/authorize?oauth_token=", _tmp0_, NULL); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _tmp1_; +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strconcat (_tmp2_, "&perms=write", NULL); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_; +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp2_); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + login_uri = _tmp4_; +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = login_uri; +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:419: ACTION: launching system browser with uri =" \ +" '%s'", _tmp5_); +#line 3079 "FlickrPublishing.c" + { + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = login_uri; +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = g_strconcat ("xdg-open ", _tmp6_, NULL); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_spawn_command_line_async (_tmp8_, &_inner_error_); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp8_); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == G_SPAWN_ERROR) { +#line 3098 "FlickrPublishing.c" + goto __catch17_g_spawn_error; + } +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (login_uri); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3109 "FlickrPublishing.c" + } + } + goto __finally17; + __catch17_g_spawn_error: + { + GError* e = NULL; + SpitPublishingPluginHost* _tmp9_ = NULL; + GError* _tmp10_ = NULL; + GError* _tmp11_ = NULL; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e = _inner_error_; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = self->priv->host; +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, "couldn't launch system web browser to complete Flickr login"); +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_; +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp9_, _tmp11_); +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp11_); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (login_uri); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3139 "FlickrPublishing.c" + } + __finally17: +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (login_uri); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3152 "FlickrPublishing.c" + } +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_system_browser_launched (self); +#line 415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (login_uri); +#line 3158 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_show_pin_entry_pane (PublishingFlickrFlickrPublisher* self) { + GtkBuilder* builder = NULL; + GtkBuilder* _tmp0_ = NULL; + PublishingFlickrPinEntryPane* pin_entry_pane = NULL; + GtkBuilder* _tmp8_ = NULL; + PublishingFlickrPinEntryPane* _tmp9_ = NULL; + PublishingFlickrPinEntryPane* _tmp10_ = NULL; + SpitPublishingPluginHost* _tmp11_ = NULL; + PublishingFlickrPinEntryPane* _tmp12_ = NULL; + GError * _inner_error_ = NULL; +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:433: ACTION: showing PIN entry pane"); +#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = gtk_builder_new (); +#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + builder = _tmp0_; +#line 3180 "FlickrPublishing.c" + { + GtkBuilder* _tmp1_ = NULL; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = builder; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_builder_add_from_resource (_tmp1_, PLUGIN_RESOURCE_PATH "/" "flickr_pin_entry_pane.ui", &_inner_error_); +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 3189 "FlickrPublishing.c" + goto __catch18_g_error; + } + } + goto __finally18; + __catch18_g_error: + { + GError* e = NULL; + GError* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; + GError* _tmp7_ = NULL; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e = _inner_error_; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = e; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_->message; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:441: Could not parse UI file! Error: %s.", _tmp3_); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->host; +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _ ("A file required for publishing is unavailable. Publishing to Flickr ca" \ +"n't continue."); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp5_); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp4_, _tmp7_); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp7_); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3231 "FlickrPublishing.c" + } + __finally18: +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3244 "FlickrPublishing.c" + } +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = builder; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = publishing_flickr_pin_entry_pane_new (_tmp8_); +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + pin_entry_pane = _tmp9_; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = pin_entry_pane; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp10_, "proceed", (GCallback) _publishing_flickr_flickr_publisher_on_pin_entry_proceed_publishing_flickr_pin_entry_pane_proceed, self, 0); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = self->priv->host; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = pin_entry_pane; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (pin_entry_pane); +#line 432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 3266 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_verify_pin (PublishingFlickrFlickrPublisher* self, const gchar* pin) { + const gchar* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + PublishingFlickrAccessTokenFetchTransaction* txn = NULL; + PublishingFlickrSession* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + PublishingFlickrAccessTokenFetchTransaction* _tmp6_ = NULL; + GError * _inner_error_ = NULL; +#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (pin != NULL); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = pin; +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:454: ACTION: validating authorization PIN %s", _tmp0_); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->host; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _ ("Verifying authorization..."); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp2_, _tmp3_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->session; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = pin; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_flickr_access_token_fetch_transaction_new (_tmp4_, _tmp5_); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + txn = _tmp6_; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_txn_completed_publishing_rest_support_transaction_completed, self, 0); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_flickr_flickr_publisher_on_access_token_fetch_error_publishing_rest_support_transaction_network_error, self, 0); +#line 3310 "FlickrPublishing.c" + { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3318 "FlickrPublishing.c" + goto __catch19_spit_publishing_publishing_error; + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3329 "FlickrPublishing.c" + } + } + goto __finally19; + __catch19_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = self->priv->host; +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = err; +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 3350 "FlickrPublishing.c" + } + __finally19: +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3363 "FlickrPublishing.c" + } +#line 453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 3367 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_extract_access_phase_credentials_from_reponse (PublishingFlickrFlickrPublisher* self, const gchar* response) { + const gchar* _tmp0_ = NULL; + gchar** key_value_pairs = NULL; + const gchar* _tmp1_ = NULL; + gchar** _tmp2_ = NULL; + gchar** _tmp3_ = NULL; + gint key_value_pairs_length1 = 0; + gint _key_value_pairs_size_ = 0; + gchar* token = NULL; + gchar* token_secret = NULL; + gchar* username = NULL; + gchar** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + gboolean _tmp28_ = FALSE; + gboolean _tmp29_ = FALSE; + const gchar* _tmp30_ = NULL; + PublishingFlickrSession* _tmp36_ = NULL; + const gchar* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; + const gchar* _tmp39_ = NULL; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (response != NULL); +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = response; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:471: ACTION: extracting access phase credentials" \ +" from '%s'", _tmp0_); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = response; +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "&", 0); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs = _tmp3_; +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs_length1 = _vala_array_length (_tmp2_); +#line 473 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _key_value_pairs_size_ = key_value_pairs_length1; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + token = NULL; +#line 476 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + token_secret = NULL; +#line 477 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + username = NULL; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = key_value_pairs; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4__length1 = key_value_pairs_length1; +#line 3422 "FlickrPublishing.c" + { + gchar** key_value_pair_collection = NULL; + gint key_value_pair_collection_length1 = 0; + gint _key_value_pair_collection_size_ = 0; + gint key_value_pair_it = 0; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pair_collection = _tmp4_; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pair_collection_length1 = _tmp4__length1; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (key_value_pair_it = 0; key_value_pair_it < _tmp4__length1; key_value_pair_it = key_value_pair_it + 1) { +#line 3434 "FlickrPublishing.c" + gchar* _tmp5_ = NULL; + gchar* key_value_pair = NULL; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup (key_value_pair_collection[key_value_pair_it]); +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pair = _tmp5_; +#line 3441 "FlickrPublishing.c" + { + gchar** split_pair = NULL; + const gchar* _tmp6_ = NULL; + gchar** _tmp7_ = NULL; + gchar** _tmp8_ = NULL; + gint split_pair_length1 = 0; + gint _split_pair_size_ = 0; + gchar** _tmp9_ = NULL; + gint _tmp9__length1 = 0; + gchar* key = NULL; + gchar** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* value = NULL; + gchar** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = key_value_pair; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_ = g_strsplit (_tmp6_, "=", 0); +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair = _tmp8_; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair_length1 = _vala_array_length (_tmp7_); +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _split_pair_size_ = split_pair_length1; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = split_pair; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9__length1 = split_pair_length1; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp9__length1 != 2) { +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair = (_vala_array_free (split_pair, split_pair_length1, (GDestroyNotify) g_free), NULL); +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (key_value_pair); +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + continue; +#line 3484 "FlickrPublishing.c" + } +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = split_pair; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10__length1 = split_pair_length1; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_[0]; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_strdup (_tmp11_); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key = _tmp12_; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = split_pair; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13__length1 = split_pair_length1; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = _tmp13_[1]; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = g_strdup (_tmp14_); +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value = _tmp15_; +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = key; +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp16_, "oauth_token") == 0) { +#line 3510 "FlickrPublishing.c" + const gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = value; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = g_strdup (_tmp17_); +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (token); +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + token = _tmp18_; +#line 3521 "FlickrPublishing.c" + } else { + const gchar* _tmp19_ = NULL; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = key; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp19_, "oauth_token_secret") == 0) { +#line 3528 "FlickrPublishing.c" + const gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = value; +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = g_strdup (_tmp20_); +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (token_secret); +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + token_secret = _tmp21_; +#line 3539 "FlickrPublishing.c" + } else { + const gchar* _tmp22_ = NULL; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = key; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp22_, "username") == 0) { +#line 3546 "FlickrPublishing.c" + const gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = value; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = g_strdup (_tmp23_); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (username); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + username = _tmp24_; +#line 3557 "FlickrPublishing.c" + } + } + } +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (value); +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (key); +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + split_pair = (_vala_array_free (split_pair, split_pair_length1, (GDestroyNotify) g_free), NULL); +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (key_value_pair); +#line 3569 "FlickrPublishing.c" + } + } + } +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = token; +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = token_secret; +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = username; +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:495: access phase credentials: { token = '%s'; t" \ +"oken_secret = '%s'; username = '%s' }", _tmp25_, _tmp26_, _tmp27_); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = token; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp30_ == NULL) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = TRUE; +#line 3587 "FlickrPublishing.c" + } else { + const gchar* _tmp31_ = NULL; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = token_secret; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = _tmp31_ == NULL; +#line 3594 "FlickrPublishing.c" + } +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp29_) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = TRUE; +#line 3600 "FlickrPublishing.c" + } else { + const gchar* _tmp32_ = NULL; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = username; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = _tmp32_ == NULL; +#line 3607 "FlickrPublishing.c" + } +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp28_) { +#line 3611 "FlickrPublishing.c" + SpitPublishingPluginHost* _tmp33_ = NULL; + GError* _tmp34_ = NULL; + GError* _tmp35_ = NULL; +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = self->priv->host; +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "expected " "access phase credentials to contain token, token secret, and username " \ +"but at " "least one of these is absent"); +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = _tmp34_; +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp33_, _tmp35_); +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp35_); +#line 3625 "FlickrPublishing.c" + } +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = self->priv->session; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = token; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = token_secret; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp39_ = username; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_set_access_phase_credentials (_tmp36_, _tmp37_, _tmp38_, _tmp39_); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (username); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (token_secret); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (token); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + key_value_pairs = (_vala_array_free (key_value_pairs, key_value_pairs_length1, (GDestroyNotify) g_free), NULL); +#line 3645 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_fetch_account_info (PublishingFlickrFlickrPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingFlickrAccountInfoFetchTransaction* txn = NULL; + PublishingFlickrSession* _tmp2_ = NULL; + PublishingFlickrAccountInfoFetchTransaction* _tmp3_ = NULL; + GError * _inner_error_ = NULL; +#line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:507: ACTION: running network transaction to fetc" \ +"h account information"); +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->session; +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_account_info_fetch_transaction_new (_tmp2_); +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + txn = _tmp3_; +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_completed_publishing_rest_support_transaction_completed, self, 0); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_flickr_flickr_publisher_on_account_fetch_txn_error_publishing_rest_support_transaction_network_error, self, 0); +#line 3678 "FlickrPublishing.c" + { +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (txn, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3686 "FlickrPublishing.c" + goto __catch20_spit_publishing_publishing_error; + } +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3697 "FlickrPublishing.c" + } + } + goto __finally20; + __catch20_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + GError* _tmp5_ = NULL; +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->host; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = err; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp4_, _tmp5_); +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 3718 "FlickrPublishing.c" + } + __finally20: +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3731 "FlickrPublishing.c" + } +#line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (txn); +#line 3735 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_parse_account_info_from_xml (PublishingFlickrFlickrPublisher* self, const gchar* xml) { + const gchar* _tmp0_ = NULL; + GError * _inner_error_ = NULL; +#line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (xml != NULL); +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = xml; +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:524: ACTION: parsing account information from xm" \ +"l = '%s'", _tmp0_); +#line 3750 "FlickrPublishing.c" + { + PublishingRESTSupportXmlDocument* response_doc = NULL; + const gchar* _tmp1_ = NULL; + PublishingRESTSupportXmlDocument* _tmp2_ = NULL; + xmlNode* root_node = NULL; + PublishingRESTSupportXmlDocument* _tmp3_ = NULL; + xmlNode* _tmp4_ = NULL; + xmlNode* user_node = NULL; + PublishingRESTSupportXmlDocument* _tmp5_ = NULL; + xmlNode* _tmp6_ = NULL; + xmlNode* _tmp7_ = NULL; + gchar* is_pro_str = NULL; + PublishingRESTSupportXmlDocument* _tmp8_ = NULL; + xmlNode* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + xmlNode* bandwidth_node = NULL; + PublishingRESTSupportXmlDocument* _tmp11_ = NULL; + xmlNode* _tmp12_ = NULL; + xmlNode* _tmp13_ = NULL; + gchar* remaining_kb_str = NULL; + PublishingRESTSupportXmlDocument* _tmp14_ = NULL; + xmlNode* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + PublishingFlickrUserKind user_kind = 0; + const gchar* _tmp17_ = NULL; + gint quota_mb_left = 0; + const gchar* _tmp20_ = NULL; + gint _tmp21_ = 0; + PublishingFlickrPublishingParameters* _tmp22_ = NULL; + gint _tmp23_ = 0; + PublishingFlickrPublishingParameters* _tmp24_ = NULL; + PublishingFlickrUserKind _tmp25_ = 0; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = xml; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_transaction_parse_flickr_response (_tmp1_, &_inner_error_); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + response_doc = _tmp2_; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3793 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3802 "FlickrPublishing.c" + } +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = response_doc; +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_rest_support_xml_document_get_root_node (_tmp3_); +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + root_node = _tmp4_; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = response_doc; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = root_node; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = publishing_rest_support_xml_document_get_named_child (_tmp5_, _tmp6_, "user", &_inner_error_); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + user_node = _tmp7_; +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3824 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3835 "FlickrPublishing.c" + } +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = response_doc; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = user_node; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = publishing_rest_support_xml_document_get_property_value (_tmp8_, _tmp9_, "ispro", &_inner_error_); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + is_pro_str = _tmp10_; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3851 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3862 "FlickrPublishing.c" + } +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = response_doc; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = user_node; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = publishing_rest_support_xml_document_get_named_child (_tmp11_, _tmp12_, "bandwidth", &_inner_error_); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + bandwidth_node = _tmp13_; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3880 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3893 "FlickrPublishing.c" + } +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = response_doc; +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = bandwidth_node; +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = publishing_rest_support_xml_document_get_property_value (_tmp14_, _tmp15_, "remainingkb", &_inner_error_); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + remaining_kb_str = _tmp16_; +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3911 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3924 "FlickrPublishing.c" + } +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = is_pro_str; +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp17_, "0") == 0) { +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + user_kind = PUBLISHING_FLICKR_USER_KIND_FREE; +#line 3932 "FlickrPublishing.c" + } else { + const gchar* _tmp18_ = NULL; +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = is_pro_str; +#line 540 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp18_, "1") == 0) { +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + user_kind = PUBLISHING_FLICKR_USER_KIND_PRO; +#line 3941 "FlickrPublishing.c" + } else { + GError* _tmp19_ = NULL; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "Unable to determine if user has free or pro account"); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = _tmp19_; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (remaining_kb_str); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3956 "FlickrPublishing.c" + goto __catch21_spit_publishing_publishing_error; + } +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (remaining_kb_str); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 3971 "FlickrPublishing.c" + } + } +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = remaining_kb_str; +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = atoi (_tmp20_); +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + quota_mb_left = _tmp21_ / 1024; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = self->priv->parameters; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = quota_mb_left; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_->quota_free_mb = _tmp23_; +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = self->priv->parameters; +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = user_kind; +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_->user_kind = _tmp25_; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (remaining_kb_str); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (is_pro_str); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 3998 "FlickrPublishing.c" + } + goto __finally21; + __catch21_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp26_ = NULL; + SpitPublishingPluginHost* _tmp27_ = NULL; + GError* _tmp28_ = NULL; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = err; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_error_matches (_tmp26_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION)) { +#line 556 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_logout (self); +#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4021 "FlickrPublishing.c" + } +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = self->priv->host; +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = err; +#line 560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp27_, _tmp28_); +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4033 "FlickrPublishing.c" + } + __finally21: +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4044 "FlickrPublishing.c" + } +#line 564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_account_info_available (self); +#line 4048 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_logout (PublishingFlickrFlickrPublisher* self) { + PublishingFlickrSession* _tmp0_ = NULL; +#line 567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:568: ACTION: logging user out, deauthenticating " \ +"session, and erasing stored credentials"); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->session; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_deauthenticate (_tmp0_); +#line 571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_invalidate_persistent_session (self); +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->running = FALSE; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_attempt_start (self); +#line 4068 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_show_publishing_options_pane (PublishingFlickrFlickrPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + GtkBuilder* builder = NULL; + GtkBuilder* _tmp1_ = NULL; + PublishingFlickrPublishingParameters* _tmp9_ = NULL; + SpitPublishingPluginHost* _tmp10_ = NULL; + SpitPublishingPublisherMediaType _tmp11_ = 0; + GtkBuilder* _tmp12_ = NULL; + gboolean _tmp13_ = FALSE; + PublishingFlickrPublishingOptionsPane* _tmp14_ = NULL; + PublishingFlickrPublishingOptionsPane* _tmp15_ = NULL; + PublishingFlickrPublishingOptionsPane* _tmp16_ = NULL; + SpitPublishingPluginHost* _tmp17_ = NULL; + PublishingFlickrPublishingOptionsPane* _tmp18_ = NULL; + GError * _inner_error_ = NULL; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:579: ACTION: displaying publishing options pane"); +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = gtk_builder_new (); +#line 583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + builder = _tmp1_; +#line 4099 "FlickrPublishing.c" + { + GtkBuilder* _tmp2_ = NULL; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = builder; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/" "flickr_publishing_options_pane.ui", &_inner_error_); +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 4108 "FlickrPublishing.c" + goto __catch22_g_error; + } + } + goto __finally22; + __catch22_g_error: + { + GError* e = NULL; + GError* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + SpitPublishingPluginHost* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + GError* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e = _inner_error_; +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = e; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_->message; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:591: Could not parse UI file! Error: %s.", _tmp4_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->host; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _ ("A file required for publishing is unavailable. Publishing to Flickr ca" \ +"n't continue."); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp6_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp5_, _tmp8_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (_tmp8_); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4150 "FlickrPublishing.c" + } + __finally22: +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4163 "FlickrPublishing.c" + } +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = self->priv->parameters; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->host; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = spit_publishing_plugin_host_get_publishable_media_type (_tmp10_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = builder; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = publishing_flickr_flickr_publisher_get_persistent_strip_metadata (self); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = publishing_flickr_publishing_options_pane_new (self, _tmp9_, _tmp11_, _tmp12_, _tmp13_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publishing_options_pane); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publishing_options_pane = _tmp14_; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = self->priv->publishing_options_pane; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp15_, "publish", (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_publish_publishing_flickr_publishing_options_pane_publish, self, 0); +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = self->priv->publishing_options_pane; +#line 601 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp16_, "logout", (GCallback) _publishing_flickr_flickr_publisher_on_publishing_options_pane_logout_publishing_flickr_publishing_options_pane_logout, self, 0); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = self->priv->host; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = self->priv->publishing_options_pane; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (builder); +#line 4197 "FlickrPublishing.c" +} + + +gint publishing_flickr_flickr_publisher_flickr_date_time_compare_func (SpitPublishingPublishable* a, SpitPublishingPublishable* b) { + gint result = 0; + SpitPublishingPublishable* _tmp0_ = NULL; + GDateTime* _tmp1_ = NULL; + GDateTime* _tmp2_ = NULL; + SpitPublishingPublishable* _tmp3_ = NULL; + GDateTime* _tmp4_ = NULL; + GDateTime* _tmp5_ = NULL; + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (a), 0); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (b), 0); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = a; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_publishing_publishable_get_exposure_date_time (_tmp0_); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _tmp1_; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = b; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = spit_publishing_publishable_get_exposure_date_time (_tmp3_); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_date_time_compare (_tmp2_, _tmp5_); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_date_time_unref0 (_tmp5_); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_date_time_unref0 (_tmp2_); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp7_; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4239 "FlickrPublishing.c" +} + + +static gint _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) { + gint result; + result = publishing_flickr_flickr_publisher_flickr_date_time_compare_func ((SpitPublishingPublishable*) a, (SpitPublishingPublishable*) b); +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4248 "FlickrPublishing.c" +} + + +static void _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_on_upload_status_updated ((PublishingFlickrFlickrPublisher*) self, file_number, fraction_complete); +#line 4255 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_publish (PublishingFlickrFlickrPublisher* self, gboolean strip_metadata) { + gboolean _tmp0_ = FALSE; + SpitPublishingPluginHost* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + PublishingFlickrPublishingParameters* _tmp3_ = NULL; + gint _tmp4_ = 0; + gboolean _tmp5_ = FALSE; + void* _tmp6_ = NULL; + GDestroyNotify _tmp7_ = NULL; + SpitPublishingProgressCallback _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp10_ = NULL; + gint _tmp11_ = 0; + SpitPublishingPublishable** _tmp12_ = NULL; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + GeeArrayList* sorted_list = NULL; + GeeArrayList* _tmp13_ = NULL; + SpitPublishingPublishable** _tmp14_ = NULL; + gint _tmp14__length1 = 0; + GeeArrayList* _tmp18_ = NULL; + PublishingFlickrUploader* uploader = NULL; + PublishingFlickrSession* _tmp19_ = NULL; + GeeArrayList* _tmp20_ = NULL; + gint _tmp21_ = 0; + gpointer* _tmp22_ = NULL; + SpitPublishingPublishable** _tmp23_ = NULL; + gint _tmp23__length1 = 0; + PublishingFlickrPublishingParameters* _tmp24_ = NULL; + gboolean _tmp25_ = FALSE; + PublishingFlickrUploader* _tmp26_ = NULL; + PublishingFlickrUploader* _tmp27_ = NULL; + PublishingFlickrUploader* _tmp28_ = NULL; + PublishingFlickrUploader* _tmp29_ = NULL; + PublishingFlickrUploader* _tmp30_ = NULL; +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = strip_metadata; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_strip_metadata (self, _tmp0_); +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:612: ACTION: uploading media items to remote ser" \ +"ver."); +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->host; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->parameters; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_->photo_major_axis_size; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = strip_metadata; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = spit_publishing_plugin_host_serialize_publishables (_tmp2_, _tmp4_, _tmp5_, &_tmp6_, &_tmp7_); +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter = _tmp8_; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target = _tmp6_; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp7_; +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp9_) { +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4337 "FlickrPublishing.c" + } +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->host; +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = spit_publishing_plugin_host_get_publishables (_tmp10_, &_tmp11_); +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishables = _tmp12_; +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishables_length1 = _tmp11_; +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishables_size_ = publishables_length1; +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = gee_array_list_new (SPIT_PUBLISHING_TYPE_PUBLISHABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + sorted_list = _tmp13_; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = publishables; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14__length1 = publishables_length1; +#line 4357 "FlickrPublishing.c" + { + SpitPublishingPublishable** p_collection = NULL; + gint p_collection_length1 = 0; + gint _p_collection_size_ = 0; + gint p_it = 0; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + p_collection = _tmp14_; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + p_collection_length1 = _tmp14__length1; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (p_it = 0; p_it < _tmp14__length1; p_it = p_it + 1) { +#line 4369 "FlickrPublishing.c" + SpitPublishingPublishable* _tmp15_ = NULL; + SpitPublishingPublishable* p = NULL; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _g_object_ref0 (p_collection[p_it]); +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + p = _tmp15_; +#line 4376 "FlickrPublishing.c" + { + GeeArrayList* _tmp16_ = NULL; + SpitPublishingPublishable* _tmp17_ = NULL; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = sorted_list; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = p; +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (p); +#line 4388 "FlickrPublishing.c" + } + } + } +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = sorted_list; +#line 631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gee_list_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_LIST, GeeList), _publishing_flickr_flickr_publisher_flickr_date_time_compare_func_gcompare_data_func, NULL, NULL); +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = self->priv->session; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = sorted_list; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp21_); +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = _tmp22_; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23__length1 = _tmp21_; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = self->priv->parameters; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = strip_metadata; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = publishing_flickr_uploader_new (_tmp19_, _tmp23_, _tmp21_, _tmp24_, _tmp25_); +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = _tmp26_; +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = (_vala_array_free (_tmp23_, _tmp23__length1, (GDestroyNotify) g_object_unref), NULL); +#line 633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + uploader = _tmp27_; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = uploader; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_flickr_flickr_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = uploader; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_flickr_flickr_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = uploader; +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_flickr_flickr_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_batch_uploader_unref0 (uploader); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (sorted_list); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 4436 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_do_show_success_pane (PublishingFlickrFlickrPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:640: ACTION: showing success pane."); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->host; +#line 643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 4455 "FlickrPublishing.c" +} + + +gint publishing_flickr_flickr_publisher_get_persistent_visibility (PublishingFlickrFlickrPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), 0); +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "visibility", 0); +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4473 "FlickrPublishing.c" +} + + +void publishing_flickr_flickr_publisher_set_persistent_visibility (PublishingFlickrFlickrPublisher* self, gint vis) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = vis; +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "visibility", _tmp1_); +#line 4488 "FlickrPublishing.c" +} + + +gint publishing_flickr_flickr_publisher_get_persistent_default_size (PublishingFlickrFlickrPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self), 0); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", 1); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4506 "FlickrPublishing.c" +} + + +void publishing_flickr_flickr_publisher_set_persistent_default_size (PublishingFlickrFlickrPublisher* self, gint size) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->host; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = size; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default_size", _tmp1_); +#line 4521 "FlickrPublishing.c" +} + + +static SpitPublishingService* publishing_flickr_flickr_publisher_real_get_service (SpitPublishingPublisher* base) { + PublishingFlickrFlickrPublisher * self; + SpitPublishingService* result = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingService* _tmp1_ = NULL; +#line 662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->service; +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4540 "FlickrPublishing.c" +} + + +static gboolean publishing_flickr_flickr_publisher_real_is_running (SpitPublishingPublisher* base) { + PublishingFlickrFlickrPublisher * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->running; +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp0_; +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4556 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_attempt_start (PublishingFlickrFlickrPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (self)); +#line 673 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->running = TRUE; +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->was_started = TRUE; +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = publishing_flickr_flickr_publisher_is_persistent_session_valid (self); +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_) { +#line 4572 "FlickrPublishing.c" + PublishingFlickrSession* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 677 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:677: attempt start: a persistent session is avai" \ +"lable; using it"); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->session; +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_token (self); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_; +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_token_secret (self); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_flickr_flickr_publisher_get_persistent_access_phase_username (self); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_authenticate_from_persistent_credentials (_tmp1_, _tmp3_, _tmp5_, _tmp7_); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp5_); +#line 679 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp3_); +#line 4604 "FlickrPublishing.c" + } else { +#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:682: attempt start: no persistent session availa" \ +"ble; showing login welcome pane"); +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_do_show_login_welcome_pane (self); +#line 4610 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_flickr_publisher_real_start (SpitPublishingPublisher* base) { + PublishingFlickrFlickrPublisher * self; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; +#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_) { +#line 690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 4627 "FlickrPublishing.c" + } +#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->was_started; +#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp1_) { +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_error ("FlickrPublishing.vala:693: FlickrPublisher: start( ): can't start; thi" \ +"s publisher is not restartable."); +#line 4635 "FlickrPublishing.c" + } +#line 695 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:695: FlickrPublisher: starting interaction."); +#line 697 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_attempt_start (self); +#line 4641 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_real_stop (SpitPublishingPublisher* base) { + PublishingFlickrFlickrPublisher * self; + PublishingFlickrSession* _tmp0_ = NULL; +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); +#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:701: FlickrPublisher: stop( ) invoked."); +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->session; +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_ != NULL) { +#line 4656 "FlickrPublishing.c" + PublishingFlickrSession* _tmp1_ = NULL; +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->session; +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_session_stop_transactions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 4662 "FlickrPublishing.c" + } +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->running = FALSE; +#line 4666 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_class_init (PublishingFlickrFlickrPublisherClass * klass) { +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_parent_class = g_type_class_peek_parent (klass); +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrFlickrPublisherPrivate)); +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_flickr_flickr_publisher_finalize; +#line 4677 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_service = (SpitPublishingService* (*)(SpitPublishingPublisher*)) publishing_flickr_flickr_publisher_real_get_service; +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->is_running = (gboolean (*)(SpitPublishingPublisher*)) publishing_flickr_flickr_publisher_real_is_running; +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->start = (void (*)(SpitPublishingPublisher*)) publishing_flickr_flickr_publisher_real_start; +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->stop = (void (*)(SpitPublishingPublisher*)) publishing_flickr_flickr_publisher_real_stop; +#line 4692 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_instance_init (PublishingFlickrFlickrPublisher * self) { +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_FLICKR_PUBLISHER_GET_PRIVATE (self); +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->running = FALSE; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->was_started = FALSE; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->session = NULL; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publishing_options_pane = NULL; +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = NULL; +#line 4711 "FlickrPublishing.c" +} + + +static void publishing_flickr_flickr_publisher_finalize (GObject* obj) { + PublishingFlickrFlickrPublisher * self; + PublishingFlickrSession* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_FLICKR_PUBLISHER, PublishingFlickrFlickrPublisher); +#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->session; +#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("authenticated", PUBLISHING_REST_SUPPORT_TYPE_SESSION, &_tmp1_, NULL, FALSE); +#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_flickr_publisher_on_session_authenticated_publishing_rest_support_session_authenticated, self); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter = NULL; +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publishing_options_pane); +#line 108 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (publishing_flickr_flickr_publisher_parent_class)->finalize (obj); +#line 4747 "FlickrPublishing.c" +} + + +GType publishing_flickr_flickr_publisher_get_type (void) { + static volatile gsize publishing_flickr_flickr_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_flickr_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrFlickrPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_flickr_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrFlickrPublisher), 0, (GInstanceInitFunc) publishing_flickr_flickr_publisher_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_flickr_flickr_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_flickr_flickr_publisher_type_id; + publishing_flickr_flickr_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFlickrFlickrPublisher", &g_define_type_info, 0); + g_type_add_interface_static (publishing_flickr_flickr_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info); + g_once_init_leave (&publishing_flickr_flickr_publisher_type_id__volatile, publishing_flickr_flickr_publisher_type_id); + } + return publishing_flickr_flickr_publisher_type_id__volatile; +} + + +PublishingFlickrPinEntryPane* publishing_flickr_pin_entry_pane_construct (GType object_type, GtkBuilder* builder) { + PublishingFlickrPinEntryPane * self = NULL; + GtkBuilder* _tmp0_ = NULL; + GtkBuilder* _tmp1_ = NULL; + GtkBuilder* _tmp2_ = NULL; + GtkBuilder* _tmp3_ = NULL; + GSList* _tmp4_ = NULL; + GSList* _tmp5_ = NULL; + guint _tmp6_ = 0U; + GtkBuilder* _tmp7_ = NULL; + GObject* _tmp8_ = NULL; + GtkLabel* _tmp9_ = NULL; + GtkBuilder* _tmp10_ = NULL; + GObject* _tmp11_ = NULL; + GtkLabel* _tmp12_ = NULL; + GtkBuilder* _tmp13_ = NULL; + GObject* _tmp14_ = NULL; + GtkEntry* _tmp15_ = NULL; + GtkBuilder* _tmp16_ = NULL; + GObject* _tmp17_ = NULL; + GtkButton* _tmp18_ = NULL; + GtkBuilder* _tmp19_ = NULL; + GObject* _tmp20_ = NULL; + GtkBox* _tmp21_ = NULL; + GtkBox* _tmp22_ = NULL; +#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); +#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrPinEntryPane*) g_object_new (object_type, NULL); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = builder; +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->builder = _tmp1_; +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = builder; +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp2_ != NULL, "builder != null"); +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = builder; +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = gtk_builder_get_objects (_tmp3_); +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_slist_length (_tmp5_); +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0"); +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_slist_free0 (_tmp5_); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = builder; +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = gtk_builder_get_object (_tmp7_, "explanatory_text"); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->explanatory_text); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->explanatory_text = _tmp9_; +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = builder; +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = gtk_builder_get_object (_tmp10_, "pin_entry_caption"); +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp11_) : NULL); +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pin_entry_caption); +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pin_entry_caption = _tmp12_; +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = builder; +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = gtk_builder_get_object (_tmp13_, "pin_entry"); +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp14_) : NULL); +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pin_entry); +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pin_entry = _tmp15_; +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = builder; +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = gtk_builder_get_object (_tmp16_, "continue_button"); +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, gtk_button_get_type ()) ? ((GtkButton*) _tmp17_) : NULL); +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->continue_button); +#line 728 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->continue_button = _tmp18_; +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = builder; +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = gtk_builder_get_object (_tmp19_, "pane_widget"); +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, gtk_box_get_type ()) ? ((GtkBox*) _tmp20_) : NULL); +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pane_widget = _tmp21_; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = self->priv->pane_widget; +#line 732 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget)); +#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed (self); +#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 4876 "FlickrPublishing.c" +} + + +PublishingFlickrPinEntryPane* publishing_flickr_pin_entry_pane_new (GtkBuilder* builder) { +#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_pin_entry_pane_construct (PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, builder); +#line 4883 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_on_continue_clicked (PublishingFlickrPinEntryPane* self) { + GtkEntry* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 737 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PIN_ENTRY_PANE (self)); +#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->pin_entry; +#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = gtk_entry_get_text (_tmp0_); +#line 738 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (self, "proceed", self, _tmp1_); +#line 4898 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed (PublishingFlickrPinEntryPane* self) { + GtkButton* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + guint _tmp2_ = 0U; + guint _tmp3_ = 0U; +#line 741 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PIN_ENTRY_PANE (self)); +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->continue_button; +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->pin_entry; +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = gtk_entry_get_text_length (_tmp1_); +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_; +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), _tmp3_ > ((guint) 0)); +#line 4919 "FlickrPublishing.c" +} + + +static GtkWidget* publishing_flickr_pin_entry_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingFlickrPinEntryPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 745 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane); +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4938 "FlickrPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_flickr_pin_entry_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingFlickrPinEntryPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane); +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 4951 "FlickrPublishing.c" +} + + +static void _publishing_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_pin_entry_pane_on_continue_clicked ((PublishingFlickrPinEntryPane*) self); +#line 4958 "FlickrPublishing.c" +} + + +static void _publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed ((PublishingFlickrPinEntryPane*) self); +#line 4965 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingFlickrPinEntryPane * self; + GtkButton* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; +#line 753 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane); +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->continue_button; +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp0_, "clicked", (GCallback) _publishing_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self, 0); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->pin_entry; +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self, 0); +#line 4983 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingFlickrPinEntryPane * self; + GtkButton* _tmp0_ = NULL; + guint _tmp1_ = 0U; + GtkEntry* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 758 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane); +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->continue_button; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp1_, NULL, FALSE); +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_pin_entry_pane_on_continue_clicked_gtk_button_clicked, self); +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->pin_entry; +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("changed", GTK_TYPE_EDITABLE, &_tmp3_, NULL, FALSE); +#line 760 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_EDITABLE, GtkEditable), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_flickr_pin_entry_pane_on_pin_entry_contents_changed_gtk_editable_changed, self); +#line 5007 "FlickrPublishing.c" +} + + +static void g_cclosure_user_marshal_VOID__OBJECT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__OBJECT_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer data2); + register GMarshalFunc_VOID__OBJECT_STRING callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (n_param_values == 3); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + data1 = closure->data; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + data2 = param_values->data[0].v_pointer; +#line 5026 "FlickrPublishing.c" + } else { +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + data1 = param_values->data[0].v_pointer; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + data2 = closure->data; +#line 5032 "FlickrPublishing.c" + } +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + callback = (GMarshalFunc_VOID__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), data2); +#line 5038 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_class_init (PublishingFlickrPinEntryPaneClass * klass) { +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_pin_entry_pane_parent_class = g_type_class_peek_parent (klass); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrPinEntryPanePrivate)); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_flickr_pin_entry_pane_finalize; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_new ("proceed", PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, G_TYPE_STRING); +#line 5051 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_pin_entry_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_flickr_pin_entry_pane_real_get_widget; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_flickr_pin_entry_pane_real_get_preferred_geometry; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_flickr_pin_entry_pane_real_on_pane_installed; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_flickr_pin_entry_pane_real_on_pane_uninstalled; +#line 5066 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_instance_init (PublishingFlickrPinEntryPane * self) { +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_PIN_ENTRY_PANE_GET_PRIVATE (self); +#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pane_widget = NULL; +#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->continue_button = NULL; +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pin_entry = NULL; +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pin_entry_caption = NULL; +#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->explanatory_text = NULL; +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->builder = NULL; +#line 5085 "FlickrPublishing.c" +} + + +static void publishing_flickr_pin_entry_pane_finalize (GObject* obj) { + PublishingFlickrPinEntryPane * self; +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_PIN_ENTRY_PANE, PublishingFlickrPinEntryPane); +#line 711 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 712 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->continue_button); +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pin_entry); +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pin_entry_caption); +#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->explanatory_text); +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (publishing_flickr_pin_entry_pane_parent_class)->finalize (obj); +#line 5107 "FlickrPublishing.c" +} + + +GType publishing_flickr_pin_entry_pane_get_type (void) { + static volatile gsize publishing_flickr_pin_entry_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_pin_entry_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrPinEntryPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_pin_entry_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrPinEntryPane), 0, (GInstanceInitFunc) publishing_flickr_pin_entry_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_flickr_pin_entry_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_flickr_pin_entry_pane_type_id; + publishing_flickr_pin_entry_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFlickrPinEntryPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_flickr_pin_entry_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_flickr_pin_entry_pane_type_id__volatile, publishing_flickr_pin_entry_pane_type_id); + } + return publishing_flickr_pin_entry_pane_type_id__volatile; +} + + +PublishingFlickrTransaction* publishing_flickr_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method) { + PublishingFlickrTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + PublishingRESTSupportHttpMethod _tmp1_ = 0; + PublishingFlickrSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + PublishingFlickrSession* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 767 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 767 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = method; +#line 767 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_); +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = session; +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_session_get_oauth_nonce (_tmp2_); +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_; +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp4_); +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp4_); +#line 770 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "oob"); +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = session; +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_flickr_session_get_oauth_timestamp (_tmp5_); +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp7_); +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 774 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", PUBLISHING_FLICKR_API_KEY); +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 5173 "FlickrPublishing.c" +} + + +PublishingFlickrTransaction* publishing_flickr_transaction_new (PublishingFlickrSession* session, PublishingRESTSupportHttpMethod method) { +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_transaction_construct (PUBLISHING_FLICKR_TYPE_TRANSACTION, session, method); +#line 5180 "FlickrPublishing.c" +} + + +PublishingFlickrTransaction* publishing_flickr_transaction_construct_with_uri (GType object_type, PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { + PublishingFlickrTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingRESTSupportHttpMethod _tmp2_ = 0; + PublishingFlickrSession* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + PublishingFlickrSession* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (uri != NULL, NULL); +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = uri; +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = method; +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp2_); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = session; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishing_flickr_session_get_oauth_nonce (_tmp3_); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_nonce", _tmp5_); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp5_); +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_signature_method", "HMAC-SHA1"); +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_version", "1.0"); +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_callback", "oob"); +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = session; +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = publishing_flickr_session_get_oauth_timestamp (_tmp6_); +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_timestamp", _tmp8_); +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp8_); +#line 786 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_consumer_key", PUBLISHING_FLICKR_API_KEY); +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 5237 "FlickrPublishing.c" +} + + +PublishingFlickrTransaction* publishing_flickr_transaction_new_with_uri (PublishingFlickrSession* session, const gchar* uri, PublishingRESTSupportHttpMethod method) { +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_transaction_construct_with_uri (PUBLISHING_FLICKR_TYPE_TRANSACTION, session, uri, method); +#line 5244 "FlickrPublishing.c" +} + + +static void publishing_flickr_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingFlickrTransaction * self; + PublishingRESTSupportSession* _tmp0_ = NULL; + PublishingFlickrSession* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 789 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_TRANSACTION, PublishingFlickrTransaction); +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = publishing_rest_support_transaction_get_parent_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_sign_transaction (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 790 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 5273 "FlickrPublishing.c" + } else { +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 5281 "FlickrPublishing.c" + } + } +} + + +gchar* publishing_flickr_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc) { + gchar* result = NULL; + xmlNode* root = NULL; + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + xmlNode* _tmp1_ = NULL; + gchar* status = NULL; + xmlNode* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + const gchar* _tmp6_ = NULL; + xmlNode* errcode = NULL; + xmlNode* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + xmlNode* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + GError * _inner_error_ = NULL; +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); +#line 796 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = doc; +#line 796 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); +#line 796 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + root = _tmp1_; +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = root; +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = (gchar*) xmlGetProp (_tmp2_, (xmlChar*) "stat"); +#line 797 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + status = _tmp3_; +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = status; +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp4_ == NULL) { +#line 5325 "FlickrPublishing.c" + gchar* _tmp5_ = NULL; +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup ("No status property in root node"); +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp5_; +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5335 "FlickrPublishing.c" + } +#line 803 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = status; +#line 803 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_strcmp0 (_tmp6_, "ok") == 0) { +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = NULL; +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 804 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5347 "FlickrPublishing.c" + } + { + xmlNode* _tmp7_ = NULL; + PublishingRESTSupportXmlDocument* _tmp8_ = NULL; + xmlNode* _tmp9_ = NULL; + xmlNode* _tmp10_ = NULL; +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = doc; +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = root; +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = publishing_rest_support_xml_document_get_named_child (_tmp8_, _tmp9_, "err", &_inner_error_); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp10_; +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5366 "FlickrPublishing.c" + goto __catch23_spit_publishing_publishing_error; + } +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 5377 "FlickrPublishing.c" + } +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + errcode = _tmp7_; +#line 5381 "FlickrPublishing.c" + } + goto __finally23; + __catch23_spit_publishing_publishing_error: + { + GError* err = NULL; + gchar* _tmp11_ = NULL; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = g_strdup ("No error code specified"); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp11_; +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5402 "FlickrPublishing.c" + } + __finally23: +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 5415 "FlickrPublishing.c" + } +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = errcode; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = (gchar*) xmlGetProp (_tmp12_, (xmlChar*) "msg"); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = _tmp13_; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = errcode; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = (gchar*) xmlGetProp (_tmp15_, (xmlChar*) "code"); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = _tmp16_; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = g_strdup_printf ("%s (error code %s)", _tmp14_, _tmp17_); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = _tmp18_; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp17_); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp14_); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp19_; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (status); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5443 "FlickrPublishing.c" +} + + +static gchar* _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { + gchar* result; + result = publishing_flickr_transaction_validate_xml (doc); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5452 "FlickrPublishing.c" +} + + +static gboolean string_contains (const gchar* self, const gchar* needle) { + gboolean result = FALSE; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, FALSE); +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (needle != NULL, FALSE); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = needle; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp1_ != NULL; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 5472 "FlickrPublishing.c" +} + + +static gpointer _g_error_copy0 (gpointer self) { +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? g_error_copy (self) : NULL; +#line 5479 "FlickrPublishing.c" +} + + +PublishingRESTSupportXmlDocument* publishing_flickr_transaction_parse_flickr_response (const gchar* xml, GError** error) { + PublishingRESTSupportXmlDocument* result = NULL; + PublishingRESTSupportXmlDocument* _result_ = NULL; + GError * _inner_error_ = NULL; +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (xml != NULL, NULL); +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = NULL; +#line 5491 "FlickrPublishing.c" + { + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingRESTSupportXmlDocument* _tmp2_ = NULL; + PublishingRESTSupportXmlDocument* _tmp3_ = NULL; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = xml; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_rest_support_xml_document_parse_string (_tmp1_, _publishing_flickr_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = _tmp2_; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5507 "FlickrPublishing.c" + goto __catch24_spit_publishing_publishing_error; + } +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_result_); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 5518 "FlickrPublishing.c" + } +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp0_; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = NULL; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_result_); +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp3_; +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp0_); +#line 5530 "FlickrPublishing.c" + } + goto __finally24; + __catch24_spit_publishing_publishing_error: + { + GError* e = NULL; + GError* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e = _inner_error_; +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = e; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_->message; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_strdup_printf ("(error code %s)", PUBLISHING_FLICKR_EXPIRED_SESSION_ERROR_CODE); +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = string_contains (_tmp5_, _tmp7_); +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_; +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 833 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp9_) { +#line 5562 "FlickrPublishing.c" + GError* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + GError* _tmp12_ = NULL; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = e; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_->message; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION, _tmp11_); +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = _tmp12_; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 5576 "FlickrPublishing.c" + goto __finally24; + } else { + GError* _tmp13_ = NULL; + GError* _tmp14_ = NULL; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = e; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = _g_error_copy0 (_tmp13_); +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = _tmp14_; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 5589 "FlickrPublishing.c" + goto __finally24; + } +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (e); +#line 5594 "FlickrPublishing.c" + } + __finally24: +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_result_); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 5607 "FlickrPublishing.c" + } else { +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_result_); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 5617 "FlickrPublishing.c" + } + } +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _result_; +#line 840 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 5624 "FlickrPublishing.c" +} + + +static void publishing_flickr_transaction_class_init (PublishingFlickrTransactionClass * klass) { +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_transaction_parent_class = g_type_class_peek_parent (klass); +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->execute = publishing_flickr_transaction_real_execute; +#line 5633 "FlickrPublishing.c" +} + + +static void publishing_flickr_transaction_instance_init (PublishingFlickrTransaction * self) { +} + + +GType publishing_flickr_transaction_get_type (void) { + static volatile gsize publishing_flickr_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrTransaction), 0, (GInstanceInitFunc) publishing_flickr_transaction_instance_init, NULL }; + GType publishing_flickr_transaction_type_id; + publishing_flickr_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingFlickrTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_transaction_type_id__volatile, publishing_flickr_transaction_type_id); + } + return publishing_flickr_transaction_type_id__volatile; +} + + +PublishingFlickrAuthenticationRequestTransaction* publishing_flickr_authentication_request_transaction_construct (GType object_type, PublishingFlickrSession* session) { + PublishingFlickrAuthenticationRequestTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; +#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrAuthenticationRequestTransaction*) publishing_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/request_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 5664 "FlickrPublishing.c" +} + + +PublishingFlickrAuthenticationRequestTransaction* publishing_flickr_authentication_request_transaction_new (PublishingFlickrSession* session) { +#line 845 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_authentication_request_transaction_construct (PUBLISHING_FLICKR_TYPE_AUTHENTICATION_REQUEST_TRANSACTION, session); +#line 5671 "FlickrPublishing.c" +} + + +static void publishing_flickr_authentication_request_transaction_class_init (PublishingFlickrAuthenticationRequestTransactionClass * klass) { +#line 844 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_authentication_request_transaction_parent_class = g_type_class_peek_parent (klass); +#line 5678 "FlickrPublishing.c" +} + + +static void publishing_flickr_authentication_request_transaction_instance_init (PublishingFlickrAuthenticationRequestTransaction * self) { +} + + +GType publishing_flickr_authentication_request_transaction_get_type (void) { + static volatile gsize publishing_flickr_authentication_request_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_authentication_request_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrAuthenticationRequestTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_authentication_request_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrAuthenticationRequestTransaction), 0, (GInstanceInitFunc) publishing_flickr_authentication_request_transaction_instance_init, NULL }; + GType publishing_flickr_authentication_request_transaction_type_id; + publishing_flickr_authentication_request_transaction_type_id = g_type_register_static (PUBLISHING_FLICKR_TYPE_TRANSACTION, "PublishingFlickrAuthenticationRequestTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_authentication_request_transaction_type_id__volatile, publishing_flickr_authentication_request_transaction_type_id); + } + return publishing_flickr_authentication_request_transaction_type_id__volatile; +} + + +PublishingFlickrAccessTokenFetchTransaction* publishing_flickr_access_token_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session, const gchar* user_verifier) { + PublishingFlickrAccessTokenFetchTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingFlickrSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (user_verifier != NULL, NULL); +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrAccessTokenFetchTransaction*) publishing_flickr_transaction_construct_with_uri (object_type, _tmp0_, "https://www.flickr.com/services/oauth/access_token", PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = user_verifier; +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_verifier", _tmp1_); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = session; +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_session_get_request_phase_token (_tmp2_); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_; +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp4_); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp4_); +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 5729 "FlickrPublishing.c" +} + + +PublishingFlickrAccessTokenFetchTransaction* publishing_flickr_access_token_fetch_transaction_new (PublishingFlickrSession* session, const gchar* user_verifier) { +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_access_token_fetch_transaction_construct (PUBLISHING_FLICKR_TYPE_ACCESS_TOKEN_FETCH_TRANSACTION, session, user_verifier); +#line 5736 "FlickrPublishing.c" +} + + +static void publishing_flickr_access_token_fetch_transaction_class_init (PublishingFlickrAccessTokenFetchTransactionClass * klass) { +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_access_token_fetch_transaction_parent_class = g_type_class_peek_parent (klass); +#line 5743 "FlickrPublishing.c" +} + + +static void publishing_flickr_access_token_fetch_transaction_instance_init (PublishingFlickrAccessTokenFetchTransaction * self) { +} + + +GType publishing_flickr_access_token_fetch_transaction_get_type (void) { + static volatile gsize publishing_flickr_access_token_fetch_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_access_token_fetch_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrAccessTokenFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_access_token_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrAccessTokenFetchTransaction), 0, (GInstanceInitFunc) publishing_flickr_access_token_fetch_transaction_instance_init, NULL }; + GType publishing_flickr_access_token_fetch_transaction_type_id; + publishing_flickr_access_token_fetch_transaction_type_id = g_type_register_static (PUBLISHING_FLICKR_TYPE_TRANSACTION, "PublishingFlickrAccessTokenFetchTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_access_token_fetch_transaction_type_id__volatile, publishing_flickr_access_token_fetch_transaction_type_id); + } + return publishing_flickr_access_token_fetch_transaction_type_id__volatile; +} + + +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_construct (GType object_type, PublishingFlickrSession* session) { + PublishingFlickrAccountInfoFetchTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + PublishingFlickrSession* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 862 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 862 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrAccountInfoFetchTransaction*) publishing_flickr_transaction_construct (object_type, _tmp0_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "flickr.people.getUploadStatus"); +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = session; +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_session_get_access_phase_token (_tmp1_); +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_; +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "oauth_token", _tmp3_); +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp3_); +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 5789 "FlickrPublishing.c" +} + + +PublishingFlickrAccountInfoFetchTransaction* publishing_flickr_account_info_fetch_transaction_new (PublishingFlickrSession* session) { +#line 861 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_account_info_fetch_transaction_construct (PUBLISHING_FLICKR_TYPE_ACCOUNT_INFO_FETCH_TRANSACTION, session); +#line 5796 "FlickrPublishing.c" +} + + +static void publishing_flickr_account_info_fetch_transaction_class_init (PublishingFlickrAccountInfoFetchTransactionClass * klass) { +#line 860 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_account_info_fetch_transaction_parent_class = g_type_class_peek_parent (klass); +#line 5803 "FlickrPublishing.c" +} + + +static void publishing_flickr_account_info_fetch_transaction_instance_init (PublishingFlickrAccountInfoFetchTransaction * self) { +} + + +GType publishing_flickr_account_info_fetch_transaction_get_type (void) { + static volatile gsize publishing_flickr_account_info_fetch_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_account_info_fetch_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrAccountInfoFetchTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_account_info_fetch_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrAccountInfoFetchTransaction), 0, (GInstanceInitFunc) publishing_flickr_account_info_fetch_transaction_instance_init, NULL }; + GType publishing_flickr_account_info_fetch_transaction_type_id; + publishing_flickr_account_info_fetch_transaction_type_id = g_type_register_static (PUBLISHING_FLICKR_TYPE_TRANSACTION, "PublishingFlickrAccountInfoFetchTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_account_info_fetch_transaction_type_id__volatile, publishing_flickr_account_info_fetch_transaction_type_id); + } + return publishing_flickr_account_info_fetch_transaction_type_id__volatile; +} + + +static gpointer _publishing_flickr_publishing_parameters_ref0 (gpointer self) { +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_flickr_publishing_parameters_ref (self) : NULL; +#line 5826 "FlickrPublishing.c" +} + + +static gpointer _publishing_rest_support_session_ref0 (gpointer self) { +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_rest_support_session_ref (self) : NULL; +#line 5833 "FlickrPublishing.c" +} + + +static void _g_free0_ (gpointer var) { +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + var = (g_free (var), NULL); +#line 5840 "FlickrPublishing.c" +} + + +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_construct (GType object_type, PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { + PublishingFlickrUploadTransaction* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + SpitPublishingPublishable* _tmp1_ = NULL; + PublishingFlickrPublishingParameters* _tmp2_ = NULL; + PublishingFlickrPublishingParameters* _tmp3_ = NULL; + PublishingFlickrSession* _tmp4_ = NULL; + PublishingFlickrSession* _tmp5_ = NULL; + PublishingRESTSupportArgument** _tmp6_ = NULL; + PublishingFlickrSession* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + PublishingFlickrSession* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + PublishingFlickrSession* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + PublishingFlickrPublishingParameters* _tmp16_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp17_ = NULL; + gint _tmp18_ = 0; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + PublishingFlickrPublishingParameters* _tmp21_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp22_ = NULL; + gint _tmp23_ = 0; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + PublishingFlickrPublishingParameters* _tmp26_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp27_ = NULL; + gint _tmp28_ = 0; + gchar* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + GHashTable* disposition_table = NULL; + GHashFunc _tmp31_ = NULL; + GEqualFunc _tmp32_ = NULL; + GHashTable* _tmp33_ = NULL; + gchar* filename = NULL; + SpitPublishingPublishable* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + gboolean _tmp36_ = FALSE; + const gchar* _tmp37_ = NULL; + GHashTable* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; + SpitPublishingPublishable* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + GHashTable* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; + gchar* _tmp49_ = NULL; + GHashTable* _tmp50_ = NULL; +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 875 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 875 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishable; +#line 875 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrUploadTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, "https://api.flickr.com/services/upload"); +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = parameters; +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _publishing_flickr_publishing_parameters_ref0 (_tmp2_); +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = _tmp3_; +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = session; +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _publishing_rest_support_session_ref0 (_tmp4_); +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->session = _tmp5_; +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_new0 (PublishingRESTSupportArgument*, 0 + 1); +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->auth_header_fields = (_vala_array_free (self->priv->auth_header_fields, self->priv->auth_header_fields_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->auth_header_fields = _tmp6_; +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->auth_header_fields_length1 = 0; +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_auth_header_fields_size_ = self->priv->auth_header_fields_length1; +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = session; +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = publishing_flickr_session_get_oauth_nonce (_tmp7_); +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_; +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_nonce", _tmp9_); +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp9_); +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_signature_method", "HMAC-SHA1"); +#line 883 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_version", "1.0"); +#line 884 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_callback", "oob"); +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = session; +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = publishing_flickr_session_get_oauth_timestamp (_tmp10_); +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _tmp11_; +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_timestamp", _tmp12_); +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp12_); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_consumer_key", PUBLISHING_FLICKR_API_KEY); +#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = session; +#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = publishing_flickr_session_get_access_phase_token (_tmp13_); +#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _tmp14_; +#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (self, "oauth_token", _tmp15_); +#line 887 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp15_); +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = parameters; +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = _tmp16_->visibility_specification; +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = _tmp17_->everyone_level; +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = g_strdup_printf ("%d", _tmp18_); +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = _tmp19_; +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_public", _tmp20_); +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp20_); +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = parameters; +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = _tmp21_->visibility_specification; +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = _tmp22_->friends_level; +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = g_strdup_printf ("%d", _tmp23_); +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = _tmp24_; +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_friend", _tmp25_); +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp25_); +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = parameters; +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = _tmp26_->visibility_specification; +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = _tmp27_->family_level; +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = g_strdup_printf ("%d", _tmp28_); +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = _tmp29_; +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "is_family", _tmp30_); +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp30_); +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = g_str_hash; +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = g_str_equal; +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = g_hash_table_new_full (_tmp31_, _tmp32_, _g_free0_, _g_free0_); +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + disposition_table = _tmp33_; +#line 895 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = publishable; +#line 895 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = spit_publishing_publishable_get_publishing_name (_tmp34_); +#line 895 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + filename = _tmp35_; +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = filename; +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp37_ == NULL) { +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = TRUE; +#line 6034 "FlickrPublishing.c" + } else { + const gchar* _tmp38_ = NULL; +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = filename; +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = g_strcmp0 (_tmp38_, "") == 0; +#line 6041 "FlickrPublishing.c" + } +#line 896 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp36_) { +#line 6045 "FlickrPublishing.c" + SpitPublishingPublishable* _tmp39_ = NULL; + gchar* _tmp40_ = NULL; +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp39_ = publishable; +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp40_ = spit_publishing_publishable_get_param_string (_tmp39_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (filename); +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + filename = _tmp40_; +#line 6056 "FlickrPublishing.c" + } +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp41_ = disposition_table; +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp42_ = g_strdup ("filename"); +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp43_ = publishable; +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp44_ = spit_publishing_publishable_get_param_string (_tmp43_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp45_ = _tmp44_; +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp46_ = soup_uri_encode (_tmp45_, NULL); +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_hash_table_insert (_tmp41_, _tmp42_, _tmp46_); +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp45_); +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp47_ = disposition_table; +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp48_ = g_strdup ("name"); +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp49_ = g_strdup ("photo"); +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_hash_table_insert (_tmp47_, _tmp48_, _tmp49_); +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp50_ = disposition_table; +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_upload_transaction_set_binary_disposition_table (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), _tmp50_); +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (filename); +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_hash_table_unref0 (disposition_table); +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 6092 "FlickrPublishing.c" +} + + +PublishingFlickrUploadTransaction* publishing_flickr_upload_transaction_new (PublishingFlickrSession* session, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublishable* publishable) { +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_upload_transaction_construct (PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, session, parameters, publishable); +#line 6099 "FlickrPublishing.c" +} + + +static void _vala_array_add18 (PublishingRESTSupportArgument*** array, int* length, int* size, PublishingRESTSupportArgument* value) { +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); +#line 6110 "FlickrPublishing.c" + } +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 6116 "FlickrPublishing.c" +} + + +void publishing_flickr_upload_transaction_add_authorization_header_field (PublishingFlickrUploadTransaction* self, const gchar* key, const gchar* value) { + PublishingRESTSupportArgument** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingRESTSupportArgument* _tmp3_ = NULL; +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self)); +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (key != NULL); +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (value != NULL); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->auth_header_fields; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0__length1 = self->priv->auth_header_fields_length1; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = key; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = value; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_rest_support_argument_new (_tmp1_, _tmp2_); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add18 (&self->priv->auth_header_fields, &self->priv->auth_header_fields_length1, &self->priv->_auth_header_fields_size_, _tmp3_); +#line 6144 "FlickrPublishing.c" +} + + +static gpointer _publishing_rest_support_argument_ref0 (gpointer self) { +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_rest_support_argument_ref (self) : NULL; +#line 6151 "FlickrPublishing.c" +} + + +static PublishingRESTSupportArgument** _vala_array_dup8 (PublishingRESTSupportArgument** self, int length) { + PublishingRESTSupportArgument** result; + int i; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = g_new0 (PublishingRESTSupportArgument*, length + 1); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (i = 0; i < length; i++) { +#line 6162 "FlickrPublishing.c" + PublishingRESTSupportArgument* _tmp0_ = NULL; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = _publishing_rest_support_argument_ref0 (self[i]); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result[i] = _tmp0_; +#line 6168 "FlickrPublishing.c" + } +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 6172 "FlickrPublishing.c" +} + + +PublishingRESTSupportArgument** publishing_flickr_upload_transaction_get_authorization_header_fields (PublishingFlickrUploadTransaction* self, int* result_length1) { + PublishingRESTSupportArgument** result = NULL; + PublishingRESTSupportArgument** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingRESTSupportArgument** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingRESTSupportArgument** _tmp2_ = NULL; + gint _tmp2__length1 = 0; +#line 913 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self), NULL); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->auth_header_fields; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0__length1 = self->priv->auth_header_fields_length1; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup8 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1__length1 = _tmp0__length1; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _tmp1_; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2__length1 = _tmp1__length1; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (result_length1) { +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *result_length1 = _tmp2__length1; +#line 6202 "FlickrPublishing.c" + } +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 6208 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_upload_transaction_get_authorization_header_string (PublishingFlickrUploadTransaction* self) { + gchar* result = NULL; + gchar* _result_ = NULL; + gchar* _tmp0_ = NULL; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_UPLOAD_TRANSACTION (self), NULL); +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = g_strdup ("OAuth "); +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp0_; +#line 6222 "FlickrPublishing.c" + { + gint i = 0; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + i = 0; +#line 6227 "FlickrPublishing.c" + { + gboolean _tmp1_ = FALSE; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = TRUE; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + while (TRUE) { +#line 6234 "FlickrPublishing.c" + gint _tmp3_ = 0; + PublishingRESTSupportArgument** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingRESTSupportArgument** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + gint _tmp7_ = 0; + PublishingRESTSupportArgument* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + PublishingRESTSupportArgument** _tmp14_ = NULL; + gint _tmp14__length1 = 0; + gint _tmp15_ = 0; + PublishingRESTSupportArgument* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gint _tmp23_ = 0; + PublishingRESTSupportArgument** _tmp24_ = NULL; + gint _tmp24__length1 = 0; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp1_) { +#line 6263 "FlickrPublishing.c" + gint _tmp2_ = 0; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = i; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + i = _tmp2_ + 1; +#line 6269 "FlickrPublishing.c" + } +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = FALSE; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = i; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->auth_header_fields; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4__length1 = self->priv->auth_header_fields_length1; +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!(_tmp3_ < _tmp4__length1)) { +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + break; +#line 6283 "FlickrPublishing.c" + } +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _result_; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = self->priv->auth_header_fields; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6__length1 = self->priv->auth_header_fields_length1; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = i; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp6_[_tmp7_]; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_->key; +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = g_strconcat (_tmp5_, _tmp9_, NULL); +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_result_); +#line 921 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp10_; +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _result_; +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_strconcat (_tmp11_, "=", NULL); +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_result_); +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp12_; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _result_; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = self->priv->auth_header_fields; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14__length1 = self->priv->auth_header_fields_length1; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = i; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = _tmp14_[_tmp15_]; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = _tmp16_->value; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = g_strconcat ("\"", _tmp17_, NULL); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = _tmp18_; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = g_strconcat (_tmp19_, "\"", NULL); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = _tmp20_; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = g_strconcat (_tmp13_, _tmp21_, NULL); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_result_); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp22_; +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp21_); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp19_); +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = i; +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = self->priv->auth_header_fields; +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24__length1 = self->priv->auth_header_fields_length1; +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp23_ < (_tmp24__length1 - 1)) { +#line 6349 "FlickrPublishing.c" + const gchar* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = _result_; +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = g_strconcat (_tmp25_, ", ", NULL); +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_result_); +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp26_; +#line 6360 "FlickrPublishing.c" + } + } + } + } +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _result_; +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 6369 "FlickrPublishing.c" +} + + +static void publishing_flickr_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingFlickrUploadTransaction * self; + PublishingFlickrSession* _tmp0_ = NULL; + gchar* authorization_header = NULL; + gchar* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 932 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransaction); +#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->session; +#line 933 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_sign_transaction (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishing_flickr_upload_transaction_get_authorization_header_string (self); +#line 935 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + authorization_header = _tmp1_; +#line 937 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:937: executing upload transaction: authorization" \ +" header string = '%s'", authorization_header); +#line 939 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Authorization", authorization_header); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_upload_transaction_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (authorization_header); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 6405 "FlickrPublishing.c" + } else { +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (authorization_header); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 941 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 6415 "FlickrPublishing.c" + } + } +#line 932 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (authorization_header); +#line 6420 "FlickrPublishing.c" +} + + +static void publishing_flickr_upload_transaction_class_init (PublishingFlickrUploadTransactionClass * klass) { +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_parent_class = g_type_class_peek_parent (klass); +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_flickr_upload_transaction_finalize; +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrUploadTransactionPrivate)); +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->execute = publishing_flickr_upload_transaction_real_execute; +#line 6433 "FlickrPublishing.c" +} + + +static void publishing_flickr_upload_transaction_instance_init (PublishingFlickrUploadTransaction * self) { +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_UPLOAD_TRANSACTION_GET_PRIVATE (self); +#line 6440 "FlickrPublishing.c" +} + + +static void publishing_flickr_upload_transaction_finalize (PublishingRESTSupportTransaction* obj) { + PublishingFlickrUploadTransaction * self; +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION, PublishingFlickrUploadTransaction); +#line 869 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 871 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->auth_header_fields = (_vala_array_free (self->priv->auth_header_fields, self->priv->auth_header_fields_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_flickr_upload_transaction_parent_class)->finalize (obj); +#line 6456 "FlickrPublishing.c" +} + + +GType publishing_flickr_upload_transaction_get_type (void) { + static volatile gsize publishing_flickr_upload_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_upload_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrUploadTransaction), 0, (GInstanceInitFunc) publishing_flickr_upload_transaction_instance_init, NULL }; + GType publishing_flickr_upload_transaction_type_id; + publishing_flickr_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, "PublishingFlickrUploadTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_upload_transaction_type_id__volatile, publishing_flickr_upload_transaction_type_id); + } + return publishing_flickr_upload_transaction_type_id__volatile; +} + + +PublishingFlickrSession* publishing_flickr_session_construct (GType object_type) { + PublishingFlickrSession* self = NULL; +#line 953 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrSession*) publishing_rest_support_session_construct (object_type, PUBLISHING_FLICKR_ENDPOINT_URL); +#line 952 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 6478 "FlickrPublishing.c" +} + + +PublishingFlickrSession* publishing_flickr_session_new (void) { +#line 952 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_session_construct (PUBLISHING_FLICKR_TYPE_SESSION); +#line 6485 "FlickrPublishing.c" +} + + +static gboolean publishing_flickr_session_real_is_authenticated (PublishingRESTSupportSession* base) { + PublishingFlickrSession * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + const gchar* _tmp2_ = NULL; +#line 956 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->access_phase_token; +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp2_ != NULL) { +#line 6501 "FlickrPublishing.c" + const gchar* _tmp3_ = NULL; +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->access_phase_token_secret; +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _tmp3_ != NULL; +#line 6507 "FlickrPublishing.c" + } else { +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = FALSE; +#line 6511 "FlickrPublishing.c" + } +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp1_) { +#line 6515 "FlickrPublishing.c" + const gchar* _tmp4_ = NULL; +#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->username; +#line 958 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = _tmp4_ != NULL; +#line 6521 "FlickrPublishing.c" + } else { +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = FALSE; +#line 6525 "FlickrPublishing.c" + } +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp0_; +#line 957 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 6531 "FlickrPublishing.c" +} + + +void publishing_flickr_session_authenticate_from_persistent_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (secret != NULL); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (username != NULL); +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = token; +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token); +#line 963 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token = _tmp1_; +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = secret; +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token_secret = _tmp3_; +#line 965 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = username; +#line 965 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 965 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->username); +#line 965 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->username = _tmp5_; +#line 967 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); +#line 6576 "FlickrPublishing.c" +} + + +void publishing_flickr_session_deauthenticate (PublishingFlickrSession* self) { +#line 970 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); +#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token); +#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token = NULL; +#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 972 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token_secret = NULL; +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->username); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->username = NULL; +#line 6595 "FlickrPublishing.c" +} + + +static gpointer _publishing_rest_support_transaction_ref0 (gpointer self) { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_rest_support_transaction_ref (self) : NULL; +#line 6602 "FlickrPublishing.c" +} + + +static void _vala_array_add19 (PublishingRESTSupportArgument*** array, int* length, int* size, PublishingRESTSupportArgument* value) { +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingRESTSupportArgument*, *array, (*size) + 1); +#line 6613 "FlickrPublishing.c" + } +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 6619 "FlickrPublishing.c" +} + + +void publishing_flickr_session_sign_transaction (PublishingFlickrSession* self, PublishingRESTSupportTransaction* txn) { + gchar* http_method = NULL; + PublishingRESTSupportTransaction* _tmp0_ = NULL; + PublishingRESTSupportHttpMethod _tmp1_ = 0; + gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + PublishingRESTSupportArgument** base_string_arguments = NULL; + PublishingRESTSupportTransaction* _tmp6_ = NULL; + gint _tmp7_ = 0; + PublishingRESTSupportArgument** _tmp8_ = NULL; + gint base_string_arguments_length1 = 0; + gint _base_string_arguments_size_ = 0; + PublishingFlickrUploadTransaction* upload_txn = NULL; + PublishingRESTSupportTransaction* _tmp9_ = NULL; + PublishingFlickrUploadTransaction* _tmp10_ = NULL; + PublishingFlickrUploadTransaction* _tmp11_ = NULL; + PublishingRESTSupportArgument** sorted_args = NULL; + PublishingRESTSupportArgument** _tmp20_ = NULL; + gint _tmp20__length1 = 0; + gint _tmp21_ = 0; + PublishingRESTSupportArgument** _tmp22_ = NULL; + gint sorted_args_length1 = 0; + gint _sorted_args_size_ = 0; + gchar* arguments_string = NULL; + gchar* _tmp23_ = NULL; + gchar* signing_key = NULL; + const gchar* _tmp46_ = NULL; + gchar* signature_base_string = NULL; + const gchar* _tmp53_ = NULL; + gchar* _tmp54_ = NULL; + gchar* _tmp55_ = NULL; + PublishingRESTSupportTransaction* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + gchar* _tmp59_ = NULL; + gchar* _tmp60_ = NULL; + gchar* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + gchar* _tmp63_ = NULL; + gchar* _tmp64_ = NULL; + const gchar* _tmp65_ = NULL; + gchar* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; + gchar* _tmp68_ = NULL; + gchar* _tmp69_ = NULL; + const gchar* _tmp70_ = NULL; + const gchar* _tmp71_ = NULL; + gchar* signature = NULL; + const gchar* _tmp72_ = NULL; + const gchar* _tmp73_ = NULL; + gchar* _tmp74_ = NULL; + const gchar* _tmp75_ = NULL; + gchar* _tmp76_ = NULL; + const gchar* _tmp77_ = NULL; + PublishingFlickrUploadTransaction* _tmp78_ = NULL; +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = txn; +#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishing_rest_support_transaction_get_method (_tmp0_); +#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_rest_support_http_method_to_string (_tmp1_); +#line 977 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + http_method = _tmp2_; +#line 979 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:979: signing transaction with parameters:"); +#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = http_method; +#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = g_strconcat ("HTTP method = ", _tmp3_, NULL); +#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:980: %s", _tmp5_); +#line 980 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp5_); +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = txn; +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = publishing_rest_support_transaction_get_arguments (_tmp6_, &_tmp7_); +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + base_string_arguments = _tmp8_; +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + base_string_arguments_length1 = _tmp7_; +#line 982 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _base_string_arguments_size_ = base_string_arguments_length1; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = txn; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = _publishing_rest_support_transaction_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, PUBLISHING_FLICKR_TYPE_UPLOAD_TRANSACTION) ? ((PublishingFlickrUploadTransaction*) _tmp9_) : NULL); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + upload_txn = _tmp10_; +#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = upload_txn; +#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp11_ != NULL) { +#line 6724 "FlickrPublishing.c" + PublishingRESTSupportArgument** auth_header_args = NULL; + PublishingFlickrUploadTransaction* _tmp12_ = NULL; + gint _tmp13_ = 0; + PublishingRESTSupportArgument** _tmp14_ = NULL; + gint auth_header_args_length1 = 0; + gint _auth_header_args_size_ = 0; + PublishingRESTSupportArgument** _tmp15_ = NULL; + gint _tmp15__length1 = 0; +#line 986 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:986: %s", "this transaction is an UploadTransaction; including Authorization head" \ +"er " "fields in signature base string"); +#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = upload_txn; +#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = publishing_flickr_upload_transaction_get_authorization_header_fields (_tmp12_, &_tmp13_); +#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + auth_header_args = _tmp14_; +#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + auth_header_args_length1 = _tmp13_; +#line 989 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _auth_header_args_size_ = auth_header_args_length1; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = auth_header_args; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15__length1 = auth_header_args_length1; +#line 6749 "FlickrPublishing.c" + { + PublishingRESTSupportArgument** arg_collection = NULL; + gint arg_collection_length1 = 0; + gint _arg_collection_size_ = 0; + gint arg_it = 0; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arg_collection = _tmp15_; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arg_collection_length1 = _tmp15__length1; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (arg_it = 0; arg_it < _tmp15__length1; arg_it = arg_it + 1) { +#line 6761 "FlickrPublishing.c" + PublishingRESTSupportArgument* _tmp16_ = NULL; + PublishingRESTSupportArgument* arg = NULL; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = _publishing_rest_support_argument_ref0 (arg_collection[arg_it]); +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arg = _tmp16_; +#line 6768 "FlickrPublishing.c" + { + PublishingRESTSupportArgument** _tmp17_ = NULL; + gint _tmp17__length1 = 0; + PublishingRESTSupportArgument* _tmp18_ = NULL; + PublishingRESTSupportArgument* _tmp19_ = NULL; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = base_string_arguments; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17__length1 = base_string_arguments_length1; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = arg; +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = _publishing_rest_support_argument_ref0 (_tmp18_); +#line 993 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add19 (&base_string_arguments, &base_string_arguments_length1, &_base_string_arguments_size_, _tmp19_); +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_argument_unref0 (arg); +#line 6786 "FlickrPublishing.c" + } + } + } +#line 985 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + auth_header_args = (_vala_array_free (auth_header_args, auth_header_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 6792 "FlickrPublishing.c" + } +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = base_string_arguments; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20__length1 = base_string_arguments_length1; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = publishing_rest_support_argument_sort (_tmp20_, _tmp20__length1, &_tmp21_); +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + sorted_args = _tmp22_; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + sorted_args_length1 = _tmp21_; +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _sorted_args_size_ = sorted_args_length1; +#line 999 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = g_strdup (""); +#line 999 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arguments_string = _tmp23_; +#line 6810 "FlickrPublishing.c" + { + gint i = 0; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + i = 0; +#line 6815 "FlickrPublishing.c" + { + gboolean _tmp24_ = FALSE; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = TRUE; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + while (TRUE) { +#line 6822 "FlickrPublishing.c" + gint _tmp26_ = 0; + PublishingRESTSupportArgument** _tmp27_ = NULL; + gint _tmp27__length1 = 0; + const gchar* _tmp28_ = NULL; + PublishingRESTSupportArgument** _tmp29_ = NULL; + gint _tmp29__length1 = 0; + gint _tmp30_ = 0; + PublishingRESTSupportArgument* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + PublishingRESTSupportArgument** _tmp35_ = NULL; + gint _tmp35__length1 = 0; + gint _tmp36_ = 0; + PublishingRESTSupportArgument* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; + gchar* _tmp40_ = NULL; + gchar* _tmp41_ = NULL; + gint _tmp42_ = 0; + PublishingRESTSupportArgument** _tmp43_ = NULL; + gint _tmp43__length1 = 0; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp24_) { +#line 6847 "FlickrPublishing.c" + gint _tmp25_ = 0; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = i; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + i = _tmp25_ + 1; +#line 6853 "FlickrPublishing.c" + } +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = FALSE; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = i; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = sorted_args; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27__length1 = sorted_args_length1; +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!(_tmp26_ < _tmp27__length1)) { +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + break; +#line 6867 "FlickrPublishing.c" + } +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = arguments_string; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = sorted_args; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29__length1 = sorted_args_length1; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = i; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = _tmp29_[_tmp30_]; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = _tmp31_->key; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = g_strconcat (_tmp32_, "=", NULL); +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = _tmp33_; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = sorted_args; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35__length1 = sorted_args_length1; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = i; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = _tmp35_[_tmp36_]; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = _tmp37_->value; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp39_ = g_strconcat (_tmp34_, _tmp38_, NULL); +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp40_ = _tmp39_; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp41_ = g_strconcat (_tmp28_, _tmp40_, NULL); +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (arguments_string); +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arguments_string = _tmp41_; +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp40_); +#line 1001 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp34_); +#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp42_ = i; +#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp43_ = sorted_args; +#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp43__length1 = sorted_args_length1; +#line 1002 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp42_ < (_tmp43__length1 - 1)) { +#line 6917 "FlickrPublishing.c" + const gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; +#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp44_ = arguments_string; +#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp45_ = g_strconcat (_tmp44_, "&", NULL); +#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (arguments_string); +#line 1003 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + arguments_string = _tmp45_; +#line 6928 "FlickrPublishing.c" + } + } + } + } +#line 1006 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signing_key = NULL; +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp46_ = self->priv->access_phase_token_secret; +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp46_ != NULL) { +#line 6939 "FlickrPublishing.c" + const gchar* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; +#line 1008 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1008: access phase token secret available; using" \ +" it as signing key"); +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp47_ = self->priv->access_phase_token_secret; +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp48_ = g_strconcat (PUBLISHING_FLICKR_API_SECRET "&", _tmp47_, NULL); +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signing_key); +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signing_key = _tmp48_; +#line 6952 "FlickrPublishing.c" + } else { + const gchar* _tmp49_ = NULL; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp49_ = self->priv->request_phase_token_secret; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp49_ != NULL) { +#line 6959 "FlickrPublishing.c" + const gchar* _tmp50_ = NULL; + gchar* _tmp51_ = NULL; +#line 1012 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1012: request phase token secret available; usin" \ +"g it as signing key"); +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp50_ = self->priv->request_phase_token_secret; +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp51_ = g_strconcat (PUBLISHING_FLICKR_API_SECRET "&", _tmp50_, NULL); +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signing_key); +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signing_key = _tmp51_; +#line 6972 "FlickrPublishing.c" + } else { + gchar* _tmp52_ = NULL; +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1016: %s", "neither access phase nor request phase token secrets available; using " \ +"API " "key as signing key"); +#line 1019 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp52_ = g_strdup (PUBLISHING_FLICKR_API_SECRET "&"); +#line 1019 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signing_key); +#line 1019 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signing_key = _tmp52_; +#line 6983 "FlickrPublishing.c" + } + } +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp53_ = http_method; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp54_ = g_strconcat (_tmp53_, "&", NULL); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp55_ = _tmp54_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp56_ = txn; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp57_ = publishing_rest_support_transaction_get_endpoint_url (_tmp56_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp58_ = _tmp57_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp59_ = soup_uri_encode (_tmp58_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp60_ = _tmp59_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp61_ = g_strconcat (_tmp55_, _tmp60_, NULL); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp62_ = _tmp61_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp63_ = g_strconcat (_tmp62_, "&", NULL); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp64_ = _tmp63_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp65_ = arguments_string; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp66_ = soup_uri_encode (_tmp65_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp67_ = _tmp66_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp68_ = g_strconcat (_tmp64_, _tmp67_, NULL); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp69_ = _tmp68_; +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp67_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp64_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp62_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp60_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp58_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp55_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signature_base_string = _tmp69_; +#line 1026 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp70_ = signature_base_string; +#line 1026 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1026: signature base string = '%s'", _tmp70_); +#line 1028 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp71_ = signing_key; +#line 1028 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1028: signing key = '%s'", _tmp71_); +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp72_ = signing_key; +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp73_ = signature_base_string; +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp74_ = publishing_rest_support_hmac_sha1 (_tmp72_, _tmp73_); +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signature = _tmp74_; +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp75_ = signature; +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp76_ = soup_uri_encode (_tmp75_, PUBLISHING_FLICKR_ENCODE_RFC_3986_EXTRA); +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signature); +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + signature = _tmp76_; +#line 1034 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp77_ = signature; +#line 1034 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_debug ("FlickrPublishing.vala:1034: signature = '%s'", _tmp77_); +#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp78_ = upload_txn; +#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp78_ != NULL) { +#line 7066 "FlickrPublishing.c" + PublishingFlickrUploadTransaction* _tmp79_ = NULL; + const gchar* _tmp80_ = NULL; +#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp79_ = upload_txn; +#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp80_ = signature; +#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_upload_transaction_add_authorization_header_field (_tmp79_, "oauth_signature", _tmp80_); +#line 7075 "FlickrPublishing.c" + } else { + PublishingRESTSupportTransaction* _tmp81_ = NULL; + const gchar* _tmp82_ = NULL; +#line 1039 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp81_ = txn; +#line 1039 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp82_ = signature; +#line 1039 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_rest_support_transaction_add_argument (_tmp81_, "oauth_signature", _tmp82_); +#line 7085 "FlickrPublishing.c" + } +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signature); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signature_base_string); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (signing_key); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (arguments_string); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + sorted_args = (_vala_array_free (sorted_args, sorted_args_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_transaction_unref0 (upload_txn); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + base_string_arguments = (_vala_array_free (base_string_arguments, base_string_arguments_length1, (GDestroyNotify) publishing_rest_support_argument_unref), NULL); +#line 976 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (http_method); +#line 7103 "FlickrPublishing.c" +} + + +void publishing_flickr_session_set_request_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (secret != NULL); +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = token; +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->request_phase_token); +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->request_phase_token = _tmp1_; +#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = secret; +#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->request_phase_token_secret); +#line 1044 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->request_phase_token_secret = _tmp3_; +#line 7134 "FlickrPublishing.c" +} + + +void publishing_flickr_session_set_access_phase_credentials (PublishingFlickrSession* self, const gchar* token, const gchar* secret, const gchar* username) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_SESSION (self)); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (token != NULL); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (secret != NULL); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (username != NULL); +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = token; +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token); +#line 1048 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token = _tmp1_; +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = secret; +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token_secret = _tmp3_; +#line 1050 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = username; +#line 1050 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 1050 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->username); +#line 1050 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->username = _tmp5_; +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), "authenticated"); +#line 7179 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_oauth_nonce (PublishingFlickrSession* self) { + gchar* result = NULL; + GTimeVal currtime = {0}; + GTimeVal _tmp0_ = {0}; + glong _tmp1_ = 0L; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + GTimeVal _tmp4_ = {0}; + glong _tmp5_ = 0L; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 1055 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_get_current_time (&currtime); +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_get_current_time (&currtime); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = currtime; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _tmp0_.tv_sec; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup_printf ("%li", _tmp1_); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _tmp2_; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = currtime; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_.tv_usec; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_strdup_printf ("%li", _tmp5_); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = g_strconcat (_tmp3_, _tmp7_, NULL); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _tmp9_, (gsize) -1); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp9_); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp7_); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp3_); +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp11_; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7238 "FlickrPublishing.c" +} + + +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* end = NULL; + gchar* _tmp0_ = NULL; + glong _tmp1_ = 0L; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = str; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = maxlen; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp2_; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = end; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ == NULL) { +#line 7261 "FlickrPublishing.c" + glong _tmp4_ = 0L; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = maxlen; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 7269 "FlickrPublishing.c" + } else { + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (glong) (_tmp5_ - _tmp6_); +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 7281 "FlickrPublishing.c" + } +} + + +static gchar* string_substring (const gchar* self, glong offset, glong len) { + gchar* result = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_ = 0L; + glong _tmp8_ = 0L; + glong _tmp14_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + glong _tmp21_ = 0L; + gchar* _tmp22_ = NULL; +#line 1306 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = offset; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_ >= ((glong) 0)) { +#line 7305 "FlickrPublishing.c" + glong _tmp2_ = 0L; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = len; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = _tmp2_ >= ((glong) 0); +#line 7311 "FlickrPublishing.c" + } else { +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = FALSE; +#line 7315 "FlickrPublishing.c" + } +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp0_) { +#line 7319 "FlickrPublishing.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; + glong _tmp5_ = 0L; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = offset; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = len; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = _tmp5_; +#line 7331 "FlickrPublishing.c" + } else { + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = strlen (self); +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = _tmp6_; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp7_; +#line 7341 "FlickrPublishing.c" + } +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = offset; +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp8_ < ((glong) 0)) { +#line 7347 "FlickrPublishing.c" + glong _tmp9_ = 0L; + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = string_length; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = offset; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + offset = _tmp9_ + _tmp10_; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = offset; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); +#line 7361 "FlickrPublishing.c" + } else { + glong _tmp12_ = 0L; + glong _tmp13_ = 0L; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = offset; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = string_length; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); +#line 7371 "FlickrPublishing.c" + } +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = len; +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp14_ < ((glong) 0)) { +#line 7377 "FlickrPublishing.c" + glong _tmp15_ = 0L; + glong _tmp16_ = 0L; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = offset; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp15_ - _tmp16_; +#line 7386 "FlickrPublishing.c" + } +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = offset; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = len; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = string_length; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = offset; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = len; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp22_; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 7406 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_oauth_timestamp (PublishingFlickrSession* self) { + gchar* result = NULL; + gint64 _tmp0_ = 0LL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = g_get_real_time (); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _tmp1_; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) 10); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp2_); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp4_; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7435 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_request_phase_token (PublishingFlickrSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1067 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->request_phase_token; +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp0_ != NULL, "request_phase_token != null"); +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->request_phase_token; +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 1069 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7458 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_access_phase_token (PublishingFlickrSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->access_phase_token; +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp0_ != NULL, "access_phase_token != null"); +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->access_phase_token; +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 1074 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7481 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_access_phase_token_secret (PublishingFlickrSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->access_phase_token_secret; +#line 1078 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp0_ != NULL, "access_phase_token_secret != null"); +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->access_phase_token_secret; +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 1079 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7504 "FlickrPublishing.c" +} + + +gchar* publishing_flickr_session_get_username (PublishingFlickrSession* self) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 1082 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (self), NULL); +#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 1083 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp0_, "is_authenticated()"); +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->username; +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp2_; +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 7527 "FlickrPublishing.c" +} + + +static void publishing_flickr_session_class_init (PublishingFlickrSessionClass * klass) { +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_session_parent_class = g_type_class_peek_parent (klass); +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_flickr_session_finalize; +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrSessionPrivate)); +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = publishing_flickr_session_real_is_authenticated; +#line 7540 "FlickrPublishing.c" +} + + +static void publishing_flickr_session_instance_init (PublishingFlickrSession * self) { +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_SESSION_GET_PRIVATE (self); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->request_phase_token = NULL; +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->request_phase_token_secret = NULL; +#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token = NULL; +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->access_phase_token_secret = NULL; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->username = NULL; +#line 7557 "FlickrPublishing.c" +} + + +static void publishing_flickr_session_finalize (PublishingRESTSupportSession* obj) { + PublishingFlickrSession * self; +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->request_phase_token); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->request_phase_token_secret); +#line 948 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token); +#line 949 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->access_phase_token_secret); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->priv->username); +#line 945 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_flickr_session_parent_class)->finalize (obj); +#line 7577 "FlickrPublishing.c" +} + + +GType publishing_flickr_session_get_type (void) { + static volatile gsize publishing_flickr_session_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_session_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrSession), 0, (GInstanceInitFunc) publishing_flickr_session_instance_init, NULL }; + GType publishing_flickr_session_type_id; + publishing_flickr_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingFlickrSession", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_session_type_id__volatile, publishing_flickr_session_type_id); + } + return publishing_flickr_session_type_id__volatile; +} + + +static void _publishing_flickr_publishing_options_pane_on_visibility_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 1175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_on_visibility_changed ((PublishingFlickrPublishingOptionsPane*) self); +#line 7596 "FlickrPublishing.c" +} + + +static void _publishing_flickr_publishing_options_pane_on_size_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_on_size_changed ((PublishingFlickrPublishingOptionsPane*) self); +#line 7603 "FlickrPublishing.c" +} + + +static void _publishing_flickr_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_on_logout_clicked ((PublishingFlickrPublishingOptionsPane*) self); +#line 7610 "FlickrPublishing.c" +} + + +static void _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_on_publish_clicked ((PublishingFlickrPublishingOptionsPane*) self); +#line 7617 "FlickrPublishing.c" +} + + +PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_construct (GType object_type, PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata) { + PublishingFlickrPublishingOptionsPane * self = NULL; + GtkBuilder* _tmp0_ = NULL; + GtkBuilder* _tmp1_ = NULL; + GtkBuilder* _tmp2_ = NULL; + GtkBuilder* _tmp3_ = NULL; + GSList* _tmp4_ = NULL; + GSList* _tmp5_ = NULL; + guint _tmp6_ = 0U; + GtkBuilder* _tmp7_ = NULL; + GObject* _tmp8_ = NULL; + GtkBox* _tmp9_ = NULL; + GtkBuilder* _tmp10_ = NULL; + GObject* _tmp11_ = NULL; + GtkLabel* _tmp12_ = NULL; + GtkBuilder* _tmp13_ = NULL; + GObject* _tmp14_ = NULL; + GtkLabel* _tmp15_ = NULL; + GtkBuilder* _tmp16_ = NULL; + GObject* _tmp17_ = NULL; + GtkButton* _tmp18_ = NULL; + GtkBuilder* _tmp19_ = NULL; + GObject* _tmp20_ = NULL; + GtkButton* _tmp21_ = NULL; + GtkBuilder* _tmp22_ = NULL; + GObject* _tmp23_ = NULL; + GtkComboBoxText* _tmp24_ = NULL; + GtkBuilder* _tmp25_ = NULL; + GObject* _tmp26_ = NULL; + GtkComboBoxText* _tmp27_ = NULL; + GtkBuilder* _tmp28_ = NULL; + GObject* _tmp29_ = NULL; + GtkLabel* _tmp30_ = NULL; + GtkBuilder* _tmp31_ = NULL; + GObject* _tmp32_ = NULL; + GtkCheckButton* _tmp33_ = NULL; + PublishingFlickrPublishingParameters* _tmp34_ = NULL; + PublishingFlickrPublishingParameters* _tmp35_ = NULL; + PublishingFlickrFlickrPublisher* _tmp36_ = NULL; + PublishingFlickrFlickrPublisher* _tmp37_ = NULL; + SpitPublishingPublisherMediaType _tmp38_ = 0; + gint _tmp39_ = 0; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp40_ = NULL; + gint _tmp41_ = 0; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp42_ = NULL; + gchar* upload_label_text = NULL; + const gchar* _tmp43_ = NULL; + PublishingFlickrPublishingParameters* _tmp44_ = NULL; + const gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + PublishingFlickrPublishingParameters* _tmp47_ = NULL; + PublishingFlickrUserKind _tmp48_ = 0; + GtkLabel* _tmp61_ = NULL; + const gchar* _tmp62_ = NULL; + gchar* visibility_label_text = NULL; + const gchar* _tmp63_ = NULL; + gchar* _tmp64_ = NULL; + SpitPublishingPublisherMediaType _tmp65_ = 0; + GtkLabel* _tmp71_ = NULL; + const gchar* _tmp72_ = NULL; + GtkComboBoxText* _tmp73_ = NULL; + SpitPublishingPublisherMediaType _tmp74_ = 0; + GtkCheckButton* _tmp78_ = NULL; + gboolean _tmp79_ = FALSE; + GtkButton* _tmp80_ = NULL; + GtkButton* _tmp81_ = NULL; +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_FLICKR_PUBLISHER (publisher), NULL); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrPublishingOptionsPane*) g_object_new (object_type, NULL); +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = builder; +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->builder = _tmp1_; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = builder; +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp2_ != NULL, "builder != null"); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = builder; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = gtk_builder_get_objects (_tmp3_); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_; +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = g_slist_length (_tmp5_); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_assert (_tmp6_ > ((guint) 0), "builder.get_objects().length() > 0"); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_slist_free0 (_tmp5_); +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = self->priv->builder; +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = gtk_builder_get_object (_tmp7_, "flickr_pane"); +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_box_get_type (), GtkBox)); +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pane_widget = _tmp9_; +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->builder; +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = gtk_builder_get_object (_tmp10_, "visibility_label"); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_label_get_type (), GtkLabel)); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->visibility_label); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibility_label = _tmp12_; +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = self->priv->builder; +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = gtk_builder_get_object (_tmp13_, "upload_info_label"); +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_label_get_type (), GtkLabel)); +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->upload_info_label); +#line 1137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->upload_info_label = _tmp15_; +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = self->priv->builder; +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = gtk_builder_get_object (_tmp16_, "logout_button"); +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_button_get_type (), GtkButton)); +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->logout_button = _tmp18_; +#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = self->priv->builder; +#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = gtk_builder_get_object (_tmp19_, "publish_button"); +#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_button_get_type (), GtkButton)); +#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publish_button = _tmp21_; +#line 1140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = self->priv->builder; +#line 1140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = gtk_builder_get_object (_tmp22_, "visibility_combo"); +#line 1140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 1140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->visibility_combo); +#line 1140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibility_combo = _tmp24_; +#line 1141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = self->priv->builder; +#line 1141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = gtk_builder_get_object (_tmp25_, "size_combo"); +#line 1141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 1141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 1141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->size_combo = _tmp27_; +#line 1142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = self->priv->builder; +#line 1142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = gtk_builder_get_object (_tmp28_, "size_label"); +#line 1142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_label_get_type (), GtkLabel)); +#line 1142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->size_label); +#line 1142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->size_label = _tmp30_; +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = self->priv->builder; +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = gtk_builder_get_object (_tmp31_, "strip_metadata_check"); +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_check_button_get_type (), GtkCheckButton)); +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->strip_metadata_check = _tmp33_; +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = parameters; +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = _publishing_flickr_publishing_parameters_ref0 (_tmp34_); +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 1145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = _tmp35_; +#line 1146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp36_ = publisher; +#line 1146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = _g_object_ref0 (_tmp36_); +#line 1146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 1146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publisher = _tmp37_; +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = media_type; +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->media_type = _tmp38_; +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp40_ = publishing_flickr_publishing_options_pane_create_visibilities (self, &_tmp39_); +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = _tmp40_; +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities_length1 = _tmp39_; +#line 1149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_visibilities_size_ = self->priv->visibilities_length1; +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp42_ = publishing_flickr_publishing_options_pane_create_sizes (self, &_tmp41_); +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = _tmp42_; +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes_length1 = _tmp41_; +#line 1150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp43_ = _ ("You are logged into Flickr as %s.\n\n"); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp44_ = parameters; +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp45_ = _tmp44_->username; +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp46_ = g_strdup_printf (_tmp43_, _tmp45_); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + upload_label_text = _tmp46_; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp47_ = parameters; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp48_ = _tmp47_->user_kind; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp48_ == PUBLISHING_FLICKR_USER_KIND_FREE) { +#line 7865 "FlickrPublishing.c" + const gchar* _tmp49_ = NULL; + PublishingFlickrPublishingParameters* _tmp50_ = NULL; + gint _tmp51_ = 0; + const gchar* _tmp52_ = NULL; + PublishingFlickrPublishingParameters* _tmp53_ = NULL; + gint _tmp54_ = 0; + gchar* _tmp55_ = NULL; + gchar* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp49_ = upload_label_text; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp50_ = parameters; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp51_ = _tmp50_->quota_free_mb; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp52_ = ngettext ("Your free Flickr account limits how much data you can upload per month" \ +".\n" \ +"This month you have %d megabyte remaining in your upload quota.", "Your free Flickr account limits how much data you can upload per month" \ +".\n" \ +"This month you have %d megabytes remaining in your upload quota.", (gulong) _tmp51_); +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp53_ = parameters; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp54_ = _tmp53_->quota_free_mb; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp55_ = g_strdup_printf (_tmp52_, _tmp54_); +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp56_ = _tmp55_; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp57_ = g_strconcat (_tmp49_, _tmp56_, NULL); +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (upload_label_text); +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + upload_label_text = _tmp57_; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp56_); +#line 7899 "FlickrPublishing.c" + } else { + const gchar* _tmp58_ = NULL; + const gchar* _tmp59_ = NULL; + gchar* _tmp60_ = NULL; +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp58_ = upload_label_text; +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp59_ = _ ("Your Flickr Pro account entitles you to unlimited uploads."); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp60_ = g_strconcat (_tmp58_, _tmp59_, NULL); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (upload_label_text); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + upload_label_text = _tmp60_; +#line 7914 "FlickrPublishing.c" + } +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp61_ = self->priv->upload_info_label; +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp62_ = upload_label_text; +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_label_set_label (_tmp61_, _tmp62_); +#line 1164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp63_ = _ ("Photos _visible to:"); +#line 1164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp64_ = g_strdup (_tmp63_); +#line 1164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + visibility_label_text = _tmp64_; +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp65_ = media_type; +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp65_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 7932 "FlickrPublishing.c" + const gchar* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp66_ = _ ("Videos _visible to:"); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp67_ = g_strdup (_tmp66_); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (visibility_label_text); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + visibility_label_text = _tmp67_; +#line 7943 "FlickrPublishing.c" + } else { + SpitPublishingPublisherMediaType _tmp68_ = 0; +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp68_ = media_type; +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp68_ == (SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO)) { +#line 7950 "FlickrPublishing.c" + const gchar* _tmp69_ = NULL; + gchar* _tmp70_ = NULL; +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp69_ = _ ("Photos and videos _visible to:"); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp70_ = g_strdup (_tmp69_); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (visibility_label_text); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + visibility_label_text = _tmp70_; +#line 7961 "FlickrPublishing.c" + } + } +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp71_ = self->priv->visibility_label; +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp72_ = visibility_label_text; +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_label_set_label (_tmp71_, _tmp72_); +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_populate_visibility_combo (self); +#line 1175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp73_ = self->priv->visibility_combo; +#line 1175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_flickr_publishing_options_pane_on_visibility_changed_gtk_combo_box_changed, self, 0); +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp74_ = media_type; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp74_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 7980 "FlickrPublishing.c" + GtkComboBoxText* _tmp75_ = NULL; +#line 1178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_populate_size_combo (self); +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp75_ = self->priv->size_combo; +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_flickr_publishing_options_pane_on_size_changed_gtk_combo_box_changed, self, 0); +#line 7988 "FlickrPublishing.c" + } else { + GtkComboBoxText* _tmp76_ = NULL; + GtkLabel* _tmp77_ = NULL; +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp76_ = self->priv->size_combo; +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp77_ = self->priv->size_label; +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 8000 "FlickrPublishing.c" + } +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp78_ = self->priv->strip_metadata_check; +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp79_ = strip_metadata; +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp79_); +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp80_ = self->priv->logout_button; +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp80_, "clicked", (GCallback) _publishing_flickr_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp81_ = self->priv->publish_button; +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (_tmp81_, "clicked", (GCallback) _publishing_flickr_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (visibility_label_text); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (upload_label_text); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 8022 "FlickrPublishing.c" +} + + +PublishingFlickrPublishingOptionsPane* publishing_flickr_publishing_options_pane_new (PublishingFlickrFlickrPublisher* publisher, PublishingFlickrPublishingParameters* parameters, SpitPublishingPublisherMediaType media_type, GtkBuilder* builder, gboolean strip_metadata) { +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_publishing_options_pane_construct (PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, publisher, parameters, media_type, builder, strip_metadata); +#line 8029 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_on_logout_clicked (PublishingFlickrPublishingOptionsPane* self) { +#line 1192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1193 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 8038 "FlickrPublishing.c" +} + + +static gpointer _publishing_flickr_visibility_specification_ref0 (gpointer self) { +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_flickr_visibility_specification_ref (self) : NULL; +#line 8045 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_on_publish_clicked (PublishingFlickrPublishingOptionsPane* self) { + PublishingFlickrPublishingParameters* _tmp0_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + GtkComboBoxText* _tmp2_ = NULL; + gint _tmp3_ = 0; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp4_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp5_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp6_ = NULL; + SpitPublishingPublisherMediaType _tmp7_ = 0; + GtkCheckButton* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; +#line 1196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->parameters; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->visibilities; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1__length1 = self->priv->visibilities_length1; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = self->priv->visibility_combo; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp1_[_tmp3_]; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _tmp4_->specification; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _publishing_flickr_visibility_specification_ref0 (_tmp5_); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp0_->visibility_specification); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_->visibility_specification = _tmp6_; +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = self->priv->media_type; +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((_tmp7_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) != 0) { +#line 8087 "FlickrPublishing.c" + PublishingFlickrPublishingParameters* _tmp8_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp9_ = NULL; + gint _tmp9__length1 = 0; + GtkComboBoxText* _tmp10_ = NULL; + gint _tmp11_ = 0; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp12_ = NULL; + gint _tmp13_ = 0; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = self->priv->parameters; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = self->priv->sizes; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9__length1 = self->priv->sizes_length1; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = self->priv->size_combo; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _tmp9_[_tmp11_]; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _tmp12_->size; +#line 1201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_->photo_major_axis_size = _tmp13_; +#line 8111 "FlickrPublishing.c" + } +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = self->priv->strip_metadata_check; +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (self, "publish", _tmp15_); +#line 8119 "FlickrPublishing.c" +} + + +static void _vala_array_add20 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); +#line 8130 "FlickrPublishing.c" + } +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8136 "FlickrPublishing.c" +} + + +static void _vala_array_add21 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); +#line 8147 "FlickrPublishing.c" + } +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8153 "FlickrPublishing.c" +} + + +static void _vala_array_add22 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); +#line 8164 "FlickrPublishing.c" + } +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8170 "FlickrPublishing.c" +} + + +static void _vala_array_add23 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); +#line 8181 "FlickrPublishing.c" + } +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8187 "FlickrPublishing.c" +} + + +static void _vala_array_add24 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneVisibilityEntry* value) { +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, *array, (*size) + 1); +#line 8198 "FlickrPublishing.c" + } +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8204 "FlickrPublishing.c" +} + + +static PublishingFlickrPublishingOptionsPaneVisibilityEntry** publishing_flickr_publishing_options_pane_create_visibilities (PublishingFlickrPublishingOptionsPane* self, int* result_length1) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry** result = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _result_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp3_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp4_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp5_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + const gchar* _tmp7_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp8_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp9_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp10_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp11_ = NULL; + gint _tmp11__length1 = 0; + const gchar* _tmp12_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp13_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp14_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp15_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp16_ = NULL; + gint _tmp16__length1 = 0; + const gchar* _tmp17_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp18_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp19_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp20_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp21_ = NULL; + gint _tmp21__length1 = 0; + const gchar* _tmp22_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp23_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp24_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp25_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp26_ = NULL; + gint _tmp26__length1 = 0; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = g_new0 (PublishingFlickrPublishingOptionsPaneVisibilityEntry*, 0 + 1); +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp0_; +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result__length1 = 0; +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + __result__size_ = _result__length1; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _result_; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _ ("Everyone"); +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_visibility_specification_new (1, 1, 1); +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _tmp3_; +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_tmp2_, _tmp4_); +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add20 (&_result_, &_result__length1, &__result__size_, _tmp5_); +#line 1209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp4_); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _result_; +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6__length1 = _result__length1; +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _ ("Friends & family only"); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = publishing_flickr_visibility_specification_new (1, 1, 0); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = _tmp8_; +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_tmp7_, _tmp9_); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add21 (&_result_, &_result__length1, &__result__size_, _tmp10_); +#line 1210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp9_); +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _result_; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11__length1 = _result__length1; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = _ ("Family only"); +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = publishing_flickr_visibility_specification_new (0, 1, 0); +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = _tmp13_; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_tmp12_, _tmp14_); +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add22 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp14_); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = _result_; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16__length1 = _result__length1; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = _ ("Friends only"); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = publishing_flickr_visibility_specification_new (1, 0, 0); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = _tmp18_; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_tmp17_, _tmp19_); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add23 (&_result_, &_result__length1, &__result__size_, _tmp20_); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp19_); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = _result_; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21__length1 = _result__length1; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = _ ("Just me"); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = publishing_flickr_visibility_specification_new (0, 0, 0); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = _tmp23_; +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = publishing_flickr_publishing_options_pane_visibility_entry_new (_tmp22_, _tmp24_); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add24 (&_result_, &_result__length1, &__result__size_, _tmp25_); +#line 1213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (_tmp24_); +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = _result_; +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26__length1 = _result__length1; +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (result_length1) { +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *result_length1 = _tmp26__length1; +#line 8344 "FlickrPublishing.c" + } +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp26_; +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 8350 "FlickrPublishing.c" +} + + +static gpointer _publishing_flickr_publishing_options_pane_visibility_entry_ref0 (gpointer self) { +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_flickr_publishing_options_pane_visibility_entry_ref (self) : NULL; +#line 8357 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_populate_visibility_combo (PublishingFlickrPublishingOptionsPane* self) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + GtkComboBoxText* _tmp8_ = NULL; + PublishingFlickrFlickrPublisher* _tmp9_ = NULL; + gint _tmp10_ = 0; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->visibilities; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0__length1 = self->priv->visibilities_length1; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_ == NULL) { +#line 8377 "FlickrPublishing.c" + gint _tmp1_ = 0; + PublishingFlickrPublishingOptionsPaneVisibilityEntry** _tmp2_ = NULL; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_publishing_options_pane_create_visibilities (self, &_tmp1_); +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = _tmp2_; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities_length1 = _tmp1_; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_visibilities_size_ = self->priv->visibilities_length1; +#line 8390 "FlickrPublishing.c" + } +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->visibilities; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3__length1 = self->priv->visibilities_length1; +#line 8396 "FlickrPublishing.c" + { + PublishingFlickrPublishingOptionsPaneVisibilityEntry** v_collection = NULL; + gint v_collection_length1 = 0; + gint _v_collection_size_ = 0; + gint v_it = 0; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + v_collection = _tmp3_; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + v_collection_length1 = _tmp3__length1; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (v_it = 0; v_it < _tmp3__length1; v_it = v_it + 1) { +#line 8408 "FlickrPublishing.c" + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp4_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* v = NULL; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _publishing_flickr_publishing_options_pane_visibility_entry_ref0 (v_collection[v_it]); +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + v = _tmp4_; +#line 8415 "FlickrPublishing.c" + { + GtkComboBoxText* _tmp5_ = NULL; + PublishingFlickrPublishingOptionsPaneVisibilityEntry* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->visibility_combo; +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = v; +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_->title; +#line 1223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_combo_box_text_append_text (_tmp5_, _tmp7_); +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_options_pane_visibility_entry_unref0 (v); +#line 8430 "FlickrPublishing.c" + } + } + } +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = self->priv->visibility_combo; +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = self->priv->publisher; +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = publishing_flickr_flickr_publisher_get_persistent_visibility (_tmp9_); +#line 1225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), _tmp10_); +#line 8442 "FlickrPublishing.c" +} + + +static void _vala_array_add25 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); +#line 8453 "FlickrPublishing.c" + } +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8459 "FlickrPublishing.c" +} + + +static void _vala_array_add26 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); +#line 8470 "FlickrPublishing.c" + } +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8476 "FlickrPublishing.c" +} + + +static void _vala_array_add27 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); +#line 8487 "FlickrPublishing.c" + } +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8493 "FlickrPublishing.c" +} + + +static void _vala_array_add28 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); +#line 8504 "FlickrPublishing.c" + } +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8510 "FlickrPublishing.c" +} + + +static void _vala_array_add29 (PublishingFlickrPublishingOptionsPaneSizeEntry*** array, int* length, int* size, PublishingFlickrPublishingOptionsPaneSizeEntry* value) { +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (PublishingFlickrPublishingOptionsPaneSizeEntry*, *array, (*size) + 1); +#line 8521 "FlickrPublishing.c" + } +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 8527 "FlickrPublishing.c" +} + + +static PublishingFlickrPublishingOptionsPaneSizeEntry** publishing_flickr_publishing_options_pane_create_sizes (PublishingFlickrPublishingOptionsPane* self, int* result_length1) { + PublishingFlickrPublishingOptionsPaneSizeEntry** result = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _result_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp3_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp6_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp9_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp12_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp15_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp16_ = NULL; + gint _tmp16__length1 = 0; +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = g_new0 (PublishingFlickrPublishingOptionsPaneSizeEntry*, 0 + 1); +#line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result_ = _tmp0_; +#line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _result__length1 = 0; +#line 1229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + __result__size_ = _result__length1; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _result_; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = _ ("500 x 375 pixels"); +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishing_flickr_publishing_options_pane_size_entry_new (_tmp2_, 500); +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add25 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _result_; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4__length1 = _result__length1; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = _ ("1024 x 768 pixels"); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = publishing_flickr_publishing_options_pane_size_entry_new (_tmp5_, 1024); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add26 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _result_; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7__length1 = _result__length1; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _ ("2048 x 1536 pixels"); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = publishing_flickr_publishing_options_pane_size_entry_new (_tmp8_, 2048); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add27 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = _result_; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10__length1 = _result__length1; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _ ("4096 x 3072 pixels"); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = publishing_flickr_publishing_options_pane_size_entry_new (_tmp11_, 4096); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add28 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _result_; +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13__length1 = _result__length1; +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = _ ("Original size"); +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = publishing_flickr_publishing_options_pane_size_entry_new (_tmp14_, PUBLISHING_FLICKR_ORIGINAL_SIZE); +#line 1235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add29 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = _result_; +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16__length1 = _result__length1; +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (result_length1) { +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *result_length1 = _tmp16__length1; +#line 8627 "FlickrPublishing.c" + } +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp16_; +#line 1237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 8633 "FlickrPublishing.c" +} + + +static gpointer _publishing_flickr_publishing_options_pane_size_entry_ref0 (gpointer self) { +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self ? publishing_flickr_publishing_options_pane_size_entry_ref (self) : NULL; +#line 8640 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_populate_size_combo (PublishingFlickrPublishingOptionsPane* self) { + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + GtkComboBoxText* _tmp8_ = NULL; + PublishingFlickrFlickrPublisher* _tmp9_ = NULL; + gint _tmp10_ = 0; +#line 1240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->sizes; +#line 1241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0__length1 = self->priv->sizes_length1; +#line 1241 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp0_ == NULL) { +#line 8660 "FlickrPublishing.c" + gint _tmp1_ = 0; + PublishingFlickrPublishingOptionsPaneSizeEntry** _tmp2_ = NULL; +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_flickr_publishing_options_pane_create_sizes (self, &_tmp1_); +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = _tmp2_; +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes_length1 = _tmp1_; +#line 1242 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 8673 "FlickrPublishing.c" + } +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = self->priv->sizes; +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3__length1 = self->priv->sizes_length1; +#line 8679 "FlickrPublishing.c" + { + PublishingFlickrPublishingOptionsPaneSizeEntry** e_collection = NULL; + gint e_collection_length1 = 0; + gint _e_collection_size_ = 0; + gint e_it = 0; +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e_collection = _tmp3_; +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e_collection_length1 = _tmp3__length1; +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (e_it = 0; e_it < _tmp3__length1; e_it = e_it + 1) { +#line 8691 "FlickrPublishing.c" + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp4_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* e = NULL; +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = _publishing_flickr_publishing_options_pane_size_entry_ref0 (e_collection[e_it]); +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + e = _tmp4_; +#line 8698 "FlickrPublishing.c" + { + GtkComboBoxText* _tmp5_ = NULL; + PublishingFlickrPublishingOptionsPaneSizeEntry* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = self->priv->size_combo; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = e; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = _tmp6_->title; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_combo_box_text_append_text (_tmp5_, _tmp7_); +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_options_pane_size_entry_unref0 (e); +#line 8713 "FlickrPublishing.c" + } + } + } +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = self->priv->size_combo; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = self->priv->publisher; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = publishing_flickr_flickr_publisher_get_persistent_default_size (_tmp9_); +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), _tmp10_); +#line 8725 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_on_size_changed (PublishingFlickrPublishingOptionsPane* self) { + PublishingFlickrFlickrPublisher* _tmp0_ = NULL; + GtkComboBoxText* _tmp1_ = NULL; + gint _tmp2_ = 0; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->publisher; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->size_combo; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_default_size (_tmp0_, _tmp2_); +#line 8743 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_on_visibility_changed (PublishingFlickrPublishingOptionsPane* self) { + PublishingFlickrFlickrPublisher* _tmp0_ = NULL; + GtkComboBoxText* _tmp1_ = NULL; + gint _tmp2_ = 0; +#line 1254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->publisher; +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = self->priv->visibility_combo; +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_flickr_publisher_set_persistent_visibility (_tmp0_, _tmp2_); +#line 8761 "FlickrPublishing.c" +} + + +void publishing_flickr_publishing_options_pane_notify_publish (PublishingFlickrPublishingOptionsPane* self) { + GtkCheckButton* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->strip_metadata_check; +#line 1259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (self, "publish", _tmp1_); +#line 8776 "FlickrPublishing.c" +} + + +void publishing_flickr_publishing_options_pane_notify_logout (PublishingFlickrPublishingOptionsPane* self) { +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 8785 "FlickrPublishing.c" +} + + +static GtkWidget* publishing_flickr_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingFlickrPublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp1_; +#line 1267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 8804 "FlickrPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_flickr_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingFlickrPublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 1270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); +#line 1271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 1271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 8817 "FlickrPublishing.c" +} + + +static void _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish (PublishingFlickrPublishingOptionsPane* _sender, gboolean strip_metadata, gpointer self) { +#line 1275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_notify_publish ((PublishingFlickrPublishingOptionsPane*) self); +#line 8824 "FlickrPublishing.c" +} + + +static void _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout (PublishingFlickrPublishingOptionsPane* _sender, gpointer self) { +#line 1276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_notify_logout ((PublishingFlickrPublishingOptionsPane*) self); +#line 8831 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingFlickrPublishingOptionsPane * self; +#line 1274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); +#line 1275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (self, "publish", (GCallback) _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish, self, 0); +#line 1276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_connect_object (self, "logout", (GCallback) _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout, self, 0); +#line 8843 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingFlickrPublishingOptionsPane * self; + guint _tmp0_ = 0U; + guint _tmp1_ = 0U; +#line 1279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); +#line 1280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp0_, NULL, FALSE); +#line 1280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _publishing_flickr_publishing_options_pane_notify_publish_publishing_flickr_publishing_options_pane_publish, self); +#line 1281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_parse_name ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, &_tmp1_, NULL, FALSE); +#line 1281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_flickr_publishing_options_pane_notify_logout_publishing_flickr_publishing_options_pane_logout, self); +#line 8861 "FlickrPublishing.c" +} + + +static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_construct (GType object_type, const gchar* creator_title, gint creator_size) { + PublishingFlickrPublishingOptionsPaneSizeEntry* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (creator_title != NULL, NULL); +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrPublishingOptionsPaneSizeEntry*) g_type_create_instance (object_type); +#line 1094 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = creator_title; +#line 1094 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1094 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->title); +#line 1094 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->title = _tmp1_; +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = creator_size; +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->size = _tmp2_; +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 8888 "FlickrPublishing.c" +} + + +static PublishingFlickrPublishingOptionsPaneSizeEntry* publishing_flickr_publishing_options_pane_size_entry_new (const gchar* creator_title, gint creator_size) { +#line 1093 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_publishing_options_pane_size_entry_construct (PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, creator_title, creator_size); +#line 8895 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_size_entry_init (GValue* value) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8902 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_size_entry_free_value (GValue* value) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (value->data[0].v_pointer) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_size_entry_unref (value->data[0].v_pointer); +#line 8911 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_value_size_entry_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = publishing_flickr_publishing_options_pane_size_entry_ref (src_value->data[0].v_pointer); +#line 8921 "FlickrPublishing.c" + } else { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 8925 "FlickrPublishing.c" + } +} + + +static gpointer publishing_flickr_publishing_options_pane_value_size_entry_peek_pointer (const GValue* value) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 8933 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_publishing_options_pane_value_size_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 8940 "FlickrPublishing.c" + PublishingFlickrPublishingOptionsPaneSizeEntry* object; + object = collect_values[0].v_pointer; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 8947 "FlickrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 8951 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = publishing_flickr_publishing_options_pane_size_entry_ref (object); +#line 8955 "FlickrPublishing.c" + } else { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 8959 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 8963 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_publishing_options_pane_value_size_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFlickrPublishingOptionsPaneSizeEntry** object_p; + object_p = collect_values[0].v_pointer; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!object_p) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 8974 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = NULL; +#line 8980 "FlickrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 8984 "FlickrPublishing.c" + } else { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = publishing_flickr_publishing_options_pane_size_entry_ref (value->data[0].v_pointer); +#line 8988 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 8992 "FlickrPublishing.c" +} + + +static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFlickrPublishingOptionsPaneParamSpecSizeEntry* spec; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY), NULL); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 9006 "FlickrPublishing.c" +} + + +static gpointer publishing_flickr_publishing_options_pane_value_get_size_entry (const GValue* value) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY), NULL); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 9015 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_set_size_entry (GValue* value, gpointer v_object) { + PublishingFlickrPublishingOptionsPaneSizeEntry* old; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_size_entry_ref (value->data[0].v_pointer); +#line 9035 "FlickrPublishing.c" + } else { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9039 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_size_entry_unref (old); +#line 9045 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_value_take_size_entry (GValue* value, gpointer v_object) { + PublishingFlickrPublishingOptionsPaneSizeEntry* old; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY)); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 9064 "FlickrPublishing.c" + } else { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9068 "FlickrPublishing.c" + } +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_size_entry_unref (old); +#line 9074 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_size_entry_class_init (PublishingFlickrPublishingOptionsPaneSizeEntryClass * klass) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_size_entry_parent_class = g_type_class_peek_parent (klass); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingFlickrPublishingOptionsPaneSizeEntryClass *) klass)->finalize = publishing_flickr_publishing_options_pane_size_entry_finalize; +#line 9084 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_size_entry_instance_init (PublishingFlickrPublishingOptionsPaneSizeEntry * self) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->ref_count = 1; +#line 9091 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_size_entry_finalize (PublishingFlickrPublishingOptionsPaneSizeEntry* obj) { + PublishingFlickrPublishingOptionsPaneSizeEntry * self; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_ENTRY, PublishingFlickrPublishingOptionsPaneSizeEntry); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_destroy (self); +#line 1090 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->title); +#line 9103 "FlickrPublishing.c" +} + + +static GType publishing_flickr_publishing_options_pane_size_entry_get_type (void) { + static volatile gsize publishing_flickr_publishing_options_pane_size_entry_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_publishing_options_pane_size_entry_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_flickr_publishing_options_pane_value_size_entry_init, publishing_flickr_publishing_options_pane_value_size_entry_free_value, publishing_flickr_publishing_options_pane_value_size_entry_copy_value, publishing_flickr_publishing_options_pane_value_size_entry_peek_pointer, "p", publishing_flickr_publishing_options_pane_value_size_entry_collect_value, "p", publishing_flickr_publishing_options_pane_value_size_entry_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrPublishingOptionsPaneSizeEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_publishing_options_pane_size_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrPublishingOptionsPaneSizeEntry), 0, (GInstanceInitFunc) publishing_flickr_publishing_options_pane_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_flickr_publishing_options_pane_size_entry_type_id; + publishing_flickr_publishing_options_pane_size_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFlickrPublishingOptionsPaneSizeEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_flickr_publishing_options_pane_size_entry_type_id__volatile, publishing_flickr_publishing_options_pane_size_entry_type_id); + } + return publishing_flickr_publishing_options_pane_size_entry_type_id__volatile; +} + + +static gpointer publishing_flickr_publishing_options_pane_size_entry_ref (gpointer instance) { + PublishingFlickrPublishingOptionsPaneSizeEntry* self; + self = instance; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return instance; +#line 9128 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_size_entry_unref (gpointer instance) { + PublishingFlickrPublishingOptionsPaneSizeEntry* self; + self = instance; +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_SIZE_ENTRY_GET_CLASS (self)->finalize (self); +#line 1089 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 9141 "FlickrPublishing.c" + } +} + + +static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_construct (GType object_type, const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry* self = NULL; + PublishingFlickrVisibilitySpecification* _tmp0_ = NULL; + PublishingFlickrVisibilitySpecification* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (creator_title != NULL, NULL); +#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_VISIBILITY_SPECIFICATION (creator_specification), NULL); +#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrPublishingOptionsPaneVisibilityEntry*) g_type_create_instance (object_type); +#line 1104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = creator_specification; +#line 1104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _publishing_flickr_visibility_specification_ref0 (_tmp0_); +#line 1104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (self->specification); +#line 1104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->specification = _tmp1_; +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = creator_title; +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->title); +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->title = _tmp3_; +#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 9176 "FlickrPublishing.c" +} + + +static PublishingFlickrPublishingOptionsPaneVisibilityEntry* publishing_flickr_publishing_options_pane_visibility_entry_new (const gchar* creator_title, PublishingFlickrVisibilitySpecification* creator_specification) { +#line 1103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_publishing_options_pane_visibility_entry_construct (PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, creator_title, creator_specification); +#line 9183 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_visibility_entry_init (GValue* value) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9190 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_visibility_entry_free_value (GValue* value) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (value->data[0].v_pointer) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_visibility_entry_unref (value->data[0].v_pointer); +#line 9199 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_value_visibility_entry_copy_value (const GValue* src_value, GValue* dest_value) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = publishing_flickr_publishing_options_pane_visibility_entry_ref (src_value->data[0].v_pointer); +#line 9209 "FlickrPublishing.c" + } else { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 9213 "FlickrPublishing.c" + } +} + + +static gpointer publishing_flickr_publishing_options_pane_value_visibility_entry_peek_pointer (const GValue* value) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 9221 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_publishing_options_pane_value_visibility_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (collect_values[0].v_pointer) { +#line 9228 "FlickrPublishing.c" + PublishingFlickrPublishingOptionsPaneVisibilityEntry* object; + object = collect_values[0].v_pointer; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 9235 "FlickrPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 9239 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = publishing_flickr_publishing_options_pane_visibility_entry_ref (object); +#line 9243 "FlickrPublishing.c" + } else { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9247 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 9251 "FlickrPublishing.c" +} + + +static gchar* publishing_flickr_publishing_options_pane_value_visibility_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry** object_p; + object_p = collect_values[0].v_pointer; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!object_p) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 9262 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!value->data[0].v_pointer) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = NULL; +#line 9268 "FlickrPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 9272 "FlickrPublishing.c" + } else { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *object_p = publishing_flickr_publishing_options_pane_visibility_entry_ref (value->data[0].v_pointer); +#line 9276 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return NULL; +#line 9280 "FlickrPublishing.c" +} + + +static GParamSpec* publishing_flickr_publishing_options_pane_param_spec_visibility_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingFlickrPublishingOptionsPaneParamSpecVisibilityEntry* spec; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY), NULL); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return G_PARAM_SPEC (spec); +#line 9294 "FlickrPublishing.c" +} + + +static gpointer publishing_flickr_publishing_options_pane_value_get_visibility_entry (const GValue* value) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY), NULL); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return value->data[0].v_pointer; +#line 9303 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_value_set_visibility_entry (GValue* value, gpointer v_object) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry* old; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_visibility_entry_ref (value->data[0].v_pointer); +#line 9323 "FlickrPublishing.c" + } else { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9327 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_visibility_entry_unref (old); +#line 9333 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_value_take_visibility_entry (GValue* value, gpointer v_object) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry* old; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + old = value->data[0].v_pointer; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (v_object) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY)); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = v_object; +#line 9352 "FlickrPublishing.c" + } else { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + value->data[0].v_pointer = NULL; +#line 9356 "FlickrPublishing.c" + } +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (old) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_visibility_entry_unref (old); +#line 9362 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_visibility_entry_class_init (PublishingFlickrPublishingOptionsPaneVisibilityEntryClass * klass) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_visibility_entry_parent_class = g_type_class_peek_parent (klass); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingFlickrPublishingOptionsPaneVisibilityEntryClass *) klass)->finalize = publishing_flickr_publishing_options_pane_visibility_entry_finalize; +#line 9372 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_visibility_entry_instance_init (PublishingFlickrPublishingOptionsPaneVisibilityEntry * self) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->ref_count = 1; +#line 9379 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_visibility_entry_finalize (PublishingFlickrPublishingOptionsPaneVisibilityEntry* obj) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry * self; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_TYPE_VISIBILITY_ENTRY, PublishingFlickrPublishingOptionsPaneVisibilityEntry); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_handlers_destroy (self); +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_visibility_specification_unref0 (self->specification); +#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (self->title); +#line 9393 "FlickrPublishing.c" +} + + +static GType publishing_flickr_publishing_options_pane_visibility_entry_get_type (void) { + static volatile gsize publishing_flickr_publishing_options_pane_visibility_entry_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_publishing_options_pane_visibility_entry_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_flickr_publishing_options_pane_value_visibility_entry_init, publishing_flickr_publishing_options_pane_value_visibility_entry_free_value, publishing_flickr_publishing_options_pane_value_visibility_entry_copy_value, publishing_flickr_publishing_options_pane_value_visibility_entry_peek_pointer, "p", publishing_flickr_publishing_options_pane_value_visibility_entry_collect_value, "p", publishing_flickr_publishing_options_pane_value_visibility_entry_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrPublishingOptionsPaneVisibilityEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_publishing_options_pane_visibility_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrPublishingOptionsPaneVisibilityEntry), 0, (GInstanceInitFunc) publishing_flickr_publishing_options_pane_visibility_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_flickr_publishing_options_pane_visibility_entry_type_id; + publishing_flickr_publishing_options_pane_visibility_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingFlickrPublishingOptionsPaneVisibilityEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_flickr_publishing_options_pane_visibility_entry_type_id__volatile, publishing_flickr_publishing_options_pane_visibility_entry_type_id); + } + return publishing_flickr_publishing_options_pane_visibility_entry_type_id__volatile; +} + + +static gpointer publishing_flickr_publishing_options_pane_visibility_entry_ref (gpointer instance) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry* self; + self = instance; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return instance; +#line 9418 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_visibility_entry_unref (gpointer instance) { + PublishingFlickrPublishingOptionsPaneVisibilityEntry* self; + self = instance; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_VISIBILITY_ENTRY_GET_CLASS (self)->finalize (self); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 9431 "FlickrPublishing.c" + } +} + + +static void publishing_flickr_publishing_options_pane_class_init (PublishingFlickrPublishingOptionsPaneClass * klass) { +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrPublishingOptionsPanePrivate)); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_flickr_publishing_options_pane_finalize; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_new ("publish", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_signal_new ("logout", PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 9447 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_flickr_publishing_options_pane_real_get_widget; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_flickr_publishing_options_pane_real_get_preferred_geometry; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_flickr_publishing_options_pane_real_on_pane_installed; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_flickr_publishing_options_pane_real_on_pane_uninstalled; +#line 9462 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_instance_init (PublishingFlickrPublishingOptionsPane * self) { +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 1110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->pane_widget = NULL; +#line 1111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibility_label = NULL; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->upload_info_label = NULL; +#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->size_label = NULL; +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->logout_button = NULL; +#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publish_button = NULL; +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibility_combo = NULL; +#line 1117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->size_combo = NULL; +#line 1118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->strip_metadata_check = NULL; +#line 1119 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = NULL; +#line 1119 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities_length1 = 0; +#line 1119 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_visibilities_size_ = self->priv->visibilities_length1; +#line 1120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = NULL; +#line 1120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes_length1 = 0; +#line 1120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->_sizes_size_ = self->priv->sizes_length1; +#line 1121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = NULL; +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->publisher = NULL; +#line 9503 "FlickrPublishing.c" +} + + +static void publishing_flickr_publishing_options_pane_finalize (GObject* obj) { + PublishingFlickrPublishingOptionsPane * self; +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_PUBLISHING_OPTIONS_PANE, PublishingFlickrPublishingOptionsPane); +#line 1109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->visibility_label); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->upload_info_label); +#line 1113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->size_label); +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->visibility_combo); +#line 1117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 1118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1119 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->visibilities = (_vala_array_free (self->priv->visibilities, self->priv->visibilities_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_visibility_entry_unref), NULL); +#line 1120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->sizes = (_vala_array_free (self->priv->sizes, self->priv->sizes_length1, (GDestroyNotify) publishing_flickr_publishing_options_pane_size_entry_unref), NULL); +#line 1121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (self->priv->publisher); +#line 1088 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + G_OBJECT_CLASS (publishing_flickr_publishing_options_pane_parent_class)->finalize (obj); +#line 9541 "FlickrPublishing.c" +} + + +GType publishing_flickr_publishing_options_pane_get_type (void) { + static volatile gsize publishing_flickr_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_flickr_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_flickr_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_flickr_publishing_options_pane_type_id; + publishing_flickr_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingFlickrPublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_flickr_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_flickr_publishing_options_pane_type_id__volatile, publishing_flickr_publishing_options_pane_type_id); + } + return publishing_flickr_publishing_options_pane_type_id__volatile; +} + + +PublishingFlickrUploader* publishing_flickr_uploader_construct (GType object_type, PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { + PublishingFlickrUploader* self = NULL; + PublishingFlickrSession* _tmp0_ = NULL; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingFlickrPublishingParameters* _tmp2_ = NULL; + PublishingFlickrPublishingParameters* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 1289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_SESSION (session), NULL); +#line 1289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (PUBLISHING_FLICKR_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = session; +#line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = publishables; +#line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1__length1 = publishables_length1; +#line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = (PublishingFlickrUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = parameters; +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = _publishing_flickr_publishing_parameters_ref0 (_tmp2_); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 1293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->parameters = _tmp3_; +#line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = strip_metadata; +#line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv->strip_metadata = _tmp4_; +#line 1289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return self; +#line 9593 "FlickrPublishing.c" +} + + +PublishingFlickrUploader* publishing_flickr_uploader_new (PublishingFlickrSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingFlickrPublishingParameters* parameters, gboolean strip_metadata) { +#line 1289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return publishing_flickr_uploader_construct (PUBLISHING_FLICKR_TYPE_UPLOADER, session, publishables, publishables_length1, parameters, strip_metadata); +#line 9600 "FlickrPublishing.c" +} + + +static void _vala_array_add30 (gchar*** array, int* length, int* size, gchar* value) { +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if ((*length) == (*size)) { +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + *array = g_renew (gchar*, *array, (*size) + 1); +#line 9611 "FlickrPublishing.c" + } +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[(*length)++] = value; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + (*array)[*length] = NULL; +#line 9617 "FlickrPublishing.c" +} + + +static void publishing_flickr_uploader_preprocess_publishable (PublishingFlickrUploader* self, SpitPublishingPublishable* publishable) { + SpitPublishingPublishable* _tmp0_ = NULL; + SpitPublishingPublisherMediaType _tmp1_ = 0; + GExiv2Metadata* publishable_metadata = NULL; + GExiv2Metadata* _tmp2_ = NULL; + GExiv2Metadata* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + GExiv2Metadata* _tmp16_ = NULL; + gboolean _tmp17_ = FALSE; + GExiv2Metadata* _tmp24_ = NULL; + gboolean _tmp25_ = FALSE; + GExiv2Metadata* _tmp32_ = NULL; + gboolean _tmp33_ = FALSE; + GError * _inner_error_ = NULL; +#line 1297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (PUBLISHING_FLICKR_IS_UPLOADER (self)); +#line 1297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable)); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = publishable; +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = spit_publishing_publishable_get_media_type (_tmp0_); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp1_ != SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) { +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 9647 "FlickrPublishing.c" + } +#line 1301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = gexiv2_metadata_new (); +#line 1301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishable_metadata = _tmp2_; +#line 9653 "FlickrPublishing.c" + { + GExiv2Metadata* _tmp3_ = NULL; + SpitPublishingPublishable* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = publishable_metadata; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = publishable; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = spit_publishing_publishable_get_serialized_file (_tmp4_); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _tmp5_; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = g_file_get_path (_tmp6_); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = _tmp7_; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_open_path (_tmp3_, _tmp8_, &_inner_error_); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp8_); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp6_); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 9681 "FlickrPublishing.c" + goto __catch25_g_error; + } + } + goto __finally25; + __catch25_g_error: + { + GError* err = NULL; + SpitPublishingPublishable* _tmp9_ = NULL; + GFile* _tmp10_ = NULL; + GFile* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp9_ = publishable; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp10_ = spit_publishing_publishable_get_serialized_file (_tmp9_); +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp11_ = _tmp10_; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp12_ = g_file_get_path (_tmp11_); +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp13_ = _tmp12_; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:1305: couldn't read metadata from file '%s' for " \ +"upload preprocessing.", _tmp13_); +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp13_); +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp11_); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 9716 "FlickrPublishing.c" + } + __finally25: +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _gexiv2_metadata_free0 (publishable_metadata); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 9729 "FlickrPublishing.c" + } +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp14_ = publishable_metadata; +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp15_ = gexiv2_metadata_has_iptc (_tmp14_); +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (!_tmp15_) { +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _gexiv2_metadata_free0 (publishable_metadata); +#line 1314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 9741 "FlickrPublishing.c" + } +#line 1316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp16_ = publishable_metadata; +#line 1316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp17_ = gexiv2_metadata_has_tag (_tmp16_, "Iptc.Application2.Caption"); +#line 1316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp17_) { +#line 9749 "FlickrPublishing.c" + GExiv2Metadata* _tmp18_ = NULL; + GExiv2Metadata* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp18_ = publishable_metadata; +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp19_ = publishable_metadata; +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp20_ = gexiv2_metadata_get_tag_string (_tmp19_, "Iptc.Application2.Caption"); +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp21_ = _tmp20_; +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp22_ = publishing_rest_support_asciify_string (_tmp21_); +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp23_ = _tmp22_; +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_set_tag_string (_tmp18_, "Iptc.Application2.Caption", _tmp23_); +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp23_); +#line 1317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp21_); +#line 9774 "FlickrPublishing.c" + } +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp24_ = publishable_metadata; +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp25_ = gexiv2_metadata_has_tag (_tmp24_, "Iptc.Application2.Headline"); +#line 1321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp25_) { +#line 9782 "FlickrPublishing.c" + GExiv2Metadata* _tmp26_ = NULL; + GExiv2Metadata* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp26_ = publishable_metadata; +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp27_ = publishable_metadata; +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp28_ = gexiv2_metadata_get_tag_string (_tmp27_, "Iptc.Application2.Headline"); +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp29_ = _tmp28_; +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp30_ = publishing_rest_support_asciify_string (_tmp29_); +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp31_ = _tmp30_; +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_set_tag_string (_tmp26_, "Iptc.Application2.Headline", _tmp31_); +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp31_); +#line 1322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp29_); +#line 9807 "FlickrPublishing.c" + } +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp32_ = publishable_metadata; +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp33_ = gexiv2_metadata_has_tag (_tmp32_, "Iptc.Application2.Keywords"); +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp33_) { +#line 9815 "FlickrPublishing.c" + GeeSet* keyword_set = NULL; + GeeHashSet* _tmp34_ = NULL; + gchar** iptc_keywords = NULL; + GExiv2Metadata* _tmp35_ = NULL; + gchar** _tmp36_ = NULL; + gchar** _tmp37_ = NULL; + gint iptc_keywords_length1 = 0; + gint _iptc_keywords_size_ = 0; + gchar** _tmp38_ = NULL; + gint _tmp38__length1 = 0; + gchar** xmp_keywords = NULL; + GExiv2Metadata* _tmp43_ = NULL; + gchar** _tmp44_ = NULL; + gchar** _tmp45_ = NULL; + gint xmp_keywords_length1 = 0; + gint _xmp_keywords_size_ = 0; + gchar** _tmp46_ = NULL; + gint _tmp46__length1 = 0; + gchar** all_keywords = NULL; + GeeSet* _tmp51_ = NULL; + gint _tmp52_ = 0; + gpointer* _tmp53_ = NULL; + gint all_keywords_length1 = 0; + gint _all_keywords_size_ = 0; + gchar** _tmp54_ = NULL; + gint _tmp54__length1 = 0; + gchar** no_keywords = NULL; + gchar** _tmp55_ = NULL; + gint no_keywords_length1 = 0; + gint _no_keywords_size_ = 0; + gchar** _tmp56_ = NULL; + gint _tmp56__length1 = 0; + gchar* _tmp57_ = NULL; + GExiv2Metadata* _tmp58_ = NULL; + gchar** _tmp59_ = NULL; + gint _tmp59__length1 = 0; + GExiv2Metadata* _tmp60_ = NULL; + gchar** _tmp61_ = NULL; + gint _tmp61__length1 = 0; +#line 1327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp34_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL); +#line 1327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword_set = G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_SET, GeeSet); +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp35_ = publishable_metadata; +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp37_ = _tmp36_ = gexiv2_metadata_get_tag_multiple (_tmp35_, "Iptc.Application2.Keywords"); +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iptc_keywords = _tmp37_; +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iptc_keywords_length1 = _vala_array_length (_tmp36_); +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _iptc_keywords_size_ = iptc_keywords_length1; +#line 1329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38_ = iptc_keywords; +#line 1329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp38__length1 = iptc_keywords_length1; +#line 1329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp38_ != NULL) { +#line 9875 "FlickrPublishing.c" + gchar** _tmp39_ = NULL; + gint _tmp39__length1 = 0; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp39_ = iptc_keywords; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp39__length1 = iptc_keywords_length1; +#line 9882 "FlickrPublishing.c" + { + gchar** keyword_collection = NULL; + gint keyword_collection_length1 = 0; + gint _keyword_collection_size_ = 0; + gint keyword_it = 0; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword_collection = _tmp39_; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword_collection_length1 = _tmp39__length1; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (keyword_it = 0; keyword_it < _tmp39__length1; keyword_it = keyword_it + 1) { +#line 9894 "FlickrPublishing.c" + gchar* _tmp40_ = NULL; + gchar* keyword = NULL; +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp40_ = g_strdup (keyword_collection[keyword_it]); +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword = _tmp40_; +#line 9901 "FlickrPublishing.c" + { + GeeSet* _tmp41_ = NULL; + const gchar* _tmp42_ = NULL; +#line 1331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp41_ = keyword_set; +#line 1331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp42_ = keyword; +#line 1331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_COLLECTION, GeeCollection), _tmp42_); +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (keyword); +#line 9913 "FlickrPublishing.c" + } + } + } + } +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp43_ = publishable_metadata; +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp45_ = _tmp44_ = gexiv2_metadata_get_tag_multiple (_tmp43_, "Xmp.dc.subject"); +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + xmp_keywords = _tmp45_; +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + xmp_keywords_length1 = _vala_array_length (_tmp44_); +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _xmp_keywords_size_ = xmp_keywords_length1; +#line 1334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp46_ = xmp_keywords; +#line 1334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp46__length1 = xmp_keywords_length1; +#line 1334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (_tmp46_ != NULL) { +#line 9934 "FlickrPublishing.c" + gchar** _tmp47_ = NULL; + gint _tmp47__length1 = 0; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp47_ = xmp_keywords; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp47__length1 = xmp_keywords_length1; +#line 9941 "FlickrPublishing.c" + { + gchar** keyword_collection = NULL; + gint keyword_collection_length1 = 0; + gint _keyword_collection_size_ = 0; + gint keyword_it = 0; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword_collection = _tmp47_; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword_collection_length1 = _tmp47__length1; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + for (keyword_it = 0; keyword_it < _tmp47__length1; keyword_it = keyword_it + 1) { +#line 9953 "FlickrPublishing.c" + gchar* _tmp48_ = NULL; + gchar* keyword = NULL; +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp48_ = g_strdup (keyword_collection[keyword_it]); +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + keyword = _tmp48_; +#line 9960 "FlickrPublishing.c" + { + GeeSet* _tmp49_ = NULL; + const gchar* _tmp50_ = NULL; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp49_ = keyword_set; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp50_ = keyword; +#line 1336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_COLLECTION, GeeCollection), _tmp50_); +#line 1335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (keyword); +#line 9972 "FlickrPublishing.c" + } + } + } + } +#line 1338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp51_ = keyword_set; +#line 1338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp53_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp52_); +#line 1338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + all_keywords = _tmp53_; +#line 1338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + all_keywords_length1 = _tmp52_; +#line 1338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _all_keywords_size_ = all_keywords_length1; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp54_ = all_keywords; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp54__length1 = all_keywords_length1; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _vala_array_add30 (&all_keywords, &all_keywords_length1, &_all_keywords_size_, NULL); +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp55_ = g_new0 (gchar*, 1 + 1); +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + no_keywords = _tmp55_; +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + no_keywords_length1 = 1; +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _no_keywords_size_ = no_keywords_length1; +#line 1350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp56_ = no_keywords; +#line 1350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp56__length1 = no_keywords_length1; +#line 1350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp56_[0]); +#line 1350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp56_[0] = NULL; +#line 1350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp57_ = _tmp56_[0]; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp58_ = publishable_metadata; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp59_ = all_keywords; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp59__length1 = all_keywords_length1; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_set_tag_multiple (_tmp58_, "Xmp.dc.subject", _tmp59_); +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp60_ = publishable_metadata; +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp61_ = no_keywords; +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp61__length1 = no_keywords_length1; +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_set_tag_multiple (_tmp60_, "Iptc.Application2.Keywords", _tmp61_); +#line 10027 "FlickrPublishing.c" + { + GExiv2Metadata* _tmp62_ = NULL; + SpitPublishingPublishable* _tmp63_ = NULL; + GFile* _tmp64_ = NULL; + GFile* _tmp65_ = NULL; + gchar* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp62_ = publishable_metadata; +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp63_ = publishable; +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp64_ = spit_publishing_publishable_get_serialized_file (_tmp63_); +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp65_ = _tmp64_; +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp66_ = g_file_get_path (_tmp65_); +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp67_ = _tmp66_; +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + gexiv2_metadata_save_file (_tmp62_, _tmp67_, &_inner_error_); +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp67_); +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp65_); +#line 1356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 10055 "FlickrPublishing.c" + goto __catch26_g_error; + } + } + goto __finally26; + __catch26_g_error: + { + GError* err = NULL; + SpitPublishingPublishable* _tmp68_ = NULL; + GFile* _tmp69_ = NULL; + GFile* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + err = _inner_error_; +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _inner_error_ = NULL; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp68_ = publishable; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp69_ = spit_publishing_publishable_get_serialized_file (_tmp68_); +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp70_ = _tmp69_; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp71_ = g_file_get_path (_tmp70_); +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp72_ = _tmp71_; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_warning ("FlickrPublishing.vala:1358: couldn't write metadata to file '%s' for u" \ +"pload preprocessing.", _tmp72_); +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_free0 (_tmp72_); +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp70_); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_error_free0 (err); +#line 10090 "FlickrPublishing.c" + } + __finally26: +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + no_keywords = (_vala_array_free (no_keywords, no_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + all_keywords = (_vala_array_free (all_keywords, all_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + xmp_keywords = (_vala_array_free (xmp_keywords, xmp_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iptc_keywords = (_vala_array_free (iptc_keywords, iptc_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (keyword_set); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _gexiv2_metadata_free0 (publishable_metadata); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_clear_error (&_inner_error_); +#line 1355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return; +#line 10113 "FlickrPublishing.c" + } +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + no_keywords = (_vala_array_free (no_keywords, no_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + all_keywords = (_vala_array_free (all_keywords, all_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + xmp_keywords = (_vala_array_free (xmp_keywords, xmp_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + iptc_keywords = (_vala_array_free (iptc_keywords, iptc_keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (keyword_set); +#line 10125 "FlickrPublishing.c" + } +#line 1297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _gexiv2_metadata_free0 (publishable_metadata); +#line 10129 "FlickrPublishing.c" +} + + +static PublishingRESTSupportTransaction* publishing_flickr_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { + PublishingFlickrUploader * self; + PublishingRESTSupportTransaction* result = NULL; + SpitPublishingPublishable* _tmp0_ = NULL; + SpitPublishingPublishable* _tmp1_ = NULL; + PublishingRESTSupportSession* _tmp2_ = NULL; + PublishingFlickrSession* _tmp3_ = NULL; + PublishingFlickrPublishingParameters* _tmp4_ = NULL; + SpitPublishingPublishable* _tmp5_ = NULL; + SpitPublishingPublishable* _tmp6_ = NULL; + PublishingFlickrUploadTransaction* _tmp7_ = NULL; + PublishingRESTSupportTransaction* _tmp8_ = NULL; +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploader); +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp0_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp1_ = _tmp0_; +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_uploader_preprocess_publishable (self, _tmp1_); +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp1_); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp2_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_FLICKR_TYPE_SESSION, PublishingFlickrSession); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp4_ = self->priv->parameters; +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp5_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp6_ = _tmp5_; +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp7_ = publishing_flickr_upload_transaction_new (_tmp3_, _tmp4_, _tmp6_); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _g_object_unref0 (_tmp6_); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp3_); +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + result = _tmp8_; +#line 1367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + return result; +#line 10179 "FlickrPublishing.c" +} + + +static void publishing_flickr_uploader_class_init (PublishingFlickrUploaderClass * klass) { +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + publishing_flickr_uploader_parent_class = g_type_class_peek_parent (klass); +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_flickr_uploader_finalize; +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingFlickrUploaderPrivate)); +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = publishing_flickr_uploader_real_create_transaction; +#line 10192 "FlickrPublishing.c" +} + + +static void publishing_flickr_uploader_instance_init (PublishingFlickrUploader * self) { +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self->priv = PUBLISHING_FLICKR_UPLOADER_GET_PRIVATE (self); +#line 10199 "FlickrPublishing.c" +} + + +static void publishing_flickr_uploader_finalize (PublishingRESTSupportBatchUploader* obj) { + PublishingFlickrUploader * self; +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_FLICKR_TYPE_UPLOADER, PublishingFlickrUploader); +#line 1286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + _publishing_flickr_publishing_parameters_unref0 (self->priv->parameters); +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/FlickrPublishing.vala" + PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_flickr_uploader_parent_class)->finalize (obj); +#line 10211 "FlickrPublishing.c" +} + + +GType publishing_flickr_uploader_get_type (void) { + static volatile gsize publishing_flickr_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_flickr_uploader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingFlickrUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_flickr_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingFlickrUploader), 0, (GInstanceInitFunc) publishing_flickr_uploader_instance_init, NULL }; + GType publishing_flickr_uploader_type_id; + publishing_flickr_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingFlickrUploader", &g_define_type_info, 0); + g_once_init_leave (&publishing_flickr_uploader_type_id__volatile, publishing_flickr_uploader_type_id); + } + return publishing_flickr_uploader_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + +static gint _vala_array_length (gpointer array) { + int length; + length = 0; + if (array) { + while (((gpointer*) array)[length]) { + length++; + } + } + return length; +} + + + diff --git a/plugins/shotwell-publishing/FlickrPublishing.vala b/plugins/shotwell-publishing/FlickrPublishing.vala index e6c1104..415e36a 100644 --- a/plugins/shotwell-publishing/FlickrPublishing.vala +++ b/plugins/shotwell-publishing/FlickrPublishing.vala @@ -4,8 +4,6 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ -extern string hmac_sha1(string key, string message); - public class FlickrService : Object, Spit.Pluggable, Spit.Publishing.Service { private const string ICON_FILENAME = "flickr.png"; @@ -13,7 +11,8 @@ public class FlickrService : Object, Spit.Pluggable, Spit.Publishing.Service { public FlickrService(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = Resources.load_from_resource + (Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { @@ -436,7 +435,8 @@ public class FlickrPublisher : Spit.Publishing.Publisher, GLib.Object { Gtk.Builder builder = new Gtk.Builder(); try { - builder.add_from_file(host.get_module_file().get_parent().get_child("flickr_pin_entry_pane.glade").get_path()); + builder.add_from_resource (Resources.RESOURCE_PATH + "/" + + "flickr_pin_entry_pane.ui"); } catch (Error e) { warning("Could not parse UI file! Error: %s.", e.message); host.post_error( @@ -585,9 +585,8 @@ public class FlickrPublisher : Spit.Publishing.Publisher, GLib.Object { try { // the trailing get_path() is required, since add_from_file can't cope // with File objects directly and expects a pathname instead. - builder.add_from_file( - host.get_module_file().get_parent(). - get_child("flickr_publishing_options_pane.glade").get_path()); + builder.add_from_resource(Resources.RESOURCE_PATH + "/" + + "flickr_publishing_options_pane.ui"); } catch (Error e) { warning("Could not parse UI file! Error: %s.", e.message); host.post_error( @@ -1029,7 +1028,7 @@ internal class Session : Publishing.RESTSupport.Session { debug("signing key = '%s'", signing_key); // compute the signature - string signature = hmac_sha1(signing_key, signature_base_string); + string signature = RESTSupport.hmac_sha1(signing_key, signature_base_string); signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); debug("signature = '%s'", signature); diff --git a/plugins/shotwell-publishing/Makefile b/plugins/shotwell-publishing/Makefile deleted file mode 100644 index 607bc6b..0000000 --- a/plugins/shotwell-publishing/Makefile +++ /dev/null @@ -1,37 +0,0 @@ - -PLUGIN := shotwell-publishing - -PLUGIN_PKGS := \ - gtk+-3.0 \ - libsoup-2.4 \ - libxml-2.0 \ - webkit2gtk-4.0 \ - gexiv2 \ - rest-0.7 \ - gee-0.8 \ - json-glib-1.0 - -SRC_FILES := \ - shotwell-publishing.vala \ - FacebookPublishing.vala \ - PicasaPublishing.vala \ - FlickrPublishing.vala \ - YouTubePublishing.vala \ - PiwigoPublishing.vala - -RC_FILES := \ - facebook.png \ - facebook_publishing_options_pane.glade \ - flickr.png \ - flickr_publishing_options_pane.glade \ - flickr_pin_entry_pane.glade \ - picasa.png \ - picasa_publishing_options_pane.glade \ - piwigo.png \ - piwigo_authentication_pane.glade \ - piwigo_publishing_options_pane.glade \ - youtube.png \ - youtube_publishing_options_pane.glade - -include ../Makefile.plugin.mk - diff --git a/plugins/shotwell-publishing/PicasaPublishing.c b/plugins/shotwell-publishing/PicasaPublishing.c new file mode 100644 index 0000000..cda058e --- /dev/null +++ b/plugins/shotwell-publishing/PicasaPublishing.c @@ -0,0 +1,7773 @@ +/* PicasaPublishing.c generated by valac 0.32.1, the Vala compiler + * generated from PicasaPublishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include "shotwell-plugin-common.h" +#include <glib/gi18n-lib.h> +#include <libxml/tree.h> +#include <float.h> +#include <math.h> +#include <gtk/gtk.h> +#include <libsoup/soup.h> +#include <gobject/gvaluecollector.h> + + +#define TYPE_PICASA_SERVICE (picasa_service_get_type ()) +#define PICASA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PICASA_SERVICE, PicasaService)) +#define PICASA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PICASA_SERVICE, PicasaServiceClass)) +#define IS_PICASA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PICASA_SERVICE)) +#define IS_PICASA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PICASA_SERVICE)) +#define PICASA_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PICASA_SERVICE, PicasaServiceClass)) + +typedef struct _PicasaService PicasaService; +typedef struct _PicasaServiceClass PicasaServiceClass; +typedef struct _PicasaServicePrivate PicasaServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER (publishing_picasa_picasa_publisher_get_type ()) +#define PUBLISHING_PICASA_PICASA_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher)) +#define PUBLISHING_PICASA_PICASA_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisherClass)) +#define PUBLISHING_PICASA_IS_PICASA_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER)) +#define PUBLISHING_PICASA_IS_PICASA_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER)) +#define PUBLISHING_PICASA_PICASA_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisherClass)) + +typedef struct _PublishingPicasaPicasaPublisher PublishingPicasaPicasaPublisher; +typedef struct _PublishingPicasaPicasaPublisherClass PublishingPicasaPicasaPublisherClass; +typedef struct _PublishingPicasaPicasaPublisherPrivate PublishingPicasaPicasaPublisherPrivate; + +#define PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS (publishing_picasa_publishing_parameters_get_type ()) +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS, PublishingPicasaPublishingParameters)) +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS, PublishingPicasaPublishingParametersClass)) +#define PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS, PublishingPicasaPublishingParametersClass)) + +typedef struct _PublishingPicasaPublishingParameters PublishingPicasaPublishingParameters; +typedef struct _PublishingPicasaPublishingParametersClass PublishingPicasaPublishingParametersClass; +#define _publishing_picasa_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_picasa_publishing_parameters_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define PUBLISHING_PICASA_TYPE_ALBUM (publishing_picasa_album_get_type ()) +#define PUBLISHING_PICASA_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_ALBUM, PublishingPicasaAlbum)) +#define PUBLISHING_PICASA_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_ALBUM, PublishingPicasaAlbumClass)) +#define PUBLISHING_PICASA_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_ALBUM)) +#define PUBLISHING_PICASA_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_ALBUM)) +#define PUBLISHING_PICASA_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_ALBUM, PublishingPicasaAlbumClass)) + +typedef struct _PublishingPicasaAlbum PublishingPicasaAlbum; +typedef struct _PublishingPicasaAlbumClass PublishingPicasaAlbumClass; +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) + +#define PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION (publishing_picasa_album_directory_transaction_get_type ()) +#define PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION, PublishingPicasaAlbumDirectoryTransaction)) +#define PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION, PublishingPicasaAlbumDirectoryTransactionClass)) +#define PUBLISHING_PICASA_IS_ALBUM_DIRECTORY_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION)) +#define PUBLISHING_PICASA_IS_ALBUM_DIRECTORY_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION)) +#define PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION, PublishingPicasaAlbumDirectoryTransactionClass)) + +typedef struct _PublishingPicasaAlbumDirectoryTransaction PublishingPicasaAlbumDirectoryTransaction; +typedef struct _PublishingPicasaAlbumDirectoryTransactionClass PublishingPicasaAlbumDirectoryTransactionClass; + +#define PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION (publishing_picasa_album_creation_transaction_get_type ()) +#define PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION, PublishingPicasaAlbumCreationTransaction)) +#define PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION, PublishingPicasaAlbumCreationTransactionClass)) +#define PUBLISHING_PICASA_IS_ALBUM_CREATION_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION)) +#define PUBLISHING_PICASA_IS_ALBUM_CREATION_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION)) +#define PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION, PublishingPicasaAlbumCreationTransactionClass)) + +typedef struct _PublishingPicasaAlbumCreationTransaction PublishingPicasaAlbumCreationTransaction; +typedef struct _PublishingPicasaAlbumCreationTransactionClass PublishingPicasaAlbumCreationTransactionClass; +#define _publishing_rest_support_xml_document_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_xml_document_unref (var), NULL))) +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +typedef struct _PublishingPicasaAlbumPrivate PublishingPicasaAlbumPrivate; + +#define PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE (publishing_picasa_publishing_options_pane_get_type ()) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPaneClass)) +#define PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPaneClass)) + +typedef struct _PublishingPicasaPublishingOptionsPane PublishingPicasaPublishingOptionsPane; +typedef struct _PublishingPicasaPublishingOptionsPaneClass PublishingPicasaPublishingOptionsPaneClass; + +#define PUBLISHING_PICASA_TYPE_UPLOADER (publishing_picasa_uploader_get_type ()) +#define PUBLISHING_PICASA_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploader)) +#define PUBLISHING_PICASA_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploaderClass)) +#define PUBLISHING_PICASA_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_UPLOADER)) +#define PUBLISHING_PICASA_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_UPLOADER)) +#define PUBLISHING_PICASA_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploaderClass)) + +typedef struct _PublishingPicasaUploader PublishingPicasaUploader; +typedef struct _PublishingPicasaUploaderClass PublishingPicasaUploaderClass; +#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) +typedef struct _PublishingPicasaParamSpecAlbum PublishingPicasaParamSpecAlbum; +typedef struct _PublishingPicasaAlbumDirectoryTransactionPrivate PublishingPicasaAlbumDirectoryTransactionPrivate; +typedef struct _PublishingPicasaAlbumCreationTransactionPrivate PublishingPicasaAlbumCreationTransactionPrivate; + +#define PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION (publishing_picasa_upload_transaction_get_type ()) +#define PUBLISHING_PICASA_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransaction)) +#define PUBLISHING_PICASA_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransactionClass)) +#define PUBLISHING_PICASA_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_PICASA_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_PICASA_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransactionClass)) + +typedef struct _PublishingPicasaUploadTransaction PublishingPicasaUploadTransaction; +typedef struct _PublishingPicasaUploadTransactionClass PublishingPicasaUploadTransactionClass; +typedef struct _PublishingPicasaUploadTransactionPrivate PublishingPicasaUploadTransactionPrivate; +#define _g_mapped_file_unref0(var) ((var == NULL) ? NULL : (var = (g_mapped_file_unref (var), NULL))) +#define __vala_SoupBuffer_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupBuffer_free (var), NULL))) +#define __vala_SoupMultipart_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupMultipart_free (var), NULL))) +typedef struct _PublishingPicasaPublishingOptionsPanePrivate PublishingPicasaPublishingOptionsPanePrivate; + +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION (publishing_picasa_publishing_options_pane_size_description_get_type ()) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_SIZE_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION, PublishingPicasaPublishingOptionsPaneSizeDescription)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_SIZE_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION, PublishingPicasaPublishingOptionsPaneSizeDescriptionClass)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_IS_SIZE_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_IS_SIZE_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)) +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_SIZE_DESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION, PublishingPicasaPublishingOptionsPaneSizeDescriptionClass)) + +typedef struct _PublishingPicasaPublishingOptionsPaneSizeDescription PublishingPicasaPublishingOptionsPaneSizeDescription; +typedef struct _PublishingPicasaPublishingOptionsPaneSizeDescriptionClass PublishingPicasaPublishingOptionsPaneSizeDescriptionClass; +#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) +typedef struct _PublishingPicasaPublishingOptionsPaneSizeDescriptionPrivate PublishingPicasaPublishingOptionsPaneSizeDescriptionPrivate; +#define _publishing_picasa_publishing_options_pane_size_description_unref0(var) ((var == NULL) ? NULL : (var = (publishing_picasa_publishing_options_pane_size_description_unref (var), NULL))) +typedef struct _PublishingPicasaPublishingOptionsPaneParamSpecSizeDescription PublishingPicasaPublishingOptionsPaneParamSpecSizeDescription; +typedef struct _PublishingPicasaPublishingParametersPrivate PublishingPicasaPublishingParametersPrivate; +#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL))) +typedef struct _PublishingPicasaParamSpecPublishingParameters PublishingPicasaParamSpecPublishingParameters; +typedef struct _PublishingPicasaUploaderPrivate PublishingPicasaUploaderPrivate; +#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 _PicasaService { + GObject parent_instance; + PicasaServicePrivate * priv; +}; + +struct _PicasaServiceClass { + GObjectClass parent_class; +}; + +struct _PublishingPicasaPicasaPublisher { + PublishingRESTSupportGooglePublisher parent_instance; + PublishingPicasaPicasaPublisherPrivate * priv; +}; + +struct _PublishingPicasaPicasaPublisherClass { + PublishingRESTSupportGooglePublisherClass parent_class; +}; + +struct _PublishingPicasaPicasaPublisherPrivate { + gboolean running; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; + PublishingPicasaPublishingParameters* publishing_parameters; + gchar* refresh_token; +}; + +struct _PublishingPicasaAlbum { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPicasaAlbumPrivate * priv; + gchar* name; + gchar* url; +}; + +struct _PublishingPicasaAlbumClass { + GTypeClass parent_class; + void (*finalize) (PublishingPicasaAlbum *self); +}; + +struct _PublishingPicasaParamSpecAlbum { + GParamSpec parent_instance; +}; + +struct _PublishingPicasaAlbumDirectoryTransaction { + PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance; + PublishingPicasaAlbumDirectoryTransactionPrivate * priv; +}; + +struct _PublishingPicasaAlbumDirectoryTransactionClass { + PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass parent_class; +}; + +struct _PublishingPicasaAlbumCreationTransaction { + PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance; + PublishingPicasaAlbumCreationTransactionPrivate * priv; +}; + +struct _PublishingPicasaAlbumCreationTransactionClass { + PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass parent_class; +}; + +struct _PublishingPicasaUploadTransaction { + PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance; + PublishingPicasaUploadTransactionPrivate * priv; +}; + +struct _PublishingPicasaUploadTransactionClass { + PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass parent_class; +}; + +struct _PublishingPicasaUploadTransactionPrivate { + PublishingPicasaPublishingParameters* parameters; + PublishingRESTSupportGoogleSession* session; + gchar* mime_type; + SpitPublishingPublishable* publishable; + GMappedFile* mapped_file; +}; + +struct _PublishingPicasaPublishingOptionsPane { + GObject parent_instance; + PublishingPicasaPublishingOptionsPanePrivate * priv; +}; + +struct _PublishingPicasaPublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingPicasaPublishingOptionsPanePrivate { + GtkBuilder* builder; + GtkBox* pane_widget; + GtkLabel* login_identity_label; + GtkLabel* publish_to_label; + GtkRadioButton* use_existing_radio; + GtkComboBoxText* existing_albums_combo; + GtkRadioButton* create_new_radio; + GtkEntry* new_album_entry; + GtkCheckButton* public_check; + GtkComboBoxText* size_combo; + GtkCheckButton* strip_metadata_check; + GtkButton* publish_button; + GtkButton* logout_button; + PublishingPicasaPublishingOptionsPaneSizeDescription** size_descriptions; + gint size_descriptions_length1; + gint _size_descriptions_size_; + PublishingPicasaPublishingParameters* parameters; +}; + +struct _PublishingPicasaPublishingOptionsPaneSizeDescription { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPicasaPublishingOptionsPaneSizeDescriptionPrivate * priv; + gchar* name; + gint major_axis_pixels; +}; + +struct _PublishingPicasaPublishingOptionsPaneSizeDescriptionClass { + GTypeClass parent_class; + void (*finalize) (PublishingPicasaPublishingOptionsPaneSizeDescription *self); +}; + +struct _PublishingPicasaPublishingOptionsPaneParamSpecSizeDescription { + GParamSpec parent_instance; +}; + +struct _PublishingPicasaPublishingParameters { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPicasaPublishingParametersPrivate * priv; +}; + +struct _PublishingPicasaPublishingParametersClass { + GTypeClass parent_class; + void (*finalize) (PublishingPicasaPublishingParameters *self); +}; + +struct _PublishingPicasaPublishingParametersPrivate { + gchar* target_album_name; + gchar* target_album_url; + gboolean album_public; + gboolean strip_metadata; + gint major_axis_size_pixels; + gint major_axis_size_selection_id; + gchar* user_name; + PublishingPicasaAlbum** albums; + gint albums_length1; + gint _albums_size_; + SpitPublishingPublisherMediaType media_type; + gboolean to_new_album; +}; + +struct _PublishingPicasaParamSpecPublishingParameters { + GParamSpec parent_instance; +}; + +struct _PublishingPicasaUploader { + PublishingRESTSupportBatchUploader parent_instance; + PublishingPicasaUploaderPrivate * priv; +}; + +struct _PublishingPicasaUploaderClass { + PublishingRESTSupportBatchUploaderClass parent_class; +}; + +struct _PublishingPicasaUploaderPrivate { + PublishingPicasaPublishingParameters* parameters; +}; + + +static gpointer picasa_service_parent_class = NULL; +static GdkPixbuf** picasa_service_icon_pixbuf_set; +static gint picasa_service_icon_pixbuf_set_length1; +static GdkPixbuf** picasa_service_icon_pixbuf_set = NULL; +static gint picasa_service_icon_pixbuf_set_length1 = 0; +static gint _picasa_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* picasa_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface* picasa_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_picasa_picasa_publisher_parent_class = NULL; +static gpointer publishing_picasa_album_parent_class = NULL; +static gpointer publishing_picasa_album_directory_transaction_parent_class = NULL; +static gpointer publishing_picasa_album_creation_transaction_parent_class = NULL; +static gpointer publishing_picasa_upload_transaction_parent_class = NULL; +static gpointer publishing_picasa_publishing_options_pane_parent_class = NULL; +static gpointer publishing_picasa_publishing_options_pane_size_description_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_picasa_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_picasa_publishing_parameters_parent_class = NULL; +static gpointer publishing_picasa_uploader_parent_class = NULL; + +GType picasa_service_get_type (void) G_GNUC_CONST; +enum { + PICASA_SERVICE_DUMMY_PROPERTY +}; +#define PICASA_SERVICE_ICON_FILENAME "picasa.png" +PicasaService* picasa_service_new (GFile* resource_directory); +PicasaService* picasa_service_construct (GType object_type, GFile* resource_directory); +static gint picasa_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* picasa_service_real_get_id (SpitPluggable* base); +static const gchar* picasa_service_real_get_pluggable_name (SpitPluggable* base); +static void picasa_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup4 (GdkPixbuf** self, int length); +static SpitPublishingPublisher* picasa_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingPicasaPicasaPublisher* publishing_picasa_picasa_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingPicasaPicasaPublisher* publishing_picasa_picasa_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_picasa_picasa_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType picasa_service_real_get_supported_media (SpitPublishingService* base); +static void picasa_service_real_activation (SpitPluggable* base, gboolean enabled); +static void picasa_service_finalize (GObject* obj); +#define PUBLISHING_PICASA_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into Picasa Web Albums.\n" \ +"\n" \ +"Click Login to log into Picasa Web Albums in your Web browser. You wil" \ +"l have to authorize Shotwell Connect to link to your Picasa Web Albums" \ +" account.") +#define PUBLISHING_PICASA_DEFAULT_ALBUM_NAME _ ("Shotwell Connect") +gpointer publishing_picasa_publishing_parameters_ref (gpointer instance); +void publishing_picasa_publishing_parameters_unref (gpointer instance); +GParamSpec* publishing_picasa_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_picasa_value_set_publishing_parameters (GValue* value, gpointer v_object); +void publishing_picasa_value_take_publishing_parameters (GValue* value, gpointer v_object); +gpointer publishing_picasa_value_get_publishing_parameters (const GValue* value); +GType publishing_picasa_publishing_parameters_get_type (void) G_GNUC_CONST; +#define PUBLISHING_PICASA_PICASA_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisherPrivate)) +enum { + PUBLISHING_PICASA_PICASA_PUBLISHER_DUMMY_PROPERTY +}; +PublishingPicasaPublishingParameters* publishing_picasa_publishing_parameters_new (void); +PublishingPicasaPublishingParameters* publishing_picasa_publishing_parameters_construct (GType object_type); +static void publishing_picasa_picasa_publisher_load_parameters_from_configuration_system (PublishingPicasaPicasaPublisher* self, PublishingPicasaPublishingParameters* parameters); +void publishing_picasa_publishing_parameters_set_media_type (PublishingPicasaPublishingParameters* self, SpitPublishingPublisherMediaType media_type); +gpointer publishing_picasa_album_ref (gpointer instance); +void publishing_picasa_album_unref (gpointer instance); +GParamSpec* publishing_picasa_param_spec_album (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_picasa_value_set_album (GValue* value, gpointer v_object); +void publishing_picasa_value_take_album (GValue* value, gpointer v_object); +gpointer publishing_picasa_value_get_album (const GValue* value); +GType publishing_picasa_album_get_type (void) G_GNUC_CONST; +static PublishingPicasaAlbum** publishing_picasa_picasa_publisher_extract_albums_helper (PublishingPicasaPicasaPublisher* self, xmlNode* document_root, int* result_length1, GError** error); +PublishingPicasaAlbum* publishing_picasa_album_new (const gchar* name, const gchar* url); +PublishingPicasaAlbum* publishing_picasa_album_construct (GType object_type, const gchar* name, const gchar* url); +static void _vala_array_add12 (PublishingPicasaAlbum*** array, int* length, int* size, PublishingPicasaAlbum* value); +void publishing_picasa_publishing_parameters_set_major_axis_size_selection_id (PublishingPicasaPublishingParameters* self, gint selection_id); +void publishing_picasa_publishing_parameters_set_strip_metadata (PublishingPicasaPublishingParameters* self, gboolean strip_metadata); +void publishing_picasa_publishing_parameters_set_target_album_name (PublishingPicasaPublishingParameters* self, const gchar* target_album_name); +static void publishing_picasa_picasa_publisher_save_parameters_to_configuration_system (PublishingPicasaPicasaPublisher* self, PublishingPicasaPublishingParameters* parameters); +gint publishing_picasa_publishing_parameters_get_major_axis_size_selection_id (PublishingPicasaPublishingParameters* self); +gboolean publishing_picasa_publishing_parameters_get_strip_metadata (PublishingPicasaPublishingParameters* self); +gchar* publishing_picasa_publishing_parameters_get_target_album_name (PublishingPicasaPublishingParameters* self); +static void publishing_picasa_picasa_publisher_on_service_welcome_login (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* base); +void publishing_picasa_publishing_parameters_set_user_name (PublishingPicasaPublishingParameters* self, const gchar* user_name); +static void publishing_picasa_picasa_publisher_do_fetch_account_information (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_on_initial_album_fetch_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_picasa_picasa_publisher_on_initial_album_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_picasa_picasa_publisher_on_initial_album_fetch_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_picasa_picasa_publisher_on_initial_album_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +GType publishing_picasa_album_directory_transaction_get_type (void) G_GNUC_CONST; +static void publishing_picasa_picasa_publisher_do_parse_and_display_account_information (PublishingPicasaPicasaPublisher* self, PublishingPicasaAlbumDirectoryTransaction* transaction); +static void publishing_picasa_picasa_publisher_on_publishing_options_logout (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_on_publishing_options_publish (PublishingPicasaPicasaPublisher* self); +gboolean publishing_picasa_publishing_parameters_is_to_new_album (PublishingPicasaPublishingParameters* self); +static void publishing_picasa_picasa_publisher_do_create_album (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_do_upload (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_on_album_creation_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_picasa_picasa_publisher_on_album_creation_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_picasa_picasa_publisher_on_album_creation_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_picasa_picasa_publisher_on_album_creation_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +GType publishing_picasa_album_creation_transaction_get_type (void) G_GNUC_CONST; +gchar* publishing_picasa_album_directory_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc); +static gchar* _publishing_picasa_album_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); +void publishing_picasa_publishing_parameters_set_target_album_entry_url (PublishingPicasaPublishingParameters* self, const gchar* target_album_url); +static void publishing_picasa_picasa_publisher_on_upload_status_updated (PublishingPicasaPicasaPublisher* self, gint file_number, gdouble completed_fraction); +static void publishing_picasa_picasa_publisher_on_upload_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); +static void _publishing_picasa_picasa_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_picasa_picasa_publisher_on_upload_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); +static void _publishing_picasa_picasa_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); +static void publishing_picasa_picasa_publisher_do_show_success_pane (PublishingPicasaPicasaPublisher* self); +static void publishing_picasa_picasa_publisher_do_show_service_welcome_pane (PublishingPicasaPicasaPublisher* self); +static void _publishing_picasa_picasa_publisher_on_service_welcome_login_spit_publishing_login_callback (gpointer self); +PublishingPicasaAlbumDirectoryTransaction* publishing_picasa_album_directory_transaction_new (PublishingRESTSupportGoogleSession* session); +PublishingPicasaAlbumDirectoryTransaction* publishing_picasa_album_directory_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session); +void publishing_picasa_publishing_parameters_set_albums (PublishingPicasaPublishingParameters* self, PublishingPicasaAlbum** albums, int albums_length1); +static void publishing_picasa_picasa_publisher_do_show_publishing_options_pane (PublishingPicasaPicasaPublisher* self); +GType publishing_picasa_publishing_options_pane_get_type (void) G_GNUC_CONST; +PublishingPicasaPublishingOptionsPane* publishing_picasa_publishing_options_pane_new (GtkBuilder* builder, PublishingPicasaPublishingParameters* parameters); +PublishingPicasaPublishingOptionsPane* publishing_picasa_publishing_options_pane_construct (GType object_type, GtkBuilder* builder, PublishingPicasaPublishingParameters* parameters); +static void _publishing_picasa_picasa_publisher_on_publishing_options_publish_publishing_picasa_publishing_options_pane_publish (PublishingPicasaPublishingOptionsPane* _sender, gpointer self); +static void _publishing_picasa_picasa_publisher_on_publishing_options_logout_publishing_picasa_publishing_options_pane_logout (PublishingPicasaPublishingOptionsPane* _sender, gpointer self); +PublishingPicasaAlbumCreationTransaction* publishing_picasa_album_creation_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters); +PublishingPicasaAlbumCreationTransaction* publishing_picasa_album_creation_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters); +gint publishing_picasa_publishing_parameters_get_major_axis_size_pixels (PublishingPicasaPublishingParameters* self); +GType publishing_picasa_uploader_get_type (void) G_GNUC_CONST; +PublishingPicasaUploader* publishing_picasa_uploader_new (PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPicasaPublishingParameters* parameters); +PublishingPicasaUploader* publishing_picasa_uploader_construct (GType object_type, PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPicasaPublishingParameters* parameters); +static void _publishing_picasa_picasa_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +static void publishing_picasa_picasa_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* base); +static gboolean publishing_picasa_picasa_publisher_real_is_running (PublishingRESTSupportGooglePublisher* base); +static void publishing_picasa_picasa_publisher_real_start (PublishingRESTSupportGooglePublisher* base); +static void publishing_picasa_picasa_publisher_real_stop (PublishingRESTSupportGooglePublisher* base); +static void publishing_picasa_picasa_publisher_finalize (GObject* obj); +enum { + PUBLISHING_PICASA_ALBUM_DUMMY_PROPERTY +}; +static void publishing_picasa_album_finalize (PublishingPicasaAlbum* obj); +enum { + PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION_ENDPOINT_URL "http://picasaweb.google.com/data/feed/api/user/" "default" +enum { + PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_ENDPOINT_URL "http://picasaweb.google.com/data/feed/api/user/" "default" +#define PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_ALBUM_ENTRY_TEMPLATE "<?xml version='1.0' encoding='utf-8'?><entry xmlns='http://www.w3.org/" \ +"2005/Atom' xmlns:gphoto='http://schemas.google.com/photos/2007'><title" \ +" type='text'>%s</title><gphoto:access>%s</gphoto:access><category sche" \ +"me='http://schemas.google.com/g/2005#kind' term='http://schemas.google" \ +".com/photos/2007#album'></category></entry>" +gboolean publishing_picasa_publishing_parameters_is_new_album_public (PublishingPicasaPublishingParameters* self); +GType publishing_picasa_upload_transaction_get_type (void) G_GNUC_CONST; +#define PUBLISHING_PICASA_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransactionPrivate)) +enum { + PUBLISHING_PICASA_UPLOAD_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_PICASA_UPLOAD_TRANSACTION_METADATA_TEMPLATE "<?xml version=\"1.0\" ?><atom:entry xmlns:atom='http://www.w3.org/2005" \ +"/Atom' xmlns:mrss='http://search.yahoo.com/mrss/'> <atom:title>%s</ato" \ +"m:title> %s <atom:category scheme='http://schemas.google.com/g/2005#ki" \ +"nd' term='http://schemas.google.com/photos/2007#photo'/> %s </atom:ent" \ +"ry>" +PublishingPicasaUploadTransaction* publishing_picasa_upload_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters, SpitPublishingPublishable* publishable); +PublishingPicasaUploadTransaction* publishing_picasa_upload_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters, SpitPublishingPublishable* publishable); +gchar* publishing_picasa_publishing_parameters_get_target_album_feed_url (PublishingPicasaPublishingParameters* self); +static void publishing_picasa_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); +static void _vala_SoupBuffer_free (SoupBuffer* self); +static void _vala_SoupMultipart_free (SoupMultipart* self); +static void publishing_picasa_upload_transaction_finalize (PublishingRESTSupportTransaction* obj); +static gpointer publishing_picasa_publishing_options_pane_size_description_ref (gpointer instance); +static void publishing_picasa_publishing_options_pane_size_description_unref (gpointer instance); +static GParamSpec* publishing_picasa_publishing_options_pane_param_spec_size_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_picasa_publishing_options_pane_value_set_size_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_picasa_publishing_options_pane_value_take_size_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_picasa_publishing_options_pane_value_get_size_description (const GValue* value) G_GNUC_UNUSED; +static GType publishing_picasa_publishing_options_pane_size_description_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPanePrivate)) +enum { + PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_DEFAULT_SIZE_CONFIG_KEY "default_size" +#define PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_LAST_ALBUM_CONFIG_KEY "last_album" +static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_publishing_options_pane_create_size_descriptions (PublishingPicasaPublishingOptionsPane* self, int* result_length1); +gchar* publishing_picasa_publishing_parameters_get_user_name (PublishingPicasaPublishingParameters* self); +SpitPublishingPublisherMediaType publishing_picasa_publishing_parameters_get_media_type (PublishingPicasaPublishingParameters* self); +static void publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked (PublishingPicasaPublishingOptionsPane* self); +static void _publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_picasa_publishing_options_pane_on_create_new_radio_clicked (PublishingPicasaPublishingOptionsPane* self); +static void _publishing_picasa_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_picasa_publishing_options_pane_on_new_album_entry_changed (PublishingPicasaPublishingOptionsPane* self); +static void _publishing_picasa_publishing_options_pane_on_new_album_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_picasa_publishing_options_pane_on_logout_clicked (PublishingPicasaPublishingOptionsPane* self); +static void _publishing_picasa_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_picasa_publishing_options_pane_on_publish_clicked (PublishingPicasaPublishingOptionsPane* self); +static void _publishing_picasa_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +void publishing_picasa_publishing_parameters_set_major_axis_size_pixels (PublishingPicasaPublishingParameters* self, gint pixels); +PublishingPicasaAlbum** publishing_picasa_publishing_parameters_get_albums (PublishingPicasaPublishingParameters* self, int* result_length1); +void publishing_picasa_publishing_parameters_set_is_to_new_album (PublishingPicasaPublishingParameters* self, gboolean to_new_album); +void publishing_picasa_publishing_parameters_set_is_new_album_public (PublishingPicasaPublishingParameters* self, gboolean album_public); +static void publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (PublishingPicasaPublishingOptionsPane* self); +static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_new (const gchar* name, gint major_axis_pixels); +static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_construct (GType object_type, const gchar* name, gint major_axis_pixels); +static void _vala_array_add13 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +static void _vala_array_add14 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE -1 +static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value); +void publishing_picasa_publishing_options_pane_installed (PublishingPicasaPublishingOptionsPane* self); +static GtkWidget* publishing_picasa_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_picasa_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_picasa_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_picasa_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +enum { + PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_SIZE_DESCRIPTION_DUMMY_PROPERTY +}; +static void publishing_picasa_publishing_options_pane_size_description_finalize (PublishingPicasaPublishingOptionsPaneSizeDescription* obj); +static void publishing_picasa_publishing_options_pane_finalize (GObject* obj); +#define PUBLISHING_PICASA_PUBLISHING_PARAMETERS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS, PublishingPicasaPublishingParametersPrivate)) +enum { + PUBLISHING_PICASA_PUBLISHING_PARAMETERS_DUMMY_PROPERTY +}; +gchar* publishing_picasa_publishing_parameters_get_target_album_entry_url (PublishingPicasaPublishingParameters* self); +static PublishingPicasaAlbum** _vala_array_dup5 (PublishingPicasaAlbum** self, int length); +static PublishingPicasaAlbum** _vala_array_dup6 (PublishingPicasaAlbum** self, int length); +static void publishing_picasa_publishing_parameters_finalize (PublishingPicasaPublishingParameters* obj); +#define PUBLISHING_PICASA_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploaderPrivate)) +enum { + PUBLISHING_PICASA_UPLOADER_DUMMY_PROPERTY +}; +static PublishingRESTSupportTransaction* publishing_picasa_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); +static void publishing_picasa_uploader_finalize (PublishingRESTSupportBatchUploader* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static gint _vala_array_length (gpointer array); + + +PicasaService* picasa_service_construct (GType object_type, GFile* resource_directory) { + PicasaService * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PicasaService*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = picasa_service_icon_pixbuf_set; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0__length1 = picasa_service_icon_pixbuf_set_length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp0_ == NULL) { +#line 562 "PicasaPublishing.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" PICASA_SERVICE_ICON_FILENAME, &_tmp1_); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_icon_pixbuf_set = (_vala_array_free (picasa_service_icon_pixbuf_set, picasa_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_icon_pixbuf_set = _tmp2_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_icon_pixbuf_set_length1 = _tmp1_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _picasa_service_icon_pixbuf_set_size_ = picasa_service_icon_pixbuf_set_length1; +#line 575 "PicasaPublishing.c" + } +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 579 "PicasaPublishing.c" +} + + +PicasaService* picasa_service_new (GFile* resource_directory) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return picasa_service_construct (TYPE_PICASA_SERVICE, resource_directory); +#line 586 "PicasaPublishing.c" +} + + +static gint picasa_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + PicasaService * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = min_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = max_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp2_; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 608 "PicasaPublishing.c" +} + + +static const gchar* picasa_service_real_get_id (SpitPluggable* base) { + PicasaService * self; + const gchar* result = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = "org.yorba.shotwell.publishing.picasa"; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 621 "PicasaPublishing.c" +} + + +static const gchar* picasa_service_real_get_pluggable_name (SpitPluggable* base) { + PicasaService * self; + const gchar* result = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = "Picasa Web Albums"; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 634 "PicasaPublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 641 "PicasaPublishing.c" +} + + +static GdkPixbuf** _vala_array_dup4 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + for (i = 0; i < length; i++) { +#line 652 "PicasaPublishing.c" + GdkPixbuf* _tmp0_ = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result[i] = _tmp0_; +#line 658 "PicasaPublishing.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 662 "PicasaPublishing.c" +} + + +static void picasa_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + PicasaService * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (info != NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = g_strdup ("Lucas Beeler"); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).authors); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).authors = _tmp0_; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = _ ("Copyright 2016 Software Freedom Conservancy Inc."); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).copyright); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).copyright = _tmp2_; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).translators); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).translators = _tmp3_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = g_strdup (_VERSION); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).version); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).version = _tmp4_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).website_name); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).website_name = _tmp5_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).website_url); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).website_url = _tmp6_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 ((*info).license); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).license = _tmp7_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = picasa_service_icon_pixbuf_set; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8__length1 = picasa_service_icon_pixbuf_set_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup4 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).icons = _tmp9_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*info).icons_length1 = _tmp9__length1; +#line 744 "PicasaPublishing.c" +} + + +static SpitPublishingPublisher* picasa_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + PicasaService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingPicasaPicasaPublisher* _tmp1_ = NULL; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = host; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_picasa_picasa_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 765 "PicasaPublishing.c" +} + + +static SpitPublishingPublisherMediaType picasa_service_real_get_supported_media (SpitPublishingService* base) { + PicasaService * self; + SpitPublishingPublisherMediaType result = 0; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO | SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 778 "PicasaPublishing.c" +} + + +static void picasa_service_real_activation (SpitPluggable* base, gboolean enabled) { + PicasaService * self; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PICASA_SERVICE, PicasaService); +#line 786 "PicasaPublishing.c" +} + + +static void picasa_service_class_init (PicasaServiceClass * klass) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = picasa_service_finalize; +#line 795 "PicasaPublishing.c" +} + + +static void picasa_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) picasa_service_real_get_pluggable_interface; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) picasa_service_real_get_id; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) picasa_service_real_get_pluggable_name; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) picasa_service_real_get_info; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) picasa_service_real_activation; +#line 812 "PicasaPublishing.c" +} + + +static void picasa_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + picasa_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*)(SpitPublishingService*, SpitPublishingPluginHost*)) picasa_service_real_create_publisher; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*)(SpitPublishingService*)) picasa_service_real_get_supported_media; +#line 823 "PicasaPublishing.c" +} + + +static void picasa_service_instance_init (PicasaService * self) { +} + + +static void picasa_service_finalize (GObject* obj) { + PicasaService * self; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PICASA_SERVICE, PicasaService); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (picasa_service_parent_class)->finalize (obj); +#line 837 "PicasaPublishing.c" +} + + +GType picasa_service_get_type (void) { + static volatile gsize picasa_service_type_id__volatile = 0; + if (g_once_init_enter (&picasa_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PicasaServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) picasa_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PicasaService), 0, (GInstanceInitFunc) picasa_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) picasa_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) picasa_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType picasa_service_type_id; + picasa_service_type_id = g_type_register_static (G_TYPE_OBJECT, "PicasaService", &g_define_type_info, 0); + g_type_add_interface_static (picasa_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (picasa_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&picasa_service_type_id__volatile, picasa_service_type_id); + } + return picasa_service_type_id__volatile; +} + + +PublishingPicasaPicasaPublisher* publishing_picasa_picasa_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingPicasaPicasaPublisher * self = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + PublishingPicasaPublishingParameters* _tmp3_ = NULL; + SpitPublishingPublisherMediaType media_type = 0; + SpitPublishingPluginHost* _tmp4_ = NULL; + gint _tmp5_ = 0; + SpitPublishingPublishable** _tmp6_ = NULL; + PublishingPicasaPublishingParameters* _tmp11_ = NULL; + SpitPublishingPublisherMediaType _tmp12_ = 0; + SpitPublishingPluginHost* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = service; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = host; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaPicasaPublisher*) publishing_rest_support_google_publisher_construct (object_type, _tmp0_, _tmp1_, "http://picasaweb.google.com/data/"); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_picasa_publishing_parameters_new (); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publishing_parameters = _tmp2_; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = self->priv->publishing_parameters; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_load_parameters_from_configuration_system (self, _tmp3_); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + media_type = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_NONE; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = host; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = spit_publishing_plugin_host_get_publishables (_tmp4_, &_tmp5_); +#line 897 "PicasaPublishing.c" + { + SpitPublishingPublishable** p_collection = NULL; + gint p_collection_length1 = 0; + gint _p_collection_size_ = 0; + gint p_it = 0; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + p_collection = _tmp6_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + p_collection_length1 = _tmp5_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + for (p_it = 0; p_it < _tmp5_; p_it = p_it + 1) { +#line 909 "PicasaPublishing.c" + SpitPublishingPublishable* _tmp7_ = NULL; + SpitPublishingPublishable* p = NULL; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _g_object_ref0 (p_collection[p_it]); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + p = _tmp7_; +#line 916 "PicasaPublishing.c" + { + SpitPublishingPublisherMediaType _tmp8_ = 0; + SpitPublishingPublishable* _tmp9_ = NULL; + SpitPublishingPublisherMediaType _tmp10_ = 0; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = media_type; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = p; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = spit_publishing_publishable_get_media_type (_tmp9_); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + media_type = _tmp8_ | _tmp10_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (p); +#line 931 "PicasaPublishing.c" + } + } +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + p_collection = (_vala_array_free (p_collection, p_collection_length1, (GDestroyNotify) g_object_unref), NULL); +#line 936 "PicasaPublishing.c" + } +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = self->priv->publishing_parameters; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = media_type; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_media_type (_tmp11_, _tmp12_); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = host; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", NULL); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->refresh_token = _tmp14_; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter = NULL; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter = NULL; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 968 "PicasaPublishing.c" +} + + +PublishingPicasaPicasaPublisher* publishing_picasa_picasa_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_picasa_publisher_construct (PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, service, host); +#line 975 "PicasaPublishing.c" +} + + +static void _vala_array_add12 (PublishingPicasaAlbum*** array, int* length, int* size, PublishingPicasaAlbum* value) { +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaAlbum*, *array, (*size) + 1); +#line 986 "PicasaPublishing.c" + } +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 992 "PicasaPublishing.c" +} + + +static PublishingPicasaAlbum** publishing_picasa_picasa_publisher_extract_albums_helper (PublishingPicasaPicasaPublisher* self, xmlNode* document_root, int* result_length1, GError** error) { + PublishingPicasaAlbum** result = NULL; + PublishingPicasaAlbum** _result_ = NULL; + PublishingPicasaAlbum** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + xmlNode* doc_node_iter = NULL; + xmlNode* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingPicasaAlbum** _tmp36_ = NULL; + gint _tmp36__length1 = 0; + GError * _inner_error_ = NULL; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self), NULL); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = g_new0 (PublishingPicasaAlbum*, 0 + 1); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result_ = _tmp0_; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result__length1 = 0; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __result__size_ = _result__length1; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + doc_node_iter = NULL; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = document_root; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = _tmp1_->name; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp2_, "feed") == 0) { +#line 1026 "PicasaPublishing.c" + xmlNode* _tmp3_ = NULL; + xmlNode* _tmp4_ = NULL; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = document_root; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_->children; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + doc_node_iter = _tmp4_; +#line 1035 "PicasaPublishing.c" + } else { + xmlNode* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = document_root; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _tmp5_->name; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp6_, "entry") == 0) { +#line 1045 "PicasaPublishing.c" + xmlNode* _tmp7_ = NULL; +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = document_root; +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + doc_node_iter = _tmp7_; +#line 1051 "PicasaPublishing.c" + } else { + GError* _tmp8_ = NULL; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "response root node " "isn't a <feed> or <entry>"); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = _tmp8_; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result_ = (_vala_array_free (_result_, _result__length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 1066 "PicasaPublishing.c" + } else { +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result_ = (_vala_array_free (_result_, _result__length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 1076 "PicasaPublishing.c" + } + } + } + { + gboolean _tmp9_ = FALSE; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = TRUE; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + while (TRUE) { +#line 1086 "PicasaPublishing.c" + xmlNode* _tmp12_ = NULL; + xmlNode* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + gchar* name_val = NULL; + gchar* url_val = NULL; + xmlNode* album_node_iter = NULL; + xmlNode* _tmp15_ = NULL; + xmlNode* _tmp16_ = NULL; + PublishingPicasaAlbum** _tmp32_ = NULL; + gint _tmp32__length1 = 0; + const gchar* _tmp33_ = NULL; + const gchar* _tmp34_ = NULL; + PublishingPicasaAlbum* _tmp35_ = NULL; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp9_) { +#line 1102 "PicasaPublishing.c" + xmlNode* _tmp10_ = NULL; + xmlNode* _tmp11_ = NULL; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = doc_node_iter; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = _tmp10_->next; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + doc_node_iter = _tmp11_; +#line 1111 "PicasaPublishing.c" + } +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = FALSE; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = doc_node_iter; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!(_tmp12_ != NULL)) { +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + break; +#line 1121 "PicasaPublishing.c" + } +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = doc_node_iter; +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = _tmp13_->name; +#line 98 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp14_, "entry") != 0) { +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + continue; +#line 1131 "PicasaPublishing.c" + } +#line 101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + name_val = NULL; +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + url_val = NULL; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = doc_node_iter; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = _tmp15_->children; +#line 103 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + album_node_iter = _tmp16_; +#line 1143 "PicasaPublishing.c" + { + gboolean _tmp17_ = FALSE; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = TRUE; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + while (TRUE) { +#line 1150 "PicasaPublishing.c" + xmlNode* _tmp20_ = NULL; + xmlNode* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp17_) { +#line 1156 "PicasaPublishing.c" + xmlNode* _tmp18_ = NULL; + xmlNode* _tmp19_ = NULL; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = album_node_iter; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = _tmp18_->next; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + album_node_iter = _tmp19_; +#line 1165 "PicasaPublishing.c" + } +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = FALSE; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = album_node_iter; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!(_tmp20_ != NULL)) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + break; +#line 1175 "PicasaPublishing.c" + } +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = album_node_iter; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = _tmp21_->name; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp22_, "title") == 0) { +#line 1183 "PicasaPublishing.c" + xmlNode* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = album_node_iter; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = (gchar*) xmlNodeGetContent (_tmp23_); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (name_val); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + name_val = _tmp24_; +#line 1194 "PicasaPublishing.c" + } else { + xmlNode* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = album_node_iter; +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = _tmp25_->name; +#line 107 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp26_, "id") == 0) { +#line 1204 "PicasaPublishing.c" + xmlNode* _tmp27_ = NULL; + xmlNs* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + xmlNode* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = album_node_iter; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = _tmp27_->ns; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = _tmp28_->prefix; +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp29_ != NULL) { +#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + continue; +#line 1220 "PicasaPublishing.c" + } +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp30_ = album_node_iter; +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = (gchar*) xmlNodeGetContent (_tmp30_); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (url_val); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + url_val = _tmp31_; +#line 1230 "PicasaPublishing.c" + } + } + } + } +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32_ = _result_; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32__length1 = _result__length1; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp33_ = name_val; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp34_ = url_val; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp35_ = publishing_picasa_album_new (_tmp33_, _tmp34_); +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add12 (&_result_, &_result__length1, &__result__size_, _tmp35_); +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (url_val); +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (name_val); +#line 1251 "PicasaPublishing.c" + } + } +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36_ = _result_; +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36__length1 = _result__length1; +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (result_length1) { +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *result_length1 = _tmp36__length1; +#line 1262 "PicasaPublishing.c" + } +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp36_; +#line 120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 1268 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_load_parameters_from_configuration_system (PublishingPicasaPicasaPublisher* self, PublishingPicasaPublishingParameters* parameters) { + PublishingPicasaPublishingParameters* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + gint _tmp2_ = 0; + PublishingPicasaPublishingParameters* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + PublishingPicasaPublishingParameters* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters)); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = parameters; +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default-size", 0); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_major_axis_size_selection_id (_tmp0_, _tmp2_); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = parameters; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip-metadata", FALSE); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_strip_metadata (_tmp3_, _tmp5_); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = parameters; +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-album", NULL); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _tmp8_; +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_target_album_name (_tmp6_, _tmp9_); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp9_); +#line 1315 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_save_parameters_to_configuration_system (PublishingPicasaPicasaPublisher* self, PublishingPicasaPublishingParameters* parameters) { + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingPicasaPublishingParameters* _tmp1_ = NULL; + gint _tmp2_ = 0; + SpitPublishingPluginHost* _tmp3_ = NULL; + PublishingPicasaPublishingParameters* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + SpitPublishingPluginHost* _tmp6_ = NULL; + PublishingPicasaPublishingParameters* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters)); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = parameters; +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_picasa_publishing_parameters_get_major_axis_size_selection_id (_tmp1_); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "default-size", _tmp2_); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = parameters; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_picasa_publishing_parameters_get_strip_metadata (_tmp4_); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", _tmp5_); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = parameters; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = publishing_picasa_publishing_parameters_get_target_album_name (_tmp7_); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _tmp8_; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-album", _tmp9_); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp9_); +#line 1362 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_service_welcome_login (PublishingPicasaPicasaPublisher* self) { + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:136: EVENT: user clicked 'Login' in welcome pane" \ +"."); +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 138 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 139 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1379 "PicasaPublishing.c" + } +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->refresh_token; +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_google_publisher_start_oauth_flow (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher), _tmp1_); +#line 1385 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* base) { + PublishingPicasaPicasaPublisher * self; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + PublishingRESTSupportGoogleSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + PublishingPicasaPublishingParameters* _tmp5_ = NULL; + PublishingRESTSupportGoogleSession* _tmp6_ = NULL; + PublishingRESTSupportGoogleSession* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:145: EVENT: OAuth login flow complete."); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = _tmp1_; +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_rest_support_google_session_get_refresh_token (_tmp2_); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_; +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", _tmp4_); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp4_); +#line 147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp2_); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = self->priv->publishing_parameters; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp6_; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = publishing_rest_support_google_session_get_user_name (_tmp7_); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _tmp8_; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_user_name (_tmp5_, _tmp9_); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp9_); +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp7_); +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_fetch_account_information (self); +#line 1439 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_initial_album_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_initial_album_fetch_complete ((PublishingPicasaPicasaPublisher*) self, _sender); +#line 1446 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_initial_album_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_initial_album_fetch_error ((PublishingPicasaPicasaPublisher*) self, _sender, err); +#line 1453 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_initial_album_fetch_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = txn; +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = txn; +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 158 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp4_) { +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1486 "PicasaPublishing.c" + } +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:161: EVENT: finished fetching account and album " \ +"information."); +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = txn; +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_parse_and_display_account_information (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION, PublishingPicasaAlbumDirectoryTransaction)); +#line 1494 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_initial_album_fetch_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + PublishingRESTSupportTransaction* _tmp9_ = NULL; + guint _tmp10_ = 0U; +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = bad_txn; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = bad_txn; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 171 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp4_) { +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1532 "PicasaPublishing.c" + } +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = bad_txn; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp6_; +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:174: EVENT: fetching account and album informati" \ +"on failed; response = '%s'.", _tmp7_); +#line 174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp7_); +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = bad_txn; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = publishing_rest_support_transaction_get_status_code (_tmp9_); +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp10_ == ((guint) 403)) { +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = TRUE; +#line 1552 "PicasaPublishing.c" + } else { + PublishingRESTSupportTransaction* _tmp11_ = NULL; + guint _tmp12_ = 0U; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = bad_txn; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = publishing_rest_support_transaction_get_status_code (_tmp11_); +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = _tmp12_ == ((guint) 404); +#line 1562 "PicasaPublishing.c" + } +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp8_) { +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_google_publisher_do_logout (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 1568 "PicasaPublishing.c" + } else { + SpitPublishingPluginHost* _tmp13_ = NULL; + GError* _tmp14_ = NULL; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = err; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp13_, _tmp14_); +#line 1578 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_picasa_publisher_on_publishing_options_logout (PublishingPicasaPicasaPublisher* self) { + gboolean _tmp0_ = FALSE; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1593 "PicasaPublishing.c" + } +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:189: EVENT: user clicked 'Logout' in the publish" \ +"ing options pane."); +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_google_publisher_do_logout (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 1599 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_publishing_options_publish (PublishingPicasaPicasaPublisher* self) { + gboolean _tmp0_ = FALSE; + PublishingPicasaPublishingParameters* _tmp1_ = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#line 194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1616 "PicasaPublishing.c" + } +#line 198 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:198: EVENT: user clicked 'Publish' in the publis" \ +"hing options pane."); +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->publishing_parameters; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_save_parameters_to_configuration_system (self, _tmp1_); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->publishing_parameters; +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_picasa_publishing_parameters_is_to_new_album (_tmp2_); +#line 202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp3_) { +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_create_album (self); +#line 1632 "PicasaPublishing.c" + } else { +#line 205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_upload (self); +#line 1636 "PicasaPublishing.c" + } +} + + +static void _publishing_picasa_picasa_publisher_on_album_creation_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_album_creation_complete ((PublishingPicasaPicasaPublisher*) self, _sender); +#line 1644 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_album_creation_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_album_creation_error ((PublishingPicasaPicasaPublisher*) self, _sender, err); +#line 1651 "PicasaPublishing.c" +} + + +static gpointer _publishing_rest_support_transaction_ref0 (gpointer self) { +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? publishing_rest_support_transaction_ref (self) : NULL; +#line 1658 "PicasaPublishing.c" +} + + +static gchar* _publishing_picasa_album_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { + gchar* result; + result = publishing_picasa_album_directory_transaction_validate_xml (doc); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 1667 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_album_creation_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingPicasaAlbumCreationTransaction* downcast_txn = NULL; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + PublishingPicasaAlbumCreationTransaction* _tmp6_ = NULL; + PublishingRESTSupportXmlDocument* response_doc = NULL; + PublishingPicasaAlbum** response_albums = NULL; + gint response_albums_length1 = 0; + gint _response_albums_size_ = 0; + PublishingPicasaAlbum** _tmp24_ = NULL; + gint _tmp24__length1 = 0; + PublishingPicasaPublishingParameters* _tmp28_ = NULL; + PublishingPicasaAlbum** _tmp29_ = NULL; + gint _tmp29__length1 = 0; + PublishingPicasaAlbum* _tmp30_ = NULL; + const gchar* _tmp31_ = NULL; + GError * _inner_error_ = NULL; +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = txn; +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_complete_publishing_rest_support_transaction_completed, self); +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = txn; +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_error_publishing_rest_support_transaction_network_error, self); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp4_) { +#line 214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1714 "PicasaPublishing.c" + } +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:216: EVENT: finished creating album on remote se" \ +"rver."); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = txn; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _publishing_rest_support_transaction_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION, PublishingPicasaAlbumCreationTransaction)); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + downcast_txn = _tmp6_; +#line 1724 "PicasaPublishing.c" + { + PublishingRESTSupportXmlDocument* _tmp7_ = NULL; + PublishingPicasaAlbumCreationTransaction* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + PublishingRESTSupportXmlDocument* _tmp11_ = NULL; + PublishingRESTSupportXmlDocument* _tmp12_ = NULL; + PublishingRESTSupportXmlDocument* _tmp13_ = NULL; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = downcast_txn; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = publishing_rest_support_transaction_get_response (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _tmp9_; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = publishing_rest_support_xml_document_parse_string (_tmp10_, _publishing_picasa_album_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = _tmp11_; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp10_); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp12_; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 1751 "PicasaPublishing.c" + goto __catch7_spit_publishing_publishing_error; + } +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1764 "PicasaPublishing.c" + } +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = _tmp7_; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = NULL; +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_doc = _tmp13_; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp7_); +#line 1776 "PicasaPublishing.c" + } + goto __finally7; + __catch7_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp14_ = NULL; + GError* _tmp15_ = NULL; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = err; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp14_, _tmp15_); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1802 "PicasaPublishing.c" + } + __finally7: +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1817 "PicasaPublishing.c" + } + { + PublishingPicasaAlbum** _tmp16_ = NULL; + PublishingRESTSupportXmlDocument* _tmp17_ = NULL; + xmlNode* _tmp18_ = NULL; + gint _tmp19_ = 0; + PublishingPicasaAlbum** _tmp20_ = NULL; + gint _tmp16__length1 = 0; + gint __tmp16__size_ = 0; + PublishingPicasaAlbum** _tmp21_ = NULL; + gint _tmp21__length1 = 0; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = response_doc; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = publishing_rest_support_xml_document_get_root_node (_tmp17_); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = publishing_picasa_picasa_publisher_extract_albums_helper (self, _tmp18_, &_tmp19_, &_inner_error_); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = _tmp20_; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16__length1 = _tmp19_; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __tmp16__size_ = _tmp16__length1; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 1845 "PicasaPublishing.c" + goto __catch8_spit_publishing_publishing_error; + } +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1860 "PicasaPublishing.c" + } +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = _tmp16_; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21__length1 = _tmp16__length1; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = NULL; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16__length1 = 0; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = _tmp21_; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums_length1 = _tmp21__length1; +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _response_albums_size_ = response_albums_length1; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = (_vala_array_free (_tmp16_, _tmp16__length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 1880 "PicasaPublishing.c" + } + goto __finally8; + __catch8_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp22_ = NULL; + GError* _tmp23_ = NULL; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = err; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp22_, _tmp23_); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1908 "PicasaPublishing.c" + } + __finally8: +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1925 "PicasaPublishing.c" + } +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = response_albums; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24__length1 = response_albums_length1; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp24__length1 != 1) { +#line 1933 "PicasaPublishing.c" + SpitPublishingPluginHost* _tmp25_ = NULL; + GError* _tmp26_ = NULL; + GError* _tmp27_ = NULL; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "album " "creation transaction responses must contain one and only one album dir" \ +"ectory " "entry"); +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = _tmp26_; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp25_, _tmp27_); +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (_tmp27_); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 1955 "PicasaPublishing.c" + } +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = self->priv->publishing_parameters; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = response_albums; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29__length1 = response_albums_length1; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp30_ = _tmp29_[0]; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = _tmp30_->url; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_target_album_entry_url (_tmp28_, _tmp31_); +#line 245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_upload (self); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_albums = (_vala_array_free (response_albums, response_albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 209 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (downcast_txn); +#line 1977 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_album_creation_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + SpitPublishingPluginHost* _tmp8_ = NULL; + GError* _tmp9_ = NULL; +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = bad_txn; +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_complete_publishing_rest_support_transaction_completed, self); +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = bad_txn; +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_error_publishing_rest_support_transaction_network_error, self); +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp4_) { +#line 254 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2014 "PicasaPublishing.c" + } +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = bad_txn; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = publishing_rest_support_transaction_get_response (_tmp5_); +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp6_; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:256: EVENT: creating album on remote server fail" \ +"ed; response = '%s'.", _tmp7_); +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp7_); +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = err; +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp8_, _tmp9_); +#line 2032 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_upload_status_updated (PublishingPicasaPicasaPublisher* self, gint file_number, gdouble completed_fraction) { + gboolean _tmp0_ = FALSE; + gdouble _tmp1_ = 0.0; + SpitPublishingProgressCallback _tmp2_ = NULL; + void* _tmp2__target = NULL; + SpitPublishingProgressCallback _tmp3_ = NULL; + void* _tmp3__target = NULL; + gint _tmp4_ = 0; + gdouble _tmp5_ = 0.0; +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 263 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2053 "PicasaPublishing.c" + } +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = completed_fraction; +#line 266 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:266: EVENT: uploader reports upload %.2f percent" \ +" complete.", 100.0 * _tmp1_); +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->progress_reporter; +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2__target = self->priv->progress_reporter_target; +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = file_number; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = completed_fraction; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 2075 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_upload_complete ((PublishingPicasaPicasaPublisher*) self, _sender, num_photos_published); +#line 2082 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_upload_error ((PublishingPicasaPicasaPublisher*) self, _sender, err); +#line 2089 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_upload_complete (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { + gboolean _tmp0_ = FALSE; + gint _tmp1_ = 0; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportBatchUploader* _tmp4_ = NULL; + guint _tmp5_ = 0U; +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2110 "PicasaPublishing.c" + } +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = num_published; +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:278: EVENT: uploader reports upload complete; %d" \ +" items published.", _tmp1_); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = uploader; +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = uploader; +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp5_, NULL, FALSE); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_show_success_pane (self); +#line 2130 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_on_upload_error (PublishingPicasaPicasaPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { + gboolean _tmp0_ = FALSE; + GError* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PublishingRESTSupportBatchUploader* _tmp3_ = NULL; + guint _tmp4_ = 0U; + PublishingRESTSupportBatchUploader* _tmp5_ = NULL; + guint _tmp6_ = 0U; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp0_) { +#line 289 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2154 "PicasaPublishing.c" + } +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = err; +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = _tmp1_->message; +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:291: EVENT: uploader reports upload error = '%s'" \ +".", _tmp2_); +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = uploader; +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp4_, NULL, FALSE); +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = uploader; +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp6_, NULL, FALSE); +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _publishing_picasa_picasa_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = err; +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 2180 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_service_welcome_login_spit_publishing_login_callback (gpointer self) { +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_service_welcome_login ((PublishingPicasaPicasaPublisher*) self); +#line 2187 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_show_service_welcome_pane (PublishingPicasaPicasaPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:300: ACTION: showing service welcome pane."); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_install_welcome_pane (_tmp0_, PUBLISHING_PICASA_SERVICE_WELCOME_MESSAGE, _publishing_picasa_picasa_publisher_on_service_welcome_login_spit_publishing_login_callback, self); +#line 2201 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_fetch_account_information (PublishingPicasaPicasaPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPicasaAlbumDirectoryTransaction* directory_trans = NULL; + PublishingRESTSupportGoogleSession* _tmp2_ = NULL; + PublishingRESTSupportGoogleSession* _tmp3_ = NULL; + PublishingPicasaAlbumDirectoryTransaction* _tmp4_ = NULL; + PublishingPicasaAlbumDirectoryTransaction* _tmp5_ = NULL; + GError * _inner_error_ = NULL; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:306: ACTION: fetching account and album informat" \ +"ion."); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp0_); +#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 309 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _tmp2_; +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_picasa_album_directory_transaction_new (_tmp3_); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = _tmp4_; +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp3_); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + directory_trans = _tmp5_; +#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_error_publishing_rest_support_transaction_network_error, self, 0); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_picasa_picasa_publisher_on_initial_album_fetch_complete_publishing_rest_support_transaction_completed, self, 0); +#line 2242 "PicasaPublishing.c" + { +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2250 "PicasaPublishing.c" + goto __catch9_spit_publishing_publishing_error; + } +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 317 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2261 "PicasaPublishing.c" + } + } + goto __finally9; + __catch9_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp6_ = NULL; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = err; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_initial_album_fetch_error (self, G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp6_); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 2279 "PicasaPublishing.c" + } + __finally9: +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2292 "PicasaPublishing.c" + } +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 2296 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_parse_and_display_account_information (PublishingPicasaPicasaPublisher* self, PublishingPicasaAlbumDirectoryTransaction* transaction) { + PublishingRESTSupportXmlDocument* response_doc = NULL; + GError * _inner_error_ = NULL; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_ALBUM_DIRECTORY_TRANSACTION (transaction)); +#line 327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:327: ACTION: parsing account and album informati" \ +"on from server response XML"); +#line 2309 "PicasaPublishing.c" + { + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + PublishingPicasaAlbumDirectoryTransaction* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingRESTSupportXmlDocument* _tmp4_ = NULL; + PublishingRESTSupportXmlDocument* _tmp5_ = NULL; + PublishingRESTSupportXmlDocument* _tmp6_ = NULL; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = transaction; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_rest_support_transaction_get_response (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _tmp2_; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_xml_document_parse_string (_tmp3_, _publishing_picasa_album_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = _tmp4_; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp3_); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = _tmp5_; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2336 "PicasaPublishing.c" + goto __catch10_spit_publishing_publishing_error; + } +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2347 "PicasaPublishing.c" + } +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _tmp0_; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = NULL; +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + response_doc = _tmp6_; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp0_); +#line 2359 "PicasaPublishing.c" + } + goto __finally10; + __catch10_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = err; +#line 334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2383 "PicasaPublishing.c" + } + __finally10: +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2396 "PicasaPublishing.c" + } + { + PublishingPicasaAlbum** _tmp9_ = NULL; + PublishingRESTSupportXmlDocument* _tmp10_ = NULL; + xmlNode* _tmp11_ = NULL; + gint _tmp12_ = 0; + PublishingPicasaAlbum** _tmp13_ = NULL; + gint _tmp9__length1 = 0; + gint __tmp9__size_ = 0; + PublishingPicasaPublishingParameters* _tmp14_ = NULL; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = response_doc; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = publishing_rest_support_xml_document_get_root_node (_tmp10_); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishing_picasa_picasa_publisher_extract_albums_helper (self, _tmp11_, &_tmp12_, &_inner_error_); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _tmp13_; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9__length1 = _tmp12_; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __tmp9__size_ = _tmp9__length1; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2423 "PicasaPublishing.c" + goto __catch11_spit_publishing_publishing_error; + } +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2434 "PicasaPublishing.c" + } +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = self->priv->publishing_parameters; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_albums (_tmp14_, _tmp9_, _tmp9__length1); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 2442 "PicasaPublishing.c" + } + goto __finally11; + __catch11_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp15_ = NULL; + GError* _tmp16_ = NULL; +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = err; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp15_, _tmp16_); +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2466 "PicasaPublishing.c" + } + __finally11: +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2479 "PicasaPublishing.c" + } +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_show_publishing_options_pane (self); +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 2485 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_publishing_options_publish_publishing_picasa_publishing_options_pane_publish (PublishingPicasaPublishingOptionsPane* _sender, gpointer self) { +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_publishing_options_publish ((PublishingPicasaPicasaPublisher*) self); +#line 2492 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_publishing_options_logout_publishing_picasa_publishing_options_pane_logout (PublishingPicasaPublishingOptionsPane* _sender, gpointer self) { +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_publishing_options_logout ((PublishingPicasaPicasaPublisher*) self); +#line 2499 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_show_publishing_options_pane (PublishingPicasaPicasaPublisher* self) { + GtkBuilder* builder = NULL; + GtkBuilder* _tmp0_ = NULL; + PublishingPicasaPublishingOptionsPane* opts_pane = NULL; + GtkBuilder* _tmp8_ = NULL; + PublishingPicasaPublishingParameters* _tmp9_ = NULL; + PublishingPicasaPublishingOptionsPane* _tmp10_ = NULL; + PublishingPicasaPublishingOptionsPane* _tmp11_ = NULL; + PublishingPicasaPublishingOptionsPane* _tmp12_ = NULL; + SpitPublishingPluginHost* _tmp13_ = NULL; + PublishingPicasaPublishingOptionsPane* _tmp14_ = NULL; + SpitPublishingPluginHost* _tmp15_ = NULL; + GError * _inner_error_ = NULL; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:349: ACTION: showing publishing options pane."); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = gtk_builder_new (); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + builder = _tmp0_; +#line 2524 "PicasaPublishing.c" + { + GtkBuilder* _tmp1_ = NULL; +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = builder; +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_builder_add_from_resource (_tmp1_, PLUGIN_RESOURCE_PATH "/" "picasa_publishing_options_pane.ui", &_inner_error_); +#line 355 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2533 "PicasaPublishing.c" + goto __catch12_g_error; + } + } + goto __finally12; + __catch12_g_error: + { + GError* e = NULL; + GError* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; + GError* _tmp7_ = NULL; +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + e = _inner_error_; +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = e; +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _tmp2_->message; +#line 358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_warning ("PicasaPublishing.vala:358: Could not parse UI file! Error: %s.", _tmp3_); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = _ ("A file required for publishing is unavailable. Publishing to Picasa ca" \ +"n't continue."); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp5_); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp6_; +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp4_, _tmp7_); +#line 359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (_tmp7_); +#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (e); +#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (builder); +#line 362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2575 "PicasaPublishing.c" + } + __finally12: +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (builder); +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2588 "PicasaPublishing.c" + } +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = builder; +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = self->priv->publishing_parameters; +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = publishing_picasa_publishing_options_pane_new (_tmp8_, _tmp9_); +#line 365 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + opts_pane = _tmp10_; +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = opts_pane; +#line 366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (_tmp11_, "publish", (GCallback) _publishing_picasa_picasa_publisher_on_publishing_options_publish_publishing_picasa_publishing_options_pane_publish, self, 0); +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = opts_pane; +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (_tmp12_, "logout", (GCallback) _publishing_picasa_picasa_publisher_on_publishing_options_logout_publishing_picasa_publishing_options_pane_logout, self, 0); +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = opts_pane; +#line 368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp15_, FALSE); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (opts_pane); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (builder); +#line 2620 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_create_album (PublishingPicasaPicasaPublisher* self) { + PublishingPicasaPublishingParameters* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + SpitPublishingPluginHost* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + PublishingPicasaAlbumCreationTransaction* creation_trans = NULL; + PublishingRESTSupportGoogleSession* _tmp8_ = NULL; + PublishingRESTSupportGoogleSession* _tmp9_ = NULL; + PublishingPicasaPublishingParameters* _tmp10_ = NULL; + PublishingPicasaAlbumCreationTransaction* _tmp11_ = NULL; + PublishingPicasaAlbumCreationTransaction* _tmp12_ = NULL; + GError * _inner_error_ = NULL; +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->publishing_parameters; +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_picasa_publishing_parameters_is_to_new_album (_tmp0_); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_assert (_tmp1_, "publishing_parameters.is_to_new_album()"); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->publishing_parameters; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_picasa_publishing_parameters_get_target_album_name (_tmp2_); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:376: ACTION: creating new album '%s' on remote s" \ +"erver.", _tmp4_); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp4_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _ ("Creating album..."); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp5_, _tmp6_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp7_, TRUE); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _tmp8_; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = self->priv->publishing_parameters; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = publishing_picasa_album_creation_transaction_new (_tmp9_, _tmp10_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = _tmp11_; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp9_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + creation_trans = _tmp12_; +#line 385 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_error_publishing_rest_support_transaction_network_error, self, 0); +#line 386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_picasa_picasa_publisher_on_album_creation_complete_publishing_rest_support_transaction_completed, self, 0); +#line 2686 "PicasaPublishing.c" + { +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2694 "PicasaPublishing.c" + goto __catch13_spit_publishing_publishing_error; + } +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2705 "PicasaPublishing.c" + } + } + goto __finally13; + __catch13_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp13_ = NULL; + GError* _tmp14_ = NULL; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + err = _inner_error_; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = err; +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_post_error (_tmp13_, _tmp14_); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (err); +#line 2726 "PicasaPublishing.c" + } + __finally13: +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2739 "PicasaPublishing.c" + } +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 2743 "PicasaPublishing.c" +} + + +static void _publishing_picasa_picasa_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_on_upload_status_updated ((PublishingPicasaPicasaPublisher*) self, file_number, fraction_complete); +#line 2750 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_upload (PublishingPicasaPicasaPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + gint _tmp3_ = 0; + PublishingPicasaPublishingParameters* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + void* _tmp6_ = NULL; + GDestroyNotify _tmp7_ = NULL; + SpitPublishingProgressCallback _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp10_ = NULL; + gint _tmp11_ = 0; + SpitPublishingPublishable** _tmp12_ = NULL; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + PublishingPicasaUploader* uploader = NULL; + PublishingRESTSupportGoogleSession* _tmp13_ = NULL; + PublishingRESTSupportGoogleSession* _tmp14_ = NULL; + SpitPublishingPublishable** _tmp15_ = NULL; + gint _tmp15__length1 = 0; + PublishingPicasaPublishingParameters* _tmp16_ = NULL; + PublishingPicasaUploader* _tmp17_ = NULL; + PublishingPicasaUploader* _tmp18_ = NULL; + PublishingPicasaUploader* _tmp19_ = NULL; + PublishingPicasaUploader* _tmp20_ = NULL; + PublishingPicasaUploader* _tmp21_ = NULL; +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:395: ACTION: uploading media items to remote ser" \ +"ver."); +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->publishing_parameters; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_picasa_publishing_parameters_get_major_axis_size_pixels (_tmp2_); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = self->priv->publishing_parameters; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_picasa_publishing_parameters_get_strip_metadata (_tmp4_); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = spit_publishing_plugin_host_serialize_publishables (_tmp1_, _tmp3_, _tmp5_, &_tmp6_, &_tmp7_); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter = NULL; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter = _tmp8_; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target = _tmp6_; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp7_; +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp9_) { +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2822 "PicasaPublishing.c" + } +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = spit_publishing_plugin_host_get_publishables (_tmp10_, &_tmp11_); +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishables = _tmp12_; +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishables_length1 = _tmp11_; +#line 410 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishables_size_ = publishables_length1; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = _tmp13_; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = publishables; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15__length1 = publishables_length1; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = self->priv->publishing_parameters; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = publishing_picasa_uploader_new (_tmp14_, _tmp15_, _tmp15__length1, _tmp16_); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = _tmp17_; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp14_); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + uploader = _tmp18_; +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = uploader; +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_picasa_picasa_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); +#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = uploader; +#line 414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_picasa_picasa_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = uploader; +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_picasa_picasa_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_batch_uploader_unref0 (uploader); +#line 394 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 2868 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_do_show_success_pane (PublishingPicasaPicasaPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PICASA_PUBLISHER (self)); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:420: ACTION: showing success pane."); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 423 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 2887 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* base) { + PublishingPicasaPicasaPublisher * self; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:427: ACTION: logging out user."); +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = _tmp0_; +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_google_session_deauthenticate (_tmp1_); +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->refresh_token = NULL; +#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spit_host_interface_unset_config_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token"); +#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_show_service_welcome_pane (self); +#line 2918 "PicasaPublishing.c" +} + + +static gboolean publishing_picasa_picasa_publisher_real_is_running (PublishingRESTSupportGooglePublisher* base) { + PublishingPicasaPicasaPublisher * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->running; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 2934 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_real_start (PublishingRESTSupportGooglePublisher* base) { + PublishingPicasaPicasaPublisher * self; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:442: PicasaPublisher: start( ) invoked."); +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp0_) { +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 2952 "PicasaPublishing.c" + } +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->running = TRUE; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->refresh_token; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp1_ == NULL) { +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_do_show_service_welcome_pane (self); +#line 2962 "PicasaPublishing.c" + } else { + const gchar* _tmp2_ = NULL; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->refresh_token; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_google_publisher_start_oauth_flow (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher), _tmp2_); +#line 2969 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_picasa_publisher_real_stop (PublishingRESTSupportGooglePublisher* base) { + PublishingPicasaPicasaPublisher * self; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_debug ("PicasaPublishing.vala:456: PicasaPublisher: stop( ) invoked."); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = _tmp0_; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_session_stop_transactions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->running = FALSE; +#line 2992 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_class_init (PublishingPicasaPicasaPublisherClass * klass) { +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_picasa_publisher_parent_class = g_type_class_peek_parent (klass); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPicasaPicasaPublisherPrivate)); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->on_login_flow_complete = publishing_picasa_picasa_publisher_real_on_login_flow_complete; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->do_logout = publishing_picasa_picasa_publisher_real_do_logout; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->is_running = publishing_picasa_picasa_publisher_real_is_running; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->start = publishing_picasa_picasa_publisher_real_start; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->stop = publishing_picasa_picasa_publisher_real_stop; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_picasa_picasa_publisher_finalize; +#line 3013 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_instance_init (PublishingPicasaPicasaPublisher * self) { +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv = PUBLISHING_PICASA_PICASA_PUBLISHER_GET_PRIVATE (self); +#line 3020 "PicasaPublishing.c" +} + + +static void publishing_picasa_picasa_publisher_finalize (GObject* obj) { + PublishingPicasaPicasaPublisher * self; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_PICASA_PUBLISHER, PublishingPicasaPicasaPublisher); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter = NULL; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (publishing_picasa_picasa_publisher_parent_class)->finalize (obj); +#line 3042 "PicasaPublishing.c" +} + + +GType publishing_picasa_picasa_publisher_get_type (void) { + static volatile gsize publishing_picasa_picasa_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_picasa_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaPicasaPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_picasa_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaPicasaPublisher), 0, (GInstanceInitFunc) publishing_picasa_picasa_publisher_instance_init, NULL }; + GType publishing_picasa_picasa_publisher_type_id; + publishing_picasa_picasa_publisher_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, "PublishingPicasaPicasaPublisher", &g_define_type_info, 0); + g_once_init_leave (&publishing_picasa_picasa_publisher_type_id__volatile, publishing_picasa_picasa_publisher_type_id); + } + return publishing_picasa_picasa_publisher_type_id__volatile; +} + + +PublishingPicasaAlbum* publishing_picasa_album_construct (GType object_type, const gchar* name, const gchar* url) { + PublishingPicasaAlbum* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (url != NULL, NULL); +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaAlbum*) g_type_create_instance (object_type); +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = name; +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->name); +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->name = _tmp1_; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = url; +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->url); +#line 470 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->url = _tmp3_; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 3088 "PicasaPublishing.c" +} + + +PublishingPicasaAlbum* publishing_picasa_album_new (const gchar* name, const gchar* url) { +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_album_construct (PUBLISHING_PICASA_TYPE_ALBUM, name, url); +#line 3095 "PicasaPublishing.c" +} + + +static void publishing_picasa_value_album_init (GValue* value) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 3102 "PicasaPublishing.c" +} + + +static void publishing_picasa_value_album_free_value (GValue* value) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (value->data[0].v_pointer) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_unref (value->data[0].v_pointer); +#line 3111 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_value_album_copy_value (const GValue* src_value, GValue* dest_value) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = publishing_picasa_album_ref (src_value->data[0].v_pointer); +#line 3121 "PicasaPublishing.c" + } else { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 3125 "PicasaPublishing.c" + } +} + + +static gpointer publishing_picasa_value_album_peek_pointer (const GValue* value) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 3133 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_value_album_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (collect_values[0].v_pointer) { +#line 3140 "PicasaPublishing.c" + PublishingPicasaAlbum* object; + object = collect_values[0].v_pointer; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 3147 "PicasaPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 3151 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = publishing_picasa_album_ref (object); +#line 3155 "PicasaPublishing.c" + } else { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 3159 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 3163 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_value_album_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPicasaAlbum** object_p; + object_p = collect_values[0].v_pointer; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!object_p) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 3174 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!value->data[0].v_pointer) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = NULL; +#line 3180 "PicasaPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 3184 "PicasaPublishing.c" + } else { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = publishing_picasa_album_ref (value->data[0].v_pointer); +#line 3188 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 3192 "PicasaPublishing.c" +} + + +GParamSpec* publishing_picasa_param_spec_album (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPicasaParamSpecAlbum* spec; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PICASA_TYPE_ALBUM), NULL); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return G_PARAM_SPEC (spec); +#line 3206 "PicasaPublishing.c" +} + + +gpointer publishing_picasa_value_get_album (const GValue* value) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_ALBUM), NULL); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 3215 "PicasaPublishing.c" +} + + +void publishing_picasa_value_set_album (GValue* value, gpointer v_object) { + PublishingPicasaAlbum* old; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_ALBUM)); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_TYPE_ALBUM)); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_ref (value->data[0].v_pointer); +#line 3235 "PicasaPublishing.c" + } else { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 3239 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_unref (old); +#line 3245 "PicasaPublishing.c" + } +} + + +void publishing_picasa_value_take_album (GValue* value, gpointer v_object) { + PublishingPicasaAlbum* old; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_ALBUM)); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_TYPE_ALBUM)); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 3264 "PicasaPublishing.c" + } else { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 3268 "PicasaPublishing.c" + } +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_unref (old); +#line 3274 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_album_class_init (PublishingPicasaAlbumClass * klass) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_parent_class = g_type_class_peek_parent (klass); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingPicasaAlbumClass *) klass)->finalize = publishing_picasa_album_finalize; +#line 3284 "PicasaPublishing.c" +} + + +static void publishing_picasa_album_instance_init (PublishingPicasaAlbum * self) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->ref_count = 1; +#line 3291 "PicasaPublishing.c" +} + + +static void publishing_picasa_album_finalize (PublishingPicasaAlbum* obj) { + PublishingPicasaAlbum * self; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_ALBUM, PublishingPicasaAlbum); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_destroy (self); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->name); +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->url); +#line 3305 "PicasaPublishing.c" +} + + +GType publishing_picasa_album_get_type (void) { + static volatile gsize publishing_picasa_album_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_album_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_picasa_value_album_init, publishing_picasa_value_album_free_value, publishing_picasa_value_album_copy_value, publishing_picasa_value_album_peek_pointer, "p", publishing_picasa_value_album_collect_value, "p", publishing_picasa_value_album_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaAlbumClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_album_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaAlbum), 0, (GInstanceInitFunc) publishing_picasa_album_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_picasa_album_type_id; + publishing_picasa_album_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPicasaAlbum", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_picasa_album_type_id__volatile, publishing_picasa_album_type_id); + } + return publishing_picasa_album_type_id__volatile; +} + + +gpointer publishing_picasa_album_ref (gpointer instance) { + PublishingPicasaAlbum* self; + self = instance; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return instance; +#line 3330 "PicasaPublishing.c" +} + + +void publishing_picasa_album_unref (gpointer instance) { + PublishingPicasaAlbum* self; + self = instance; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + PUBLISHING_PICASA_ALBUM_GET_CLASS (self)->finalize (self); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 3343 "PicasaPublishing.c" + } +} + + +PublishingPicasaAlbumDirectoryTransaction* publishing_picasa_album_directory_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session) { + PublishingPicasaAlbumDirectoryTransaction* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = session; +#line 480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaAlbumDirectoryTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, PUBLISHING_PICASA_ALBUM_DIRECTORY_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 3359 "PicasaPublishing.c" +} + + +PublishingPicasaAlbumDirectoryTransaction* publishing_picasa_album_directory_transaction_new (PublishingRESTSupportGoogleSession* session) { +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_album_directory_transaction_construct (PUBLISHING_PICASA_TYPE_ALBUM_DIRECTORY_TRANSACTION, session); +#line 3366 "PicasaPublishing.c" +} + + +gchar* publishing_picasa_album_directory_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc) { + gchar* result = NULL; + xmlNode* document_root = NULL; + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + xmlNode* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + xmlNode* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = doc; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + document_root = _tmp1_; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = document_root; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_->name; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp4_, "feed") == 0) { +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = TRUE; +#line 3394 "PicasaPublishing.c" + } else { + xmlNode* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = document_root; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _tmp5_->name; +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = g_strcmp0 (_tmp6_, "entry") == 0; +#line 3404 "PicasaPublishing.c" + } +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp2_) { +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = NULL; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 3412 "PicasaPublishing.c" + } else { + gchar* _tmp7_ = NULL; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = g_strdup ("response root node isn't a <feed> or <entry>"); +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp7_; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 3421 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_album_directory_transaction_class_init (PublishingPicasaAlbumDirectoryTransactionClass * klass) { +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_directory_transaction_parent_class = g_type_class_peek_parent (klass); +#line 3429 "PicasaPublishing.c" +} + + +static void publishing_picasa_album_directory_transaction_instance_init (PublishingPicasaAlbumDirectoryTransaction * self) { +} + + +GType publishing_picasa_album_directory_transaction_get_type (void) { + static volatile gsize publishing_picasa_album_directory_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_album_directory_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaAlbumDirectoryTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_album_directory_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaAlbumDirectoryTransaction), 0, (GInstanceInitFunc) publishing_picasa_album_directory_transaction_instance_init, NULL }; + GType publishing_picasa_album_directory_transaction_type_id; + publishing_picasa_album_directory_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingPicasaAlbumDirectoryTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_picasa_album_directory_transaction_type_id__volatile, publishing_picasa_album_directory_transaction_type_id); + } + return publishing_picasa_album_directory_transaction_type_id__volatile; +} + + +PublishingPicasaAlbumCreationTransaction* publishing_picasa_album_creation_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters) { + PublishingPicasaAlbumCreationTransaction* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + gchar* post_body = NULL; + PublishingPicasaPublishingParameters* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = session; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaAlbumCreationTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = parameters; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_picasa_publishing_parameters_is_new_album_public (_tmp2_); +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp3_) { +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = "public"; +#line 3479 "PicasaPublishing.c" + } else { +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = "private"; +#line 3483 "PicasaPublishing.c" + } +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = parameters; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_picasa_publishing_parameters_get_target_album_name (_tmp4_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _tmp5_; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = publishing_rest_support_decimal_entity_encode (_tmp6_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = _tmp7_; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = g_strdup_printf (PUBLISHING_PICASA_ALBUM_CREATION_TRANSACTION_ALBUM_ENTRY_TEMPLATE, _tmp8_, _tmp1_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _tmp9_; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp8_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp6_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + post_body = _tmp10_; +#line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_set_custom_payload (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), post_body, "application/atom+xml", (gulong) 0); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (post_body); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 3511 "PicasaPublishing.c" +} + + +PublishingPicasaAlbumCreationTransaction* publishing_picasa_album_creation_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_album_creation_transaction_construct (PUBLISHING_PICASA_TYPE_ALBUM_CREATION_TRANSACTION, session, parameters); +#line 3518 "PicasaPublishing.c" +} + + +static void publishing_picasa_album_creation_transaction_class_init (PublishingPicasaAlbumCreationTransactionClass * klass) { +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_album_creation_transaction_parent_class = g_type_class_peek_parent (klass); +#line 3525 "PicasaPublishing.c" +} + + +static void publishing_picasa_album_creation_transaction_instance_init (PublishingPicasaAlbumCreationTransaction * self) { +} + + +GType publishing_picasa_album_creation_transaction_get_type (void) { + static volatile gsize publishing_picasa_album_creation_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_album_creation_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaAlbumCreationTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_album_creation_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaAlbumCreationTransaction), 0, (GInstanceInitFunc) publishing_picasa_album_creation_transaction_instance_init, NULL }; + GType publishing_picasa_album_creation_transaction_type_id; + publishing_picasa_album_creation_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingPicasaAlbumCreationTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_picasa_album_creation_transaction_type_id__volatile, publishing_picasa_album_creation_transaction_type_id); + } + return publishing_picasa_album_creation_transaction_type_id__volatile; +} + + +static gpointer _publishing_rest_support_session_ref0 (gpointer self) { +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? publishing_rest_support_session_ref (self) : NULL; +#line 3548 "PicasaPublishing.c" +} + + +static gpointer _publishing_picasa_publishing_parameters_ref0 (gpointer self) { +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? publishing_picasa_publishing_parameters_ref (self) : NULL; +#line 3555 "PicasaPublishing.c" +} + + +PublishingPicasaUploadTransaction* publishing_picasa_upload_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters, SpitPublishingPublishable* publishable) { + PublishingPicasaUploadTransaction* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingPicasaPublishingParameters* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingRESTSupportGoogleSession* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + PublishingRESTSupportGoogleSession* _tmp6_ = NULL; + PublishingRESTSupportGoogleSession* _tmp7_ = NULL; + PublishingPicasaPublishingParameters* _tmp8_ = NULL; + PublishingPicasaPublishingParameters* _tmp9_ = NULL; + SpitPublishingPublishable* _tmp10_ = NULL; + SpitPublishingPublishable* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + SpitPublishingPublishable* _tmp13_ = NULL; + SpitPublishingPublisherMediaType _tmp14_ = 0; + gchar* _tmp15_ = NULL; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = session; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = parameters; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = publishing_picasa_publishing_parameters_get_target_album_feed_url (_tmp1_); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _tmp2_; +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaUploadTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, _tmp3_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 521 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp3_); +#line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = session; +#line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 523 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_assert (_tmp5_, "session.is_authenticated()"); +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = session; +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _publishing_rest_support_session_ref0 (_tmp6_); +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 524 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->session = _tmp7_; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = parameters; +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = _publishing_picasa_publishing_parameters_ref0 (_tmp8_); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 525 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->parameters = _tmp9_; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = publishable; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = _g_object_ref0 (_tmp10_); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publishable = _tmp11_; +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = publishable; +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = spit_publishing_publishable_get_media_type (_tmp13_); +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp14_ == SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO) { +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = "video/mpeg"; +#line 3633 "PicasaPublishing.c" + } else { +#line 528 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = "image/jpeg"; +#line 3637 "PicasaPublishing.c" + } +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = g_strdup (_tmp12_); +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->mime_type); +#line 527 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->mime_type = _tmp15_; +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 3647 "PicasaPublishing.c" +} + + +PublishingPicasaUploadTransaction* publishing_picasa_upload_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingPicasaPublishingParameters* parameters, SpitPublishingPublishable* publishable) { +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_upload_transaction_construct (PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, session, parameters, publishable); +#line 3654 "PicasaPublishing.c" +} + + +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* end = NULL; + gchar* _tmp0_ = NULL; + glong _tmp1_ = 0L; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = str; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = maxlen; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp2_; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = end; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ == NULL) { +#line 3677 "PicasaPublishing.c" + glong _tmp4_ = 0L; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = maxlen; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3685 "PicasaPublishing.c" + } else { + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (glong) (_tmp5_ - _tmp6_); +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3697 "PicasaPublishing.c" + } +} + + +static gchar* string_substring (const gchar* self, glong offset, glong len) { + gchar* result = NULL; + glong string_length = 0L; + gboolean _tmp0_ = FALSE; + glong _tmp1_ = 0L; + glong _tmp8_ = 0L; + glong _tmp14_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + glong _tmp21_ = 0L; + gchar* _tmp22_ = NULL; +#line 1306 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = offset; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_ >= ((glong) 0)) { +#line 3721 "PicasaPublishing.c" + glong _tmp2_ = 0L; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = len; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = _tmp2_ >= ((glong) 0); +#line 3727 "PicasaPublishing.c" + } else { +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = FALSE; +#line 3731 "PicasaPublishing.c" + } +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp0_) { +#line 3735 "PicasaPublishing.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; + glong _tmp5_ = 0L; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = offset; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = len; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = _tmp5_; +#line 3747 "PicasaPublishing.c" + } else { + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = strlen (self); +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = _tmp6_; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp7_; +#line 3757 "PicasaPublishing.c" + } +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = offset; +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp8_ < ((glong) 0)) { +#line 3763 "PicasaPublishing.c" + glong _tmp9_ = 0L; + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = string_length; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = offset; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + offset = _tmp9_ + _tmp10_; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = offset; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); +#line 3777 "PicasaPublishing.c" + } else { + glong _tmp12_ = 0L; + glong _tmp13_ = 0L; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = offset; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = string_length; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); +#line 3787 "PicasaPublishing.c" + } +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = len; +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp14_ < ((glong) 0)) { +#line 3793 "PicasaPublishing.c" + glong _tmp15_ = 0L; + glong _tmp16_ = 0L; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = offset; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp15_ - _tmp16_; +#line 3802 "PicasaPublishing.c" + } +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = offset; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = len; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = string_length; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = offset; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = len; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp22_; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3822 "PicasaPublishing.c" +} + + +static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gchar** _tmp3_ = NULL; + gint _tmp3__length1 = 0; +#line 1054 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = separator; +#line 1054 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp0_ == NULL) { +#line 1055 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + separator = ""; +#line 3839 "PicasaPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ != NULL) { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = TRUE; +#line 3849 "PicasaPublishing.c" + } else { + gchar** _tmp4_ = NULL; + gint _tmp4__length1 = 0; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp4__length1 > 0; +#line 3859 "PicasaPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp2_) { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = TRUE; +#line 3865 "PicasaPublishing.c" + } else { + gboolean _tmp5_ = FALSE; + gchar** _tmp6_ = NULL; + gint _tmp6__length1 = 0; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp6__length1 == -1) { +#line 3876 "PicasaPublishing.c" + gchar** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = _tmp7_[0]; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_ != NULL; +#line 3888 "PicasaPublishing.c" + } else { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = FALSE; +#line 3892 "PicasaPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp5_; +#line 3896 "PicasaPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_) { +#line 3900 "PicasaPublishing.c" + gint i = 0; + gsize len = 0UL; + gint _tmp31_ = 0; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + gsize _tmp35_ = 0UL; + const gchar* _tmp36_ = NULL; + gint _tmp37_ = 0; + gint _tmp38_ = 0; + gint _tmp39_ = 0; + const gchar* res = NULL; + gsize _tmp40_ = 0UL; + void* _tmp41_ = NULL; + void* ptr = NULL; + const gchar* _tmp42_ = NULL; + gchar** _tmp43_ = NULL; + gint _tmp43__length1 = 0; + const gchar* _tmp44_ = NULL; + void* _tmp45_ = NULL; + const gchar* _tmp62_ = NULL; +#line 1059 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = (gsize) 1; +#line 3923 "PicasaPublishing.c" + { + gboolean _tmp9_ = FALSE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = TRUE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + while (TRUE) { +#line 3932 "PicasaPublishing.c" + gboolean _tmp11_ = FALSE; + gboolean _tmp12_ = FALSE; + gchar** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + gint _tmp21_ = 0; + gchar** _tmp22_ = NULL; + gint _tmp22__length1 = 0; + gint _tmp23_ = 0; + const gchar* _tmp24_ = NULL; + gsize _tmp30_ = 0UL; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp9_) { +#line 3945 "PicasaPublishing.c" + gint _tmp10_ = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = _tmp10_ + 1; +#line 3951 "PicasaPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = FALSE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp13__length1 != -1) { +#line 3961 "PicasaPublishing.c" + gint _tmp14_ = 0; + gchar** _tmp15_ = NULL; + gint _tmp15__length1 = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ < _tmp15__length1; +#line 3973 "PicasaPublishing.c" + } else { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 3977 "PicasaPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp12_) { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = TRUE; +#line 3983 "PicasaPublishing.c" + } else { + gboolean _tmp16_ = FALSE; + gchar** _tmp17_ = NULL; + gint _tmp17__length1 = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp17__length1 == -1) { +#line 3994 "PicasaPublishing.c" + gchar** _tmp18_ = NULL; + gint _tmp18__length1 = 0; + gint _tmp19_ = 0; + const gchar* _tmp20_ = NULL; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = _tmp18_[_tmp19_]; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = _tmp20_ != NULL; +#line 4009 "PicasaPublishing.c" + } else { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = FALSE; +#line 4013 "PicasaPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = _tmp16_; +#line 4017 "PicasaPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp11_) { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + break; +#line 4023 "PicasaPublishing.c" + } +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = str_array; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22__length1 = str_array_length1; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp23_ = i; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp24_ = _tmp22_[_tmp23_]; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp24_ != NULL) { +#line 4035 "PicasaPublishing.c" + gchar** _tmp25_ = NULL; + gint _tmp25__length1 = 0; + gint _tmp26_ = 0; + const gchar* _tmp27_ = NULL; + gint _tmp28_ = 0; + gint _tmp29_ = 0; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp25_ = str_array; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp25__length1 = str_array_length1; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp26_ = i; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp27_ = _tmp25_[_tmp26_]; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp28_ = strlen ((const gchar*) _tmp27_); +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp29_ = _tmp28_; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = _tmp29_; +#line 4056 "PicasaPublishing.c" + } else { +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = 0; +#line 4060 "PicasaPublishing.c" + } +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp30_ = len; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp30_ + _tmp21_; +#line 4066 "PicasaPublishing.c" + } + } +#line 1063 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp31_ = i; +#line 1063 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp31_ == 0) { +#line 4073 "PicasaPublishing.c" + gchar* _tmp32_ = NULL; +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp32_ = g_strdup (""); +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp32_; +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 4081 "PicasaPublishing.c" + } +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp33_ = i; +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + str_array_length1 = _tmp33_; +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp34_ = str_array_length1; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp35_ = len; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp36_ = separator; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp37_ = strlen ((const gchar*) _tmp36_); +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp38_ = _tmp37_; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp39_ = i; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp40_ = len; +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp41_ = g_malloc (_tmp40_); +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = _tmp41_; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp42_ = res; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp43_ = str_array; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp43__length1 = str_array_length1; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp44_ = _tmp43_[0]; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp45_; +#line 4119 "PicasaPublishing.c" + { + gboolean _tmp46_ = FALSE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = 1; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp46_ = TRUE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + while (TRUE) { +#line 4128 "PicasaPublishing.c" + gint _tmp48_ = 0; + gchar** _tmp49_ = NULL; + gint _tmp49__length1 = 0; + void* _tmp50_ = NULL; + const gchar* _tmp51_ = NULL; + void* _tmp52_ = NULL; + const gchar* _tmp53_ = NULL; + gchar** _tmp54_ = NULL; + gint _tmp54__length1 = 0; + gint _tmp55_ = 0; + const gchar* _tmp56_ = NULL; + void* _tmp60_ = NULL; + void* _tmp61_ = NULL; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp46_) { +#line 4144 "PicasaPublishing.c" + gint _tmp47_ = 0; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp47_ = i; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = _tmp47_ + 1; +#line 4150 "PicasaPublishing.c" + } +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp46_ = FALSE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp48_ = i; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp49_ = str_array; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp49__length1 = str_array_length1; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!(_tmp48_ < _tmp49__length1)) { +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + break; +#line 4164 "PicasaPublishing.c" + } +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp50_ = ptr; +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp51_ = separator; +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp52_; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp54_ = str_array; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp54__length1 = str_array_length1; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp55_ = i; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp56_ = _tmp54_[_tmp55_]; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp56_ != NULL) { +#line 4184 "PicasaPublishing.c" + gchar** _tmp57_ = NULL; + gint _tmp57__length1 = 0; + gint _tmp58_ = 0; + const gchar* _tmp59_ = NULL; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp57_ = str_array; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp57__length1 = str_array_length1; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp58_ = i; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp59_ = _tmp57_[_tmp58_]; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp53_ = (const gchar*) _tmp59_; +#line 4199 "PicasaPublishing.c" + } else { +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp53_ = ""; +#line 4203 "PicasaPublishing.c" + } +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp60_ = ptr; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp61_; +#line 4211 "PicasaPublishing.c" + } + } +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp62_ = res; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = NULL; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (gchar*) _tmp62_; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 4222 "PicasaPublishing.c" + } else { + gchar* _tmp63_ = NULL; +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp63_ = g_strdup (""); +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp63_; +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 4231 "PicasaPublishing.c" + } +} + + +static guint8* string_get_data (const gchar* self, int* result_length1) { + guint8* result; + guint8* res = NULL; + gint res_length1 = 0; + gint _res_size_ = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + guint8* _tmp3_ = NULL; + gint _tmp3__length1 = 0; + guint8* _tmp4_ = NULL; + gint _tmp4__length1 = 0; +#line 1398 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = (guint8*) self; +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res_length1 = -1; +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _res_size_ = res_length1; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res_length1 = (gint) _tmp1_; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = res_length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = res; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3__length1 = res_length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4__length1 = _tmp3__length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (result_length1) { +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + *result_length1 = _tmp4__length1; +#line 4276 "PicasaPublishing.c" + } +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 4282 "PicasaPublishing.c" +} + + +static void _vala_SoupBuffer_free (SoupBuffer* self) { +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_boxed_free (soup_buffer_get_type (), self); +#line 4289 "PicasaPublishing.c" +} + + +static void _vala_SoupMultipart_free (SoupMultipart* self) { +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_boxed_free (soup_multipart_get_type (), self); +#line 4296 "PicasaPublishing.c" +} + + +static void publishing_picasa_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingPicasaUploadTransaction * self; + SoupMultipart* message_parts = NULL; + SoupMultipart* _tmp0_ = NULL; + gchar* summary = NULL; + gchar* _tmp1_ = NULL; + SpitPublishingPublishable* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + gchar** keywords = NULL; + SpitPublishingPublishable* _tmp12_ = NULL; + gint _tmp13_ = 0; + gchar** _tmp14_ = NULL; + gint keywords_length1 = 0; + gint _keywords_size_ = 0; + gchar* keywords_string = NULL; + gchar* _tmp15_ = NULL; + gchar** _tmp16_ = NULL; + gint _tmp16__length1 = 0; + gchar* metadata = NULL; + SpitPublishingPublishable* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + gchar* _tmp54_ = NULL; + gchar* _tmp55_ = NULL; + const gchar* _tmp56_ = NULL; + const gchar* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + gchar* _tmp59_ = NULL; + SoupBuffer* metadata_buffer = NULL; + const gchar* _tmp60_ = NULL; + guint8* _tmp61_ = NULL; + gint _tmp61__length1 = 0; + guint8* _tmp62_ = NULL; + gint _tmp62__length1 = 0; + SoupBuffer* _tmp63_ = NULL; + SoupMultipart* _tmp64_ = NULL; + SoupBuffer* _tmp65_ = NULL; + guint8* photo_data = NULL; + GMappedFile* _tmp87_ = NULL; + gchar* _tmp88_ = NULL; + gint photo_data_length1 = 0; + gint _photo_data_size_ = 0; + GMappedFile* _tmp89_ = NULL; + gsize _tmp90_ = 0UL; + gint _tmp91_ = 0; + SoupBuffer* bindable_data = NULL; + SoupBuffer* _tmp92_ = NULL; + SoupMultipart* _tmp93_ = NULL; + SpitPublishingPublishable* _tmp94_ = NULL; + GFile* _tmp95_ = NULL; + GFile* _tmp96_ = NULL; + gchar* _tmp97_ = NULL; + gchar* _tmp98_ = NULL; + const gchar* _tmp99_ = NULL; + SoupMessage* outbound_message = NULL; + gchar* _tmp100_ = NULL; + gchar* _tmp101_ = NULL; + SoupMultipart* _tmp102_ = NULL; + SoupMessage* _tmp103_ = NULL; + SoupMessage* _tmp104_ = NULL; + SoupMessageHeaders* _tmp105_ = NULL; + PublishingRESTSupportGoogleSession* _tmp106_ = NULL; + gchar* _tmp107_ = NULL; + gchar* _tmp108_ = NULL; + gchar* _tmp109_ = NULL; + gchar* _tmp110_ = NULL; + GError * _inner_error_ = NULL; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransaction); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = soup_multipart_new ("multipart/related"); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + message_parts = _tmp0_; +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (""); +#line 535 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + summary = _tmp1_; +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->publishable; +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = spit_publishing_publishable_get_publishing_name (_tmp2_); +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_; +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = g_strcmp0 (_tmp4_, "") != 0; +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp4_); +#line 536 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp5_) { +#line 4391 "PicasaPublishing.c" + SpitPublishingPublishable* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = self->priv->publishable; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = spit_publishing_publishable_get_publishing_name (_tmp6_); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = _tmp7_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = publishing_rest_support_decimal_entity_encode (_tmp8_); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _tmp9_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = g_strdup_printf ("<atom:summary>%s</atom:summary>", _tmp10_); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + summary = _tmp11_; +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp10_); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp8_); +#line 4418 "PicasaPublishing.c" + } +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = self->priv->publishable; +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = spit_publishing_publishable_get_publishing_keywords (_tmp12_, &_tmp13_); +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = _tmp14_; +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_length1 = _tmp13_; +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _keywords_size_ = keywords_length1; +#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = g_strdup (""); +#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_string = _tmp15_; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = keywords; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16__length1 = keywords_length1; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp16__length1 > 0) { +#line 4440 "PicasaPublishing.c" + const gchar* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; + const gchar* _tmp49_ = NULL; + gchar* _tmp50_ = NULL; + { + gint i = 0; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + i = 0; +#line 4449 "PicasaPublishing.c" + { + gboolean _tmp17_ = FALSE; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = TRUE; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + while (TRUE) { +#line 4456 "PicasaPublishing.c" + gint _tmp19_ = 0; + gchar** _tmp20_ = NULL; + gint _tmp20__length1 = 0; + gchar** tmp = NULL; + gint tmp_length1 = 0; + gint _tmp_size_ = 0; + gchar** _tmp21_ = NULL; + gint _tmp21__length1 = 0; + gint _tmp22_ = 0; + const gchar* _tmp23_ = NULL; + gboolean _tmp24_ = FALSE; + const gchar* _tmp37_ = NULL; + gint _tmp38_ = 0; + gint _tmp39_ = 0; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp17_) { +#line 4473 "PicasaPublishing.c" + gint _tmp18_ = 0; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = i; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + i = _tmp18_ + 1; +#line 4479 "PicasaPublishing.c" + } +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = FALSE; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = i; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = keywords; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20__length1 = keywords_length1; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!(_tmp19_ < _tmp20__length1)) { +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + break; +#line 4493 "PicasaPublishing.c" + } +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = keywords; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21__length1 = keywords_length1; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = i; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = _tmp21_[_tmp22_]; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = g_str_has_prefix (_tmp23_, "/"); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp24_) { +#line 4507 "PicasaPublishing.c" + gchar** _tmp25_ = NULL; + gint _tmp25__length1 = 0; + gint _tmp26_ = 0; + const gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; + gchar** _tmp30_ = NULL; + gchar** _tmp31_ = NULL; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = keywords; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25__length1 = keywords_length1; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = i; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = _tmp25_[_tmp26_]; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = string_substring (_tmp27_, (glong) 1, (glong) -1); +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = _tmp28_; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = _tmp30_ = g_strsplit (_tmp29_, "/", 0); +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp = (_vala_array_free (tmp, tmp_length1, (GDestroyNotify) g_free), NULL); +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp = _tmp31_; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp_length1 = _vala_array_length (_tmp30_); +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp_size_ = tmp_length1; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp29_); +#line 4540 "PicasaPublishing.c" + } else { + gchar** _tmp32_ = NULL; + gint _tmp32__length1 = 0; + gint _tmp33_ = 0; + const gchar* _tmp34_ = NULL; + gchar** _tmp35_ = NULL; + gchar** _tmp36_ = NULL; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32_ = keywords; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32__length1 = keywords_length1; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp33_ = i; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp34_ = _tmp32_[_tmp33_]; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36_ = _tmp35_ = g_strsplit (_tmp34_, "/", 0); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp = (_vala_array_free (tmp, tmp_length1, (GDestroyNotify) g_free), NULL); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp = _tmp36_; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp_length1 = _vala_array_length (_tmp35_); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp_size_ = tmp_length1; +#line 4566 "PicasaPublishing.c" + } +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp37_ = keywords_string; +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp38_ = strlen (_tmp37_); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp39_ = _tmp38_; +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp39_ > 0) { +#line 4576 "PicasaPublishing.c" + const gchar* _tmp40_ = NULL; + gchar** _tmp41_ = NULL; + gint _tmp41__length1 = 0; + gchar* _tmp42_ = NULL; + gchar* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp40_ = keywords_string; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp41_ = tmp; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp41__length1 = tmp_length1; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp42_ = _vala_g_strjoinv (", ", _tmp41_, _tmp41__length1); +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp43_ = _tmp42_; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp44_ = g_strjoin (", ", _tmp40_, _tmp43_, NULL); +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_string = _tmp44_; +#line 553 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp43_); +#line 4601 "PicasaPublishing.c" + } else { + gchar** _tmp45_ = NULL; + gint _tmp45__length1 = 0; + gchar* _tmp46_ = NULL; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp45_ = tmp; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp45__length1 = tmp_length1; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp46_ = _vala_g_strjoinv (", ", _tmp45_, _tmp45__length1); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_string = _tmp46_; +#line 4616 "PicasaPublishing.c" + } +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + tmp = (_vala_array_free (tmp, tmp_length1, (GDestroyNotify) g_free), NULL); +#line 4620 "PicasaPublishing.c" + } + } + } +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp47_ = keywords_string; +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp48_ = publishing_rest_support_decimal_entity_encode (_tmp47_); +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_string = _tmp48_; +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp49_ = keywords_string; +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp50_ = g_strdup_printf ("<mrss:group><mrss:keywords>%s</mrss:keywords></mrss:group>", _tmp49_); +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 559 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords_string = _tmp50_; +#line 4640 "PicasaPublishing.c" + } +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp51_ = self->priv->publishable; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp52_ = spit_publishing_publishable_get_param_string (_tmp51_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp53_ = _tmp52_; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp54_ = publishing_rest_support_decimal_entity_encode (_tmp53_); +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp55_ = _tmp54_; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp56_ = summary; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp57_ = keywords_string; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp58_ = g_strdup_printf (PUBLISHING_PICASA_UPLOAD_TRANSACTION_METADATA_TEMPLATE, _tmp55_, _tmp56_, _tmp57_); +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp59_ = _tmp58_; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp55_); +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp53_); +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + metadata = _tmp59_; +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp60_ = metadata; +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp61_ = string_get_data (_tmp60_, &_tmp61__length1); +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp62_ = _tmp61_; +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp62__length1 = _tmp61__length1; +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp63_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp62_, _tmp62__length1); +#line 565 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + metadata_buffer = _tmp63_; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp64_ = message_parts; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp65_ = metadata_buffer; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + soup_multipart_append_form_file (_tmp64_, "", "", "application/atom+xml", _tmp65_); +#line 4684 "PicasaPublishing.c" + { + GMappedFile* _tmp66_ = NULL; + SpitPublishingPublishable* _tmp67_ = NULL; + GFile* _tmp68_ = NULL; + GFile* _tmp69_ = NULL; + gchar* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + GMappedFile* _tmp72_ = NULL; + GMappedFile* _tmp73_ = NULL; + GMappedFile* _tmp74_ = NULL; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp67_ = self->priv->publishable; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp68_ = spit_publishing_publishable_get_serialized_file (_tmp67_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp69_ = _tmp68_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp70_ = g_file_get_path (_tmp69_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp71_ = _tmp70_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp72_ = g_mapped_file_new (_tmp71_, FALSE, &_inner_error_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp73_ = _tmp72_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp71_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (_tmp69_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp66_ = _tmp73_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == G_FILE_ERROR) { +#line 4719 "PicasaPublishing.c" + goto __catch14_g_file_error; + } +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 4740 "PicasaPublishing.c" + } +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp74_ = _tmp66_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp66_ = NULL; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_mapped_file_unref0 (self->priv->mapped_file); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->mapped_file = _tmp74_; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_mapped_file_unref0 (_tmp66_); +#line 4752 "PicasaPublishing.c" + } + goto __finally14; + __catch14_g_file_error: + { + GError* e = NULL; + gchar* msg = NULL; + SpitPublishingPublishable* _tmp75_ = NULL; + GFile* _tmp76_ = NULL; + GFile* _tmp77_ = NULL; + gchar* _tmp78_ = NULL; + gchar* _tmp79_ = NULL; + GError* _tmp80_ = NULL; + const gchar* _tmp81_ = NULL; + gchar* _tmp82_ = NULL; + gchar* _tmp83_ = NULL; + const gchar* _tmp84_ = NULL; + const gchar* _tmp85_ = NULL; + GError* _tmp86_ = NULL; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + e = _inner_error_; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = NULL; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp75_ = self->priv->publishable; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp76_ = spit_publishing_publishable_get_serialized_file (_tmp75_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp77_ = _tmp76_; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp78_ = g_file_get_path (_tmp77_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp79_ = _tmp78_; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp80_ = e; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp81_ = _tmp80_->message; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp82_ = g_strdup_printf ("Picasa: couldn't read data from %s: %s", _tmp79_, _tmp81_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp83_ = _tmp82_; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp79_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (_tmp77_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + msg = _tmp83_; +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp84_ = msg; +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_warning ("PicasaPublishing.vala:574: %s", _tmp84_); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp85_ = msg; +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp86_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp85_); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _inner_error_ = _tmp86_; +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (msg); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_error_free0 (e); +#line 4813 "PicasaPublishing.c" + goto __finally14; + } + __finally14: +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 4837 "PicasaPublishing.c" + } else { +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 4857 "PicasaPublishing.c" + } + } +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp87_ = self->priv->mapped_file; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp88_ = g_mapped_file_get_contents (_tmp87_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + photo_data = (guint8*) _tmp88_; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + photo_data_length1 = -1; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _photo_data_size_ = photo_data_length1; +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp89_ = self->priv->mapped_file; +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp90_ = g_mapped_file_get_length (_tmp89_); +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + photo_data_length1 = (gint) _tmp90_; +#line 579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp91_ = photo_data_length1; +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp92_ = soup_buffer_new (SOUP_MEMORY_TEMPORARY, photo_data, photo_data_length1); +#line 584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + bindable_data = _tmp92_; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp93_ = message_parts; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp94_ = self->priv->publishable; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp95_ = spit_publishing_publishable_get_serialized_file (_tmp94_); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp96_ = _tmp95_; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp97_ = g_file_get_path (_tmp96_); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp98_ = _tmp97_; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp99_ = self->priv->mime_type; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + soup_multipart_append_form_file (_tmp93_, "", _tmp98_, _tmp99_, bindable_data); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp98_); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (_tmp96_); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp100_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp101_ = _tmp100_; +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp102_ = message_parts; +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp103_ = soup_form_request_new_from_multipart (_tmp101_, _tmp102_); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp104_ = _tmp103_; +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp101_); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + outbound_message = _tmp104_; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp105_ = outbound_message->request_headers; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp106_ = self->priv->session; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp107_ = publishing_rest_support_google_session_get_access_token (_tmp106_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp108_ = _tmp107_; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp109_ = g_strconcat ("Bearer ", _tmp108_, NULL); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp110_ = _tmp109_; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + soup_message_headers_append (_tmp105_, "Authorization", _tmp110_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp110_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp108_); +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), outbound_message); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_propagate_error (error, _inner_error_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (outbound_message); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 4964 "PicasaPublishing.c" + } else { +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (outbound_message); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_clear_error (&_inner_error_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return; +#line 4988 "PicasaPublishing.c" + } + } +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (outbound_message); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (metadata); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (keywords_string); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (summary); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 5007 "PicasaPublishing.c" +} + + +static void publishing_picasa_upload_transaction_class_init (PublishingPicasaUploadTransactionClass * klass) { +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_upload_transaction_parent_class = g_type_class_peek_parent (klass); +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_picasa_upload_transaction_finalize; +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPicasaUploadTransactionPrivate)); +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->execute = publishing_picasa_upload_transaction_real_execute; +#line 5020 "PicasaPublishing.c" +} + + +static void publishing_picasa_upload_transaction_instance_init (PublishingPicasaUploadTransaction * self) { +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv = PUBLISHING_PICASA_UPLOAD_TRANSACTION_GET_PRIVATE (self); +#line 5027 "PicasaPublishing.c" +} + + +static void publishing_picasa_upload_transaction_finalize (PublishingRESTSupportTransaction* obj) { + PublishingPicasaUploadTransaction * self; +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_UPLOAD_TRANSACTION, PublishingPicasaUploadTransaction); +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 514 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 515 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->mime_type); +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_mapped_file_unref0 (self->priv->mapped_file); +#line 510 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_picasa_upload_transaction_parent_class)->finalize (obj); +#line 5047 "PicasaPublishing.c" +} + + +GType publishing_picasa_upload_transaction_get_type (void) { + static volatile gsize publishing_picasa_upload_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_upload_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaUploadTransaction), 0, (GInstanceInitFunc) publishing_picasa_upload_transaction_instance_init, NULL }; + GType publishing_picasa_upload_transaction_type_id; + publishing_picasa_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingPicasaUploadTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_picasa_upload_transaction_type_id__volatile, publishing_picasa_upload_transaction_type_id); + } + return publishing_picasa_upload_transaction_type_id__volatile; +} + + +static gpointer _publishing_picasa_publishing_options_pane_size_description_ref0 (gpointer self) { +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? publishing_picasa_publishing_options_pane_size_description_ref (self) : NULL; +#line 5066 "PicasaPublishing.c" +} + + +static void _publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked ((PublishingPicasaPublishingOptionsPane*) self); +#line 5073 "PicasaPublishing.c" +} + + +static void _publishing_picasa_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_on_create_new_radio_clicked ((PublishingPicasaPublishingOptionsPane*) self); +#line 5080 "PicasaPublishing.c" +} + + +static void _publishing_picasa_publishing_options_pane_on_new_album_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_on_new_album_entry_changed ((PublishingPicasaPublishingOptionsPane*) self); +#line 5087 "PicasaPublishing.c" +} + + +static void _publishing_picasa_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_on_logout_clicked ((PublishingPicasaPublishingOptionsPane*) self); +#line 5094 "PicasaPublishing.c" +} + + +static void _publishing_picasa_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_on_publish_clicked ((PublishingPicasaPublishingOptionsPane*) self); +#line 5101 "PicasaPublishing.c" +} + + +PublishingPicasaPublishingOptionsPane* publishing_picasa_publishing_options_pane_construct (GType object_type, GtkBuilder* builder, PublishingPicasaPublishingParameters* parameters) { + PublishingPicasaPublishingOptionsPane * self = NULL; + gint _tmp0_ = 0; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp1_ = NULL; + GtkBuilder* _tmp2_ = NULL; + GtkBuilder* _tmp3_ = NULL; + GtkBuilder* _tmp4_ = NULL; + GtkBuilder* _tmp5_ = NULL; + GSList* _tmp6_ = NULL; + GSList* _tmp7_ = NULL; + guint _tmp8_ = 0U; + PublishingPicasaPublishingParameters* _tmp9_ = NULL; + PublishingPicasaPublishingParameters* _tmp10_ = NULL; + GtkBuilder* _tmp11_ = NULL; + GObject* _tmp12_ = NULL; + GtkBox* _tmp13_ = NULL; + GtkBuilder* _tmp14_ = NULL; + GObject* _tmp15_ = NULL; + GtkLabel* _tmp16_ = NULL; + GtkBuilder* _tmp17_ = NULL; + GObject* _tmp18_ = NULL; + GtkLabel* _tmp19_ = NULL; + GtkBuilder* _tmp20_ = NULL; + GObject* _tmp21_ = NULL; + GtkRadioButton* _tmp22_ = NULL; + GtkBuilder* _tmp23_ = NULL; + GObject* _tmp24_ = NULL; + GtkComboBoxText* _tmp25_ = NULL; + GtkBuilder* _tmp26_ = NULL; + GObject* _tmp27_ = NULL; + GtkRadioButton* _tmp28_ = NULL; + GtkBuilder* _tmp29_ = NULL; + GObject* _tmp30_ = NULL; + GtkEntry* _tmp31_ = NULL; + GtkBuilder* _tmp32_ = NULL; + GObject* _tmp33_ = NULL; + GtkCheckButton* _tmp34_ = NULL; + GtkBuilder* _tmp35_ = NULL; + GObject* _tmp36_ = NULL; + GtkComboBoxText* _tmp37_ = NULL; + GtkBuilder* _tmp38_ = NULL; + GObject* _tmp39_ = NULL; + GtkCheckButton* _tmp40_ = NULL; + GtkBuilder* _tmp41_ = NULL; + GObject* _tmp42_ = NULL; + GtkButton* _tmp43_ = NULL; + GtkBuilder* _tmp44_ = NULL; + GObject* _tmp45_ = NULL; + GtkButton* _tmp46_ = NULL; + GtkLabel* _tmp47_ = NULL; + const gchar* _tmp48_ = NULL; + PublishingPicasaPublishingParameters* _tmp49_ = NULL; + gchar* _tmp50_ = NULL; + gchar* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + GtkCheckButton* _tmp54_ = NULL; + PublishingPicasaPublishingParameters* _tmp55_ = NULL; + gboolean _tmp56_ = FALSE; + PublishingPicasaPublishingParameters* _tmp57_ = NULL; + SpitPublishingPublisherMediaType _tmp58_ = 0; + GtkRadioButton* _tmp75_ = NULL; + GtkRadioButton* _tmp76_ = NULL; + GtkEntry* _tmp77_ = NULL; + GtkButton* _tmp78_ = NULL; + GtkButton* _tmp79_ = NULL; +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaPublishingOptionsPane*) g_object_new (object_type, NULL); +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_picasa_publishing_options_pane_create_size_descriptions (self, &_tmp0_); +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_descriptions = (_vala_array_free (self->priv->size_descriptions, self->priv->size_descriptions_length1, (GDestroyNotify) publishing_picasa_publishing_options_pane_size_description_unref), NULL); +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_descriptions = _tmp1_; +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_descriptions_length1 = _tmp0_; +#line 636 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->_size_descriptions_size_ = self->priv->size_descriptions_length1; +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = builder; +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->builder = _tmp3_; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = builder; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_assert (_tmp4_ != NULL, "builder != null"); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = builder; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = gtk_builder_get_objects (_tmp5_); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _tmp6_; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = g_slist_length (_tmp7_); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_assert (_tmp8_ > ((guint) 0), "builder.get_objects().length() > 0"); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_slist_free0 (_tmp7_); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = parameters; +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _publishing_picasa_publishing_parameters_ref0 (_tmp9_); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 642 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->parameters = _tmp10_; +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = builder; +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = gtk_builder_get_object (_tmp11_, "picasa_pane_widget"); +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_box_get_type (), GtkBox)); +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 645 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->pane_widget = _tmp13_; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = builder; +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = gtk_builder_get_object (_tmp14_, "login_identity_label"); +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_label_get_type (), GtkLabel)); +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->login_identity_label); +#line 646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->login_identity_label = _tmp16_; +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = builder; +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = gtk_builder_get_object (_tmp17_, "publish_to_label"); +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_label_get_type (), GtkLabel)); +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publish_to_label); +#line 647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publish_to_label = _tmp19_; +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = builder; +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = gtk_builder_get_object (_tmp20_, "use_existing_radio"); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_radio_button_get_type (), GtkRadioButton)); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->use_existing_radio = _tmp22_; +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = builder; +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = gtk_builder_get_object (_tmp23_, "existing_albums_combo"); +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->existing_albums_combo); +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->existing_albums_combo = _tmp25_; +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = builder; +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = gtk_builder_get_object (_tmp26_, "create_new_radio"); +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_radio_button_get_type (), GtkRadioButton)); +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->create_new_radio = _tmp28_; +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = builder; +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp30_ = gtk_builder_get_object (_tmp29_, "new_album_entry"); +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_entry_get_type (), GtkEntry)); +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->new_album_entry); +#line 651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->new_album_entry = _tmp31_; +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32_ = builder; +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp33_ = gtk_builder_get_object (_tmp32_, "public_check"); +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_check_button_get_type (), GtkCheckButton)); +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->public_check); +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->public_check = _tmp34_; +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp35_ = builder; +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36_ = gtk_builder_get_object (_tmp35_, "size_combo"); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp37_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_combo_box_text_get_type (), GtkComboBoxText)); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_combo = _tmp37_; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp38_ = self->priv->builder; +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp39_ = gtk_builder_get_object (_tmp38_, "strip_metadata_check"); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_check_button_get_type (), GtkCheckButton)); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->strip_metadata_check = _tmp40_; +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp41_ = builder; +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp42_ = gtk_builder_get_object (_tmp41_, "publish_button"); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp43_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_button_get_type (), GtkButton)); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publish_button = _tmp43_; +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp44_ = builder; +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp45_ = gtk_builder_get_object (_tmp44_, "logout_button"); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp46_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_button_get_type (), GtkButton)); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->logout_button = _tmp46_; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp47_ = self->priv->login_identity_label; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp48_ = _ ("You are logged into Picasa Web Albums as %s."); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp49_ = parameters; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp50_ = publishing_picasa_publishing_parameters_get_user_name (_tmp49_); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp51_ = _tmp50_; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp52_ = g_strdup_printf (_tmp48_, _tmp51_); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp53_ = _tmp52_; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_label_set_label (_tmp47_, _tmp53_); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp53_); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp51_); +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp54_ = self->priv->strip_metadata_check; +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp55_ = parameters; +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp56_ = publishing_picasa_publishing_parameters_get_strip_metadata (_tmp55_); +#line 661 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp56_); +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp57_ = parameters; +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp58_ = publishing_picasa_publishing_parameters_get_media_type (_tmp57_); +#line 664 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((_tmp58_ & SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO) == 0) { +#line 5373 "PicasaPublishing.c" + GtkLabel* _tmp59_ = NULL; + const gchar* _tmp60_ = NULL; + GtkComboBoxText* _tmp61_ = NULL; + GtkComboBoxText* _tmp62_ = NULL; +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp59_ = self->priv->publish_to_label; +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp60_ = _ ("Videos will appear in:"); +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_label_set_label (_tmp59_, _tmp60_); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp61_ = self->priv->size_combo; +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp62_ = self->priv->size_combo; +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 5392 "PicasaPublishing.c" + } else { + GtkLabel* _tmp63_ = NULL; + const gchar* _tmp64_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp65_ = NULL; + gint _tmp65__length1 = 0; + GtkComboBoxText* _tmp70_ = NULL; + GtkComboBoxText* _tmp71_ = NULL; + GtkComboBoxText* _tmp72_ = NULL; + PublishingPicasaPublishingParameters* _tmp73_ = NULL; + gint _tmp74_ = 0; +#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp63_ = self->priv->publish_to_label; +#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp64_ = _ ("Photos will appear in:"); +#line 670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_label_set_label (_tmp63_, _tmp64_); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp65_ = self->priv->size_descriptions; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp65__length1 = self->priv->size_descriptions_length1; +#line 5413 "PicasaPublishing.c" + { + PublishingPicasaPublishingOptionsPaneSizeDescription** desc_collection = NULL; + gint desc_collection_length1 = 0; + gint _desc_collection_size_ = 0; + gint desc_it = 0; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + desc_collection = _tmp65_; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + desc_collection_length1 = _tmp65__length1; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + for (desc_it = 0; desc_it < _tmp65__length1; desc_it = desc_it + 1) { +#line 5425 "PicasaPublishing.c" + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp66_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* desc = NULL; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp66_ = _publishing_picasa_publishing_options_pane_size_description_ref0 (desc_collection[desc_it]); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + desc = _tmp66_; +#line 5432 "PicasaPublishing.c" + { + GtkComboBoxText* _tmp67_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp68_ = NULL; + const gchar* _tmp69_ = NULL; +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp67_ = self->priv->size_combo; +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp68_ = desc; +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp69_ = _tmp68_->name; +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_combo_box_text_append_text (_tmp67_, _tmp69_); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_options_pane_size_description_unref0 (desc); +#line 5447 "PicasaPublishing.c" + } + } + } +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp70_ = self->priv->size_combo; +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp71_ = self->priv->size_combo; +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp72_ = self->priv->size_combo; +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp73_ = parameters; +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp74_ = publishing_picasa_publishing_parameters_get_major_axis_size_selection_id (_tmp73_); +#line 676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, gtk_combo_box_get_type (), GtkComboBox), _tmp74_); +#line 5467 "PicasaPublishing.c" + } +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp75_ = self->priv->use_existing_radio; +#line 680 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked, self, 0); +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp76_ = self->priv->create_new_radio; +#line 681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_picasa_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked, self, 0); +#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp77_ = self->priv->new_album_entry; +#line 682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_picasa_publishing_options_pane_on_new_album_entry_changed_gtk_editable_changed, self, 0); +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp78_ = self->priv->logout_button; +#line 683 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (_tmp78_, "clicked", (GCallback) _publishing_picasa_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp79_ = self->priv->publish_button; +#line 684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_connect_object (_tmp79_, "clicked", (GCallback) _publishing_picasa_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 5491 "PicasaPublishing.c" +} + + +PublishingPicasaPublishingOptionsPane* publishing_picasa_publishing_options_pane_new (GtkBuilder* builder, PublishingPicasaPublishingParameters* parameters) { +#line 635 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_publishing_options_pane_construct (PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, builder, parameters); +#line 5498 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_on_publish_clicked (PublishingPicasaPublishingOptionsPane* self) { + gint _tmp0_ = 0; + GtkComboBoxText* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint size_combo_last_active = 0; + PublishingPicasaPublishingParameters* _tmp5_ = NULL; + gint _tmp6_ = 0; + PublishingPicasaPublishingParameters* _tmp7_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + gint _tmp9_ = 0; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp10_ = NULL; + gint _tmp11_ = 0; + PublishingPicasaPublishingParameters* _tmp12_ = NULL; + GtkCheckButton* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + PublishingPicasaAlbum** albums = NULL; + PublishingPicasaPublishingParameters* _tmp15_ = NULL; + gint _tmp16_ = 0; + PublishingPicasaAlbum** _tmp17_ = NULL; + gint albums_length1 = 0; + gint _albums_size_ = 0; + GtkRadioButton* _tmp18_ = NULL; + gboolean _tmp19_ = FALSE; +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->size_combo; +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox)); +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp2_ >= 0) { +#line 5534 "PicasaPublishing.c" + GtkComboBoxText* _tmp3_ = NULL; + gint _tmp4_ = 0; +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = self->priv->size_combo; +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_combo_box_get_type (), GtkComboBox)); +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = _tmp4_; +#line 5543 "PicasaPublishing.c" + } else { +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = 0; +#line 5547 "PicasaPublishing.c" + } +#line 691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + size_combo_last_active = _tmp0_; +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = self->priv->parameters; +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = size_combo_last_active; +#line 693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_major_axis_size_selection_id (_tmp5_, _tmp6_); +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = self->priv->parameters; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = self->priv->size_descriptions; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8__length1 = self->priv->size_descriptions_length1; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = size_combo_last_active; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _tmp8_[_tmp9_]; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = _tmp10_->major_axis_pixels; +#line 694 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_major_axis_size_pixels (_tmp7_, _tmp11_); +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = self->priv->parameters; +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = self->priv->strip_metadata_check; +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 696 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_strip_metadata (_tmp12_, _tmp14_); +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = self->priv->parameters; +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = publishing_picasa_publishing_parameters_get_albums (_tmp15_, &_tmp16_); +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums = _tmp17_; +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums_length1 = _tmp16_; +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _albums_size_ = albums_length1; +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = self->priv->create_new_radio; +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 700 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp19_) { +#line 5595 "PicasaPublishing.c" + PublishingPicasaPublishingParameters* _tmp20_ = NULL; + GtkEntry* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + PublishingPicasaPublishingParameters* _tmp23_ = NULL; + PublishingPicasaPublishingParameters* _tmp24_ = NULL; + GtkCheckButton* _tmp25_ = NULL; + gboolean _tmp26_ = FALSE; +#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = self->priv->parameters; +#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = self->priv->new_album_entry; +#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = gtk_entry_get_text (_tmp21_); +#line 701 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_target_album_name (_tmp20_, _tmp22_); +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = self->priv->parameters; +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_is_to_new_album (_tmp23_, TRUE); +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = self->priv->parameters; +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = self->priv->public_check; +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_is_new_album_public (_tmp24_, _tmp26_); +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_emit_by_name (self, "publish"); +#line 5625 "PicasaPublishing.c" + } else { + PublishingPicasaPublishingParameters* _tmp27_ = NULL; + PublishingPicasaAlbum** _tmp28_ = NULL; + gint _tmp28__length1 = 0; + GtkComboBoxText* _tmp29_ = NULL; + gint _tmp30_ = 0; + PublishingPicasaAlbum* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; + PublishingPicasaPublishingParameters* _tmp33_ = NULL; + PublishingPicasaPublishingParameters* _tmp34_ = NULL; + PublishingPicasaAlbum** _tmp35_ = NULL; + gint _tmp35__length1 = 0; + GtkComboBoxText* _tmp36_ = NULL; + gint _tmp37_ = 0; + PublishingPicasaAlbum* _tmp38_ = NULL; + const gchar* _tmp39_ = NULL; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = self->priv->parameters; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = albums; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28__length1 = albums_length1; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = self->priv->existing_albums_combo; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp30_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_combo_box_get_type (), GtkComboBox)); +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = _tmp28_[_tmp30_]; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32_ = _tmp31_->name; +#line 706 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_target_album_name (_tmp27_, _tmp32_); +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp33_ = self->priv->parameters; +#line 707 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_is_to_new_album (_tmp33_, FALSE); +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp34_ = self->priv->parameters; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp35_ = albums; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp35__length1 = albums_length1; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36_ = self->priv->existing_albums_combo; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp37_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_combo_box_get_type (), GtkComboBox)); +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp38_ = _tmp35_[_tmp37_]; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp39_ = _tmp38_->url; +#line 708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_set_target_album_entry_url (_tmp34_, _tmp39_); +#line 709 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_emit_by_name (self, "publish"); +#line 5680 "PicasaPublishing.c" + } +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums = (_vala_array_free (albums, albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 5684 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_on_use_existing_radio_clicked (PublishingPicasaPublishingOptionsPane* self) { + GtkComboBoxText* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + GtkComboBoxText* _tmp2_ = NULL; + GtkCheckButton* _tmp3_ = NULL; +#line 713 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->existing_albums_combo; +#line 714 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->new_album_entry; +#line 715 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->existing_albums_combo; +#line 716 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget)); +#line 717 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (self); +#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = self->priv->public_check; +#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 5713 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_on_create_new_radio_clicked (PublishingPicasaPublishingOptionsPane* self) { + GtkEntry* _tmp0_ = NULL; + GtkComboBoxText* _tmp1_ = NULL; + GtkEntry* _tmp2_ = NULL; + GtkCheckButton* _tmp3_ = NULL; +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->new_album_entry; +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = self->priv->existing_albums_combo; +#line 723 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->new_album_entry; +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget)); +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (self); +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = self->priv->public_check; +#line 726 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 5742 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_on_logout_clicked (PublishingPicasaPublishingOptionsPane* self) { +#line 729 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 730 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 5751 "PicasaPublishing.c" +} + + +static gchar* string_strip (const gchar* self) { + gchar* result = NULL; + gchar* _result_ = NULL; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 1207 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = g_strdup (self); +#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_strstrip (_tmp1_); +#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _result_; +#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 5774 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (PublishingPicasaPublishingOptionsPane* self) { + gchar* album_name = NULL; + GtkEntry* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + GtkButton* _tmp10_ = NULL; +#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->new_album_entry; +#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = gtk_entry_get_text (_tmp0_); +#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 734 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + album_name = _tmp2_; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = album_name; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = string_strip (_tmp4_); +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = _tmp5_; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = g_strcmp0 (_tmp6_, "") == 0; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (_tmp6_); +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp7_) { +#line 5811 "PicasaPublishing.c" + GtkRadioButton* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = self->priv->create_new_radio; +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 736 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _tmp9_; +#line 5820 "PicasaPublishing.c" + } else { +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = FALSE; +#line 5824 "PicasaPublishing.c" + } +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = self->priv->publish_button; +#line 735 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), !_tmp3_); +#line 733 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (album_name); +#line 5832 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_on_new_album_entry_changed (PublishingPicasaPublishingOptionsPane* self) { +#line 739 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 740 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (self); +#line 5841 "PicasaPublishing.c" +} + + +static void _vala_array_add13 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaPublishingOptionsPaneSizeDescription*, *array, (*size) + 1); +#line 5852 "PicasaPublishing.c" + } +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 5858 "PicasaPublishing.c" +} + + +static void _vala_array_add14 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaPublishingOptionsPaneSizeDescription*, *array, (*size) + 1); +#line 5869 "PicasaPublishing.c" + } +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 5875 "PicasaPublishing.c" +} + + +static void _vala_array_add15 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaPublishingOptionsPaneSizeDescription*, *array, (*size) + 1); +#line 5886 "PicasaPublishing.c" + } +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 5892 "PicasaPublishing.c" +} + + +static void _vala_array_add16 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaPublishingOptionsPaneSizeDescription*, *array, (*size) + 1); +#line 5903 "PicasaPublishing.c" + } +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 5909 "PicasaPublishing.c" +} + + +static void _vala_array_add17 (PublishingPicasaPublishingOptionsPaneSizeDescription*** array, int* length, int* size, PublishingPicasaPublishingOptionsPaneSizeDescription* value) { +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if ((*length) == (*size)) { +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *array = g_renew (PublishingPicasaPublishingOptionsPaneSizeDescription*, *array, (*size) + 1); +#line 5920 "PicasaPublishing.c" + } +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[(*length)++] = value; +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + (*array)[*length] = NULL; +#line 5926 "PicasaPublishing.c" +} + + +static PublishingPicasaPublishingOptionsPaneSizeDescription** publishing_picasa_publishing_options_pane_create_size_descriptions (PublishingPicasaPublishingOptionsPane* self, int* result_length1) { + PublishingPicasaPublishingOptionsPaneSizeDescription** result = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _result_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp3_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp6_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp9_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp12_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription* _tmp15_ = NULL; + PublishingPicasaPublishingOptionsPaneSizeDescription** _tmp16_ = NULL; + gint _tmp16__length1 = 0; +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = g_new0 (PublishingPicasaPublishingOptionsPaneSizeDescription*, 0 + 1); +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result_ = _tmp0_; +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _result__length1 = 0; +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + __result__size_ = _result__length1; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = _result_; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1__length1 = _result__length1; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = _ ("Small (640 x 480 pixels)"); +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_picasa_publishing_options_pane_size_description_new (_tmp2_, 640); +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add13 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _result_; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4__length1 = _result__length1; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = _ ("Medium (1024 x 768 pixels)"); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = publishing_picasa_publishing_options_pane_size_description_new (_tmp5_, 1024); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add14 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = _result_; +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7__length1 = _result__length1; +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = _ ("Recommended (1600 x 1200 pixels)"); +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = publishing_picasa_publishing_options_pane_size_description_new (_tmp8_, 1600); +#line 748 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add15 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = _result_; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10__length1 = _result__length1; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = _ ("Google+ (2048 x 1536 pixels)"); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = publishing_picasa_publishing_options_pane_size_description_new (_tmp11_, 2048); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add16 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = _result_; +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13__length1 = _result__length1; +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = _ ("Original Size"); +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = publishing_picasa_publishing_options_pane_size_description_new (_tmp14_, PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE); +#line 750 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _vala_array_add17 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = _result_; +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16__length1 = _result__length1; +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (result_length1) { +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *result_length1 = _tmp16__length1; +#line 6026 "PicasaPublishing.c" + } +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp16_; +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6032 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_options_pane_installed (PublishingPicasaPublishingOptionsPane* self) { + gint default_album_id = 0; + gchar* last_album = NULL; + PublishingPicasaPublishingParameters* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + PublishingPicasaAlbum** albums = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + gint _tmp3_ = 0; + PublishingPicasaAlbum** _tmp4_ = NULL; + gint albums_length1 = 0; + gint _albums_size_ = 0; + PublishingPicasaAlbum** _tmp27_ = NULL; + gint _tmp27__length1 = 0; +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 756 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + default_album_id = -1; +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->parameters; +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishing_picasa_publishing_parameters_get_target_album_name (_tmp0_); +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + last_album = _tmp1_; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->parameters; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = publishing_picasa_publishing_parameters_get_albums (_tmp2_, &_tmp3_); +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums = _tmp4_; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums_length1 = _tmp3_; +#line 759 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _albums_size_ = albums_length1; +#line 6069 "PicasaPublishing.c" + { + gint i = 0; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + i = 0; +#line 6074 "PicasaPublishing.c" + { + gboolean _tmp5_ = FALSE; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = TRUE; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + while (TRUE) { +#line 6081 "PicasaPublishing.c" + gint _tmp7_ = 0; + PublishingPicasaAlbum** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GtkComboBoxText* _tmp9_ = NULL; + PublishingPicasaAlbum** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + gint _tmp11_ = 0; + PublishingPicasaAlbum* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + PublishingPicasaAlbum** _tmp15_ = NULL; + gint _tmp15__length1 = 0; + gint _tmp16_ = 0; + PublishingPicasaAlbum* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!_tmp5_) { +#line 6100 "PicasaPublishing.c" + gint _tmp6_ = 0; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = i; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + i = _tmp6_ + 1; +#line 6106 "PicasaPublishing.c" + } +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = FALSE; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp7_ = i; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8_ = albums; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp8__length1 = albums_length1; +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!(_tmp7_ < _tmp8__length1)) { +#line 761 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + break; +#line 6120 "PicasaPublishing.c" + } +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp9_ = self->priv->existing_albums_combo; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10_ = albums; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp10__length1 = albums_length1; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp11_ = i; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp12_ = _tmp10_[_tmp11_]; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp13_ = _tmp12_->name; +#line 762 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_combo_box_text_append_text (_tmp9_, _tmp13_); +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15_ = albums; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp15__length1 = albums_length1; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp16_ = i; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp17_ = _tmp15_[_tmp16_]; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp18_ = _tmp17_->name; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp19_ = last_album; +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp18_, _tmp19_) == 0) { +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = TRUE; +#line 6152 "PicasaPublishing.c" + } else { + gboolean _tmp20_ = FALSE; + PublishingPicasaAlbum** _tmp21_ = NULL; + gint _tmp21__length1 = 0; + gint _tmp22_ = 0; + PublishingPicasaAlbum* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21_ = albums; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp21__length1 = albums_length1; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp22_ = i; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp23_ = _tmp21_[_tmp22_]; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp24_ = _tmp23_->name; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_strcmp0 (_tmp24_, PUBLISHING_PICASA_DEFAULT_ALBUM_NAME) == 0) { +#line 6172 "PicasaPublishing.c" + gint _tmp25_ = 0; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp25_ = default_album_id; +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = _tmp25_ == -1; +#line 6178 "PicasaPublishing.c" + } else { +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp20_ = FALSE; +#line 6182 "PicasaPublishing.c" + } +#line 764 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp14_ = _tmp20_; +#line 6186 "PicasaPublishing.c" + } +#line 763 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp14_) { +#line 6190 "PicasaPublishing.c" + gint _tmp26_ = 0; +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp26_ = i; +#line 765 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + default_album_id = _tmp26_; +#line 6196 "PicasaPublishing.c" + } + } + } + } +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27_ = albums; +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp27__length1 = albums_length1; +#line 768 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp27__length1 == 0) { +#line 6207 "PicasaPublishing.c" + GtkComboBoxText* _tmp28_ = NULL; + GtkRadioButton* _tmp29_ = NULL; + GtkRadioButton* _tmp30_ = NULL; + GtkEntry* _tmp31_ = NULL; + GtkEntry* _tmp32_ = NULL; +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp28_ = self->priv->existing_albums_combo; +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 770 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp29_ = self->priv->use_existing_radio; +#line 770 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp30_ = self->priv->create_new_radio; +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp31_ = self->priv->new_album_entry; +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget)); +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp32_ = self->priv->new_album_entry; +#line 773 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_entry_set_text (_tmp32_, PUBLISHING_PICASA_DEFAULT_ALBUM_NAME); +#line 6233 "PicasaPublishing.c" + } else { + gint _tmp33_ = 0; +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp33_ = default_album_id; +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (_tmp33_ >= 0) { +#line 6240 "PicasaPublishing.c" + GtkRadioButton* _tmp34_ = NULL; + GtkComboBoxText* _tmp35_ = NULL; + gint _tmp36_ = 0; + GtkEntry* _tmp37_ = NULL; + GtkCheckButton* _tmp38_ = NULL; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp34_ = self->priv->use_existing_radio; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp35_ = self->priv->existing_albums_combo; +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp36_ = default_album_id; +#line 777 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_combo_box_get_type (), GtkComboBox), _tmp36_); +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp37_ = self->priv->new_album_entry; +#line 778 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp38_ = self->priv->public_check; +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 6264 "PicasaPublishing.c" + } else { + GtkRadioButton* _tmp39_ = NULL; + GtkComboBoxText* _tmp40_ = NULL; + GtkEntry* _tmp41_ = NULL; + GtkEntry* _tmp42_ = NULL; + GtkCheckButton* _tmp43_ = NULL; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp39_ = self->priv->create_new_radio; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp40_ = self->priv->existing_albums_combo; +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp41_ = self->priv->new_album_entry; +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_entry_set_text (_tmp41_, PUBLISHING_PICASA_DEFAULT_ALBUM_NAME); +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp42_ = self->priv->new_album_entry; +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget)); +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp43_ = self->priv->public_check; +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 6291 "PicasaPublishing.c" + } + } +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_update_publish_button_sensitivity (self); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + albums = (_vala_array_free (albums, albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (last_album); +#line 6300 "PicasaPublishing.c" +} + + +static GtkWidget* publishing_picasa_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingPicasaPublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 791 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp1_; +#line 792 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6319 "PicasaPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_picasa_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingPicasaPublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane); +#line 796 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 796 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6332 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingPicasaPublishingOptionsPane * self; +#line 799 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane); +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_installed (self); +#line 6342 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingPicasaPublishingOptionsPane * self; +#line 803 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane); +#line 6350 "PicasaPublishing.c" +} + + +static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_construct (GType object_type, const gchar* name, gint major_axis_pixels) { + PublishingPicasaPublishingOptionsPaneSizeDescription* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaPublishingOptionsPaneSizeDescription*) g_type_create_instance (object_type); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = name; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->name); +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->name = _tmp1_; +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = major_axis_pixels; +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->major_axis_pixels = _tmp2_; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 6377 "PicasaPublishing.c" +} + + +static PublishingPicasaPublishingOptionsPaneSizeDescription* publishing_picasa_publishing_options_pane_size_description_new (const gchar* name, gint major_axis_pixels) { +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_publishing_options_pane_size_description_construct (PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION, name, major_axis_pixels); +#line 6384 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_value_size_description_init (GValue* value) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6391 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_value_size_description_free_value (GValue* value) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (value->data[0].v_pointer) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_size_description_unref (value->data[0].v_pointer); +#line 6400 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_publishing_options_pane_value_size_description_copy_value (const GValue* src_value, GValue* dest_value) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = publishing_picasa_publishing_options_pane_size_description_ref (src_value->data[0].v_pointer); +#line 6410 "PicasaPublishing.c" + } else { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 6414 "PicasaPublishing.c" + } +} + + +static gpointer publishing_picasa_publishing_options_pane_value_size_description_peek_pointer (const GValue* value) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 6422 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_publishing_options_pane_value_size_description_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (collect_values[0].v_pointer) { +#line 6429 "PicasaPublishing.c" + PublishingPicasaPublishingOptionsPaneSizeDescription* object; + object = collect_values[0].v_pointer; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 6436 "PicasaPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 6440 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = publishing_picasa_publishing_options_pane_size_description_ref (object); +#line 6444 "PicasaPublishing.c" + } else { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6448 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 6452 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_publishing_options_pane_value_size_description_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPicasaPublishingOptionsPaneSizeDescription** object_p; + object_p = collect_values[0].v_pointer; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!object_p) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 6463 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!value->data[0].v_pointer) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = NULL; +#line 6469 "PicasaPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 6473 "PicasaPublishing.c" + } else { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = publishing_picasa_publishing_options_pane_size_description_ref (value->data[0].v_pointer); +#line 6477 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 6481 "PicasaPublishing.c" +} + + +static GParamSpec* publishing_picasa_publishing_options_pane_param_spec_size_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPicasaPublishingOptionsPaneParamSpecSizeDescription* spec; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION), NULL); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return G_PARAM_SPEC (spec); +#line 6495 "PicasaPublishing.c" +} + + +static gpointer publishing_picasa_publishing_options_pane_value_get_size_description (const GValue* value) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION), NULL); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 6504 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_value_set_size_description (GValue* value, gpointer v_object) { + PublishingPicasaPublishingOptionsPaneSizeDescription* old; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_size_description_ref (value->data[0].v_pointer); +#line 6524 "PicasaPublishing.c" + } else { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6528 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_size_description_unref (old); +#line 6534 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_publishing_options_pane_value_take_size_description (GValue* value, gpointer v_object) { + PublishingPicasaPublishingOptionsPaneSizeDescription* old; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION)); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 6553 "PicasaPublishing.c" + } else { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 6557 "PicasaPublishing.c" + } +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_size_description_unref (old); +#line 6563 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_publishing_options_pane_size_description_class_init (PublishingPicasaPublishingOptionsPaneSizeDescriptionClass * klass) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_size_description_parent_class = g_type_class_peek_parent (klass); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingPicasaPublishingOptionsPaneSizeDescriptionClass *) klass)->finalize = publishing_picasa_publishing_options_pane_size_description_finalize; +#line 6573 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_size_description_instance_init (PublishingPicasaPublishingOptionsPaneSizeDescription * self) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->ref_count = 1; +#line 6580 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_size_description_finalize (PublishingPicasaPublishingOptionsPaneSizeDescription* obj) { + PublishingPicasaPublishingOptionsPaneSizeDescription * self; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_TYPE_SIZE_DESCRIPTION, PublishingPicasaPublishingOptionsPaneSizeDescription); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_destroy (self); +#line 604 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->name); +#line 6592 "PicasaPublishing.c" +} + + +static GType publishing_picasa_publishing_options_pane_size_description_get_type (void) { + static volatile gsize publishing_picasa_publishing_options_pane_size_description_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_publishing_options_pane_size_description_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_picasa_publishing_options_pane_value_size_description_init, publishing_picasa_publishing_options_pane_value_size_description_free_value, publishing_picasa_publishing_options_pane_value_size_description_copy_value, publishing_picasa_publishing_options_pane_value_size_description_peek_pointer, "p", publishing_picasa_publishing_options_pane_value_size_description_collect_value, "p", publishing_picasa_publishing_options_pane_value_size_description_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaPublishingOptionsPaneSizeDescriptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_publishing_options_pane_size_description_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaPublishingOptionsPaneSizeDescription), 0, (GInstanceInitFunc) publishing_picasa_publishing_options_pane_size_description_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_picasa_publishing_options_pane_size_description_type_id; + publishing_picasa_publishing_options_pane_size_description_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPicasaPublishingOptionsPaneSizeDescription", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_picasa_publishing_options_pane_size_description_type_id__volatile, publishing_picasa_publishing_options_pane_size_description_type_id); + } + return publishing_picasa_publishing_options_pane_size_description_type_id__volatile; +} + + +static gpointer publishing_picasa_publishing_options_pane_size_description_ref (gpointer instance) { + PublishingPicasaPublishingOptionsPaneSizeDescription* self; + self = instance; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return instance; +#line 6617 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_size_description_unref (gpointer instance) { + PublishingPicasaPublishingOptionsPaneSizeDescription* self; + self = instance; +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_SIZE_DESCRIPTION_GET_CLASS (self)->finalize (self); +#line 603 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 6630 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_publishing_options_pane_class_init (PublishingPicasaPublishingOptionsPaneClass * klass) { +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPicasaPublishingOptionsPanePrivate)); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_picasa_publishing_options_pane_finalize; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_new ("publish", PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_new ("logout", PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 6646 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_picasa_publishing_options_pane_real_get_widget; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_picasa_publishing_options_pane_real_get_preferred_geometry; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_picasa_publishing_options_pane_real_on_pane_installed; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_picasa_publishing_options_pane_real_on_pane_uninstalled; +#line 6661 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_instance_init (PublishingPicasaPublishingOptionsPane * self) { +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv = PUBLISHING_PICASA_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->builder = NULL; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->pane_widget = NULL; +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->login_identity_label = NULL; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publish_to_label = NULL; +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->use_existing_radio = NULL; +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->existing_albums_combo = NULL; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->create_new_radio = NULL; +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->new_album_entry = NULL; +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->public_check = NULL; +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_combo = NULL; +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->strip_metadata_check = NULL; +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->publish_button = NULL; +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->logout_button = NULL; +#line 6694 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_options_pane_finalize (GObject* obj) { + PublishingPicasaPublishingOptionsPane * self; +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPicasaPublishingOptionsPane); +#line 616 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->login_identity_label); +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publish_to_label); +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 621 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->existing_albums_combo); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->new_album_entry); +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->public_check); +#line 625 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 629 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->size_descriptions = (_vala_array_free (self->priv->size_descriptions, self->priv->size_descriptions_length1, (GDestroyNotify) publishing_picasa_publishing_options_pane_size_description_unref), NULL); +#line 630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_OBJECT_CLASS (publishing_picasa_publishing_options_pane_parent_class)->finalize (obj); +#line 6734 "PicasaPublishing.c" +} + + +GType publishing_picasa_publishing_options_pane_get_type (void) { + static volatile gsize publishing_picasa_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_picasa_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_picasa_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_picasa_publishing_options_pane_type_id; + publishing_picasa_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingPicasaPublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_picasa_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_picasa_publishing_options_pane_type_id__volatile, publishing_picasa_publishing_options_pane_type_id); + } + return publishing_picasa_publishing_options_pane_type_id__volatile; +} + + +PublishingPicasaPublishingParameters* publishing_picasa_publishing_parameters_construct (GType object_type) { + PublishingPicasaPublishingParameters* self = NULL; + gchar* _tmp0_ = NULL; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaPublishingParameters*) g_type_create_instance (object_type); +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = g_strdup ("[unknown]"); +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->user_name); +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->user_name = _tmp0_; +#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_name); +#line 823 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->target_album_name = NULL; +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->major_axis_size_selection_id = 0; +#line 825 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->major_axis_size_pixels = PUBLISHING_PICASA_PUBLISHING_PARAMETERS_ORIGINAL_SIZE; +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_url); +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->target_album_url = NULL; +#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->album_public = FALSE; +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums = (_vala_array_free (self->priv->albums, self->priv->albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums = NULL; +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums_length1 = 0; +#line 828 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->_albums_size_ = self->priv->albums_length1; +#line 829 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->strip_metadata = FALSE; +#line 830 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->media_type = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO; +#line 831 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->to_new_album = TRUE; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 6793 "PicasaPublishing.c" +} + + +PublishingPicasaPublishingParameters* publishing_picasa_publishing_parameters_new (void) { +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_publishing_parameters_construct (PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS); +#line 6800 "PicasaPublishing.c" +} + + +gboolean publishing_picasa_publishing_parameters_is_to_new_album (PublishingPicasaPublishingParameters* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), FALSE); +#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->to_new_album; +#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6815 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_is_to_new_album (PublishingPicasaPublishingParameters* self, gboolean to_new_album) { + gboolean _tmp0_ = FALSE; +#line 838 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 839 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = to_new_album; +#line 839 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->to_new_album = _tmp0_; +#line 6827 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_is_new_album_public (PublishingPicasaPublishingParameters* self, gboolean album_public) { + gboolean _tmp0_ = FALSE; +#line 842 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = album_public; +#line 843 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->album_public = _tmp0_; +#line 6839 "PicasaPublishing.c" +} + + +gboolean publishing_picasa_publishing_parameters_is_new_album_public (PublishingPicasaPublishingParameters* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 846 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), FALSE); +#line 847 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->album_public; +#line 847 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 847 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6854 "PicasaPublishing.c" +} + + +gchar* publishing_picasa_publishing_parameters_get_target_album_name (PublishingPicasaPublishingParameters* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 850 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->target_album_name; +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp1_; +#line 851 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6872 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_target_album_name (PublishingPicasaPublishingParameters* self, const gchar* target_album_name) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (target_album_name != NULL); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = target_album_name; +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_name); +#line 855 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->target_album_name = _tmp1_; +#line 6891 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_target_album_entry_url (PublishingPicasaPublishingParameters* self, const gchar* target_album_url) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 858 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (target_album_url != NULL); +#line 859 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = target_album_url; +#line 859 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 859 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_url); +#line 859 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->target_album_url = _tmp1_; +#line 6910 "PicasaPublishing.c" +} + + +gchar* publishing_picasa_publishing_parameters_get_target_album_entry_url (PublishingPicasaPublishingParameters* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 862 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->target_album_url; +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp1_; +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 6928 "PicasaPublishing.c" +} + + +static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { + gchar* result = NULL; + GError * _inner_error_ = NULL; +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (old != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (replacement != NULL, NULL); +#line 6941 "PicasaPublishing.c" + { + GRegex* regex = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + GRegex* _tmp3_ = NULL; + GRegex* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + GRegex* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = old; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = g_regex_escape_string (_tmp0_, -1); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp2_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + regex = _tmp4_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 6972 "PicasaPublishing.c" + goto __catch15_g_regex_error; + } +#line 1382 "/usr/share/vala-0.32/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 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 6981 "PicasaPublishing.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = regex; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = replacement; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 6997 "PicasaPublishing.c" + goto __catch15_g_regex_error; + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/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 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 7008 "PicasaPublishing.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = _tmp5_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = NULL; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp9_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp5_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 7022 "PicasaPublishing.c" + } + goto __finally15; + __catch15_g_regex_error: + { + GError* e = NULL; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + e = _inner_error_; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _inner_error_ = NULL; +#line 1385 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_assert_not_reached (); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_error_free0 (e); +#line 7036 "PicasaPublishing.c" + } + __finally15: +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1381 "/usr/share/vala-0.32/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 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 7047 "PicasaPublishing.c" + } +} + + +gchar* publishing_picasa_publishing_parameters_get_target_album_feed_url (PublishingPicasaPublishingParameters* self) { + gchar* result = NULL; + gchar* entry_url = NULL; + gchar* _tmp0_ = NULL; + gchar* feed_url = NULL; + gchar* _tmp1_ = NULL; +#line 866 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_picasa_publishing_parameters_get_target_album_entry_url (self); +#line 867 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + entry_url = _tmp0_; +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = string_replace (entry_url, "entry", "feed"); +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + feed_url = _tmp1_; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = feed_url; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (entry_url); +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7074 "PicasaPublishing.c" +} + + +gchar* publishing_picasa_publishing_parameters_get_user_name (PublishingPicasaPublishingParameters* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 873 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->user_name; +#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp1_; +#line 874 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7092 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_user_name (PublishingPicasaPublishingParameters* self, const gchar* user_name) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (user_name != NULL); +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = user_name; +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->user_name); +#line 878 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->user_name = _tmp1_; +#line 7111 "PicasaPublishing.c" +} + + +static gpointer _publishing_picasa_album_ref0 (gpointer self) { +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self ? publishing_picasa_album_ref (self) : NULL; +#line 7118 "PicasaPublishing.c" +} + + +static PublishingPicasaAlbum** _vala_array_dup5 (PublishingPicasaAlbum** self, int length) { + PublishingPicasaAlbum** result; + int i; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = g_new0 (PublishingPicasaAlbum*, length + 1); +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + for (i = 0; i < length; i++) { +#line 7129 "PicasaPublishing.c" + PublishingPicasaAlbum* _tmp0_ = NULL; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = _publishing_picasa_album_ref0 (self[i]); +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result[i] = _tmp0_; +#line 7135 "PicasaPublishing.c" + } +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7139 "PicasaPublishing.c" +} + + +PublishingPicasaAlbum** publishing_picasa_publishing_parameters_get_albums (PublishingPicasaPublishingParameters* self, int* result_length1) { + PublishingPicasaAlbum** result = NULL; + PublishingPicasaAlbum** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingPicasaAlbum** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingPicasaAlbum** _tmp2_ = NULL; + gint _tmp2__length1 = 0; +#line 881 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->albums; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0__length1 = self->priv->albums_length1; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup5 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1__length1 = _tmp0__length1; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = _tmp1_; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2__length1 = _tmp1__length1; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (result_length1) { +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *result_length1 = _tmp2__length1; +#line 7169 "PicasaPublishing.c" + } +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp2_; +#line 882 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7175 "PicasaPublishing.c" +} + + +static PublishingPicasaAlbum** _vala_array_dup6 (PublishingPicasaAlbum** self, int length) { + PublishingPicasaAlbum** result; + int i; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = g_new0 (PublishingPicasaAlbum*, length + 1); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + for (i = 0; i < length; i++) { +#line 7186 "PicasaPublishing.c" + PublishingPicasaAlbum* _tmp0_ = NULL; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = _publishing_picasa_album_ref0 (self[i]); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result[i] = _tmp0_; +#line 7192 "PicasaPublishing.c" + } +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7196 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_albums (PublishingPicasaPublishingParameters* self, PublishingPicasaAlbum** albums, int albums_length1) { + PublishingPicasaAlbum** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingPicasaAlbum** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 885 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = albums; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0__length1 = albums_length1; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup6 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1__length1 = _tmp0__length1; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums = (_vala_array_free (self->priv->albums, self->priv->albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums = _tmp1_; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums_length1 = _tmp1__length1; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->_albums_size_ = self->priv->albums_length1; +#line 7223 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_major_axis_size_pixels (PublishingPicasaPublishingParameters* self, gint pixels) { + gint _tmp0_ = 0; +#line 889 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = pixels; +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->major_axis_size_pixels = _tmp0_; +#line 7235 "PicasaPublishing.c" +} + + +gint publishing_picasa_publishing_parameters_get_major_axis_size_pixels (PublishingPicasaPublishingParameters* self) { + gint result = 0; + gint _tmp0_ = 0; +#line 893 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), 0); +#line 894 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->major_axis_size_pixels; +#line 894 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 894 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7250 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_major_axis_size_selection_id (PublishingPicasaPublishingParameters* self, gint selection_id) { + gint _tmp0_ = 0; +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = selection_id; +#line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->major_axis_size_selection_id = _tmp0_; +#line 7262 "PicasaPublishing.c" +} + + +gint publishing_picasa_publishing_parameters_get_major_axis_size_selection_id (PublishingPicasaPublishingParameters* self) { + gint result = 0; + gint _tmp0_ = 0; +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), 0); +#line 902 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->major_axis_size_selection_id; +#line 902 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 902 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7277 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_strip_metadata (PublishingPicasaPublishingParameters* self, gboolean strip_metadata) { + gboolean _tmp0_ = FALSE; +#line 905 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = strip_metadata; +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->strip_metadata = _tmp0_; +#line 7289 "PicasaPublishing.c" +} + + +gboolean publishing_picasa_publishing_parameters_get_strip_metadata (PublishingPicasaPublishingParameters* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), FALSE); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->strip_metadata; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7304 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_set_media_type (PublishingPicasaPublishingParameters* self, SpitPublishingPublisherMediaType media_type) { + SpitPublishingPublisherMediaType _tmp0_ = 0; +#line 913 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self)); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = media_type; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->media_type = _tmp0_; +#line 7316 "PicasaPublishing.c" +} + + +SpitPublishingPublisherMediaType publishing_picasa_publishing_parameters_get_media_type (PublishingPicasaPublishingParameters* self) { + SpitPublishingPublisherMediaType result = 0; + SpitPublishingPublisherMediaType _tmp0_ = 0; +#line 917 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (self), 0); +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = self->priv->media_type; +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp0_; +#line 918 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7331 "PicasaPublishing.c" +} + + +static void publishing_picasa_value_publishing_parameters_init (GValue* value) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 7338 "PicasaPublishing.c" +} + + +static void publishing_picasa_value_publishing_parameters_free_value (GValue* value) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (value->data[0].v_pointer) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_unref (value->data[0].v_pointer); +#line 7347 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = publishing_picasa_publishing_parameters_ref (src_value->data[0].v_pointer); +#line 7357 "PicasaPublishing.c" + } else { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 7361 "PicasaPublishing.c" + } +} + + +static gpointer publishing_picasa_value_publishing_parameters_peek_pointer (const GValue* value) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 7369 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (collect_values[0].v_pointer) { +#line 7376 "PicasaPublishing.c" + PublishingPicasaPublishingParameters* object; + object = collect_values[0].v_pointer; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 7383 "PicasaPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.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 7387 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = publishing_picasa_publishing_parameters_ref (object); +#line 7391 "PicasaPublishing.c" + } else { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 7395 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 7399 "PicasaPublishing.c" +} + + +static gchar* publishing_picasa_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPicasaPublishingParameters** object_p; + object_p = collect_values[0].v_pointer; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!object_p) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 7410 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (!value->data[0].v_pointer) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = NULL; +#line 7416 "PicasaPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 7420 "PicasaPublishing.c" + } else { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + *object_p = publishing_picasa_publishing_parameters_ref (value->data[0].v_pointer); +#line 7424 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return NULL; +#line 7428 "PicasaPublishing.c" +} + + +GParamSpec* publishing_picasa_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPicasaParamSpecPublishingParameters* spec; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return G_PARAM_SPEC (spec); +#line 7442 "PicasaPublishing.c" +} + + +gpointer publishing_picasa_value_get_publishing_parameters (const GValue* value) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return value->data[0].v_pointer; +#line 7451 "PicasaPublishing.c" +} + + +void publishing_picasa_value_set_publishing_parameters (GValue* value, gpointer v_object) { + PublishingPicasaPublishingParameters* old; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_ref (value->data[0].v_pointer); +#line 7471 "PicasaPublishing.c" + } else { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 7475 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_unref (old); +#line 7481 "PicasaPublishing.c" + } +} + + +void publishing_picasa_value_take_publishing_parameters (GValue* value, gpointer v_object) { + PublishingPicasaPublishingParameters* old; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + old = value->data[0].v_pointer; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (v_object) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS)); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = v_object; +#line 7500 "PicasaPublishing.c" + } else { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + value->data[0].v_pointer = NULL; +#line 7504 "PicasaPublishing.c" + } +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (old) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_unref (old); +#line 7510 "PicasaPublishing.c" + } +} + + +static void publishing_picasa_publishing_parameters_class_init (PublishingPicasaPublishingParametersClass * klass) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_publishing_parameters_parent_class = g_type_class_peek_parent (klass); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingPicasaPublishingParametersClass *) klass)->finalize = publishing_picasa_publishing_parameters_finalize; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPicasaPublishingParametersPrivate)); +#line 7522 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_parameters_instance_init (PublishingPicasaPublishingParameters * self) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv = PUBLISHING_PICASA_PUBLISHING_PARAMETERS_GET_PRIVATE (self); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->ref_count = 1; +#line 7531 "PicasaPublishing.c" +} + + +static void publishing_picasa_publishing_parameters_finalize (PublishingPicasaPublishingParameters* obj) { + PublishingPicasaPublishingParameters * self; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_PUBLISHING_PARAMETERS, PublishingPicasaPublishingParameters); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_signal_handlers_destroy (self); +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_name); +#line 811 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->target_album_url); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_free0 (self->priv->user_name); +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->albums = (_vala_array_free (self->priv->albums, self->priv->albums_length1, (GDestroyNotify) publishing_picasa_album_unref), NULL); +#line 7549 "PicasaPublishing.c" +} + + +GType publishing_picasa_publishing_parameters_get_type (void) { + static volatile gsize publishing_picasa_publishing_parameters_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_publishing_parameters_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_picasa_value_publishing_parameters_init, publishing_picasa_value_publishing_parameters_free_value, publishing_picasa_value_publishing_parameters_copy_value, publishing_picasa_value_publishing_parameters_peek_pointer, "p", publishing_picasa_value_publishing_parameters_collect_value, "p", publishing_picasa_value_publishing_parameters_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaPublishingParametersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_publishing_parameters_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaPublishingParameters), 0, (GInstanceInitFunc) publishing_picasa_publishing_parameters_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_picasa_publishing_parameters_type_id; + publishing_picasa_publishing_parameters_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPicasaPublishingParameters", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_picasa_publishing_parameters_type_id__volatile, publishing_picasa_publishing_parameters_type_id); + } + return publishing_picasa_publishing_parameters_type_id__volatile; +} + + +gpointer publishing_picasa_publishing_parameters_ref (gpointer instance) { + PublishingPicasaPublishingParameters* self; + self = instance; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return instance; +#line 7574 "PicasaPublishing.c" +} + + +void publishing_picasa_publishing_parameters_unref (gpointer instance) { + PublishingPicasaPublishingParameters* self; + self = instance; +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + PUBLISHING_PICASA_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); +#line 807 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 7587 "PicasaPublishing.c" + } +} + + +PublishingPicasaUploader* publishing_picasa_uploader_construct (GType object_type, PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPicasaPublishingParameters* parameters) { + PublishingPicasaUploader* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + PublishingPicasaPublishingParameters* _tmp3_ = NULL; +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (PUBLISHING_PICASA_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = session; +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = publishables; +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1__length1 = publishables_length1; +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = (PublishingPicasaUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = parameters; +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = _publishing_picasa_publishing_parameters_ref0 (_tmp2_); +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 929 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv->parameters = _tmp3_; +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return self; +#line 7621 "PicasaPublishing.c" +} + + +PublishingPicasaUploader* publishing_picasa_uploader_new (PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPicasaPublishingParameters* parameters) { +#line 925 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return publishing_picasa_uploader_construct (PUBLISHING_PICASA_TYPE_UPLOADER, session, publishables, publishables_length1, parameters); +#line 7628 "PicasaPublishing.c" +} + + +static PublishingRESTSupportTransaction* publishing_picasa_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { + PublishingPicasaUploader * self; + PublishingRESTSupportTransaction* result = NULL; + PublishingRESTSupportSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + PublishingPicasaPublishingParameters* _tmp2_ = NULL; + SpitPublishingPublishable* _tmp3_ = NULL; + SpitPublishingPublishable* _tmp4_ = NULL; + PublishingPicasaUploadTransaction* _tmp5_ = NULL; + PublishingRESTSupportTransaction* _tmp6_ = NULL; +#line 932 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploader); +#line 932 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp0_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp2_ = self->priv->parameters; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp3_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp4_ = _tmp3_; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp5_ = publishing_picasa_upload_transaction_new (_tmp1_, _tmp2_, _tmp4_); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _g_object_unref0 (_tmp4_); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + result = _tmp6_; +#line 934 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + return result; +#line 7668 "PicasaPublishing.c" +} + + +static void publishing_picasa_uploader_class_init (PublishingPicasaUploaderClass * klass) { +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + publishing_picasa_uploader_parent_class = g_type_class_peek_parent (klass); +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_picasa_uploader_finalize; +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPicasaUploaderPrivate)); +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = publishing_picasa_uploader_real_create_transaction; +#line 7681 "PicasaPublishing.c" +} + + +static void publishing_picasa_uploader_instance_init (PublishingPicasaUploader * self) { +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self->priv = PUBLISHING_PICASA_UPLOADER_GET_PRIVATE (self); +#line 7688 "PicasaPublishing.c" +} + + +static void publishing_picasa_uploader_finalize (PublishingRESTSupportBatchUploader* obj) { + PublishingPicasaUploader * self; +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PICASA_TYPE_UPLOADER, PublishingPicasaUploader); +#line 923 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + _publishing_picasa_publishing_parameters_unref0 (self->priv->parameters); +#line 922 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PicasaPublishing.vala" + PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_picasa_uploader_parent_class)->finalize (obj); +#line 7700 "PicasaPublishing.c" +} + + +GType publishing_picasa_uploader_get_type (void) { + static volatile gsize publishing_picasa_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_picasa_uploader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPicasaUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_picasa_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPicasaUploader), 0, (GInstanceInitFunc) publishing_picasa_uploader_instance_init, NULL }; + GType publishing_picasa_uploader_type_id; + publishing_picasa_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingPicasaUploader", &g_define_type_info, 0); + g_once_init_leave (&publishing_picasa_uploader_type_id__volatile, publishing_picasa_uploader_type_id); + } + return publishing_picasa_uploader_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + +static gint _vala_array_length (gpointer array) { + int length; + length = 0; + if (array) { + while (((gpointer*) array)[length]) { + length++; + } + } + return length; +} + + + diff --git a/plugins/shotwell-publishing/PicasaPublishing.vala b/plugins/shotwell-publishing/PicasaPublishing.vala index cb6352c..a393c08 100644 --- a/plugins/shotwell-publishing/PicasaPublishing.vala +++ b/plugins/shotwell-publishing/PicasaPublishing.vala @@ -11,7 +11,8 @@ public class PicasaService : Object, Spit.Pluggable, Spit.Publishing.Service { public PicasaService(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = + Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { @@ -351,9 +352,8 @@ public class PicasaPublisher : Publishing.RESTSupport.GooglePublisher { try { // the trailing get_path() is required, since add_from_file can't cope // with File objects directly and expects a pathname instead. - builder.add_from_file( - get_host().get_module_file().get_parent(). - get_child("picasa_publishing_options_pane.glade").get_path()); + builder.add_from_resource(Resources.RESOURCE_PATH + "/" + + "picasa_publishing_options_pane.ui"); } catch (Error e) { warning("Could not parse UI file! Error: %s.", e.message); get_host().post_error( diff --git a/plugins/shotwell-publishing/PiwigoPublishing.c b/plugins/shotwell-publishing/PiwigoPublishing.c new file mode 100644 index 0000000..6b684ba --- /dev/null +++ b/plugins/shotwell-publishing/PiwigoPublishing.c @@ -0,0 +1,11929 @@ +/* PiwigoPublishing.c generated by valac 0.32.1, the Vala compiler + * generated from PiwigoPublishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include "shotwell-plugin-common.h" +#include <glib/gi18n-lib.h> +#include <gtk/gtk.h> +#include <libxml/tree.h> +#include <float.h> +#include <math.h> +#include <libsoup/soup.h> +#include <gobject/gvaluecollector.h> + + +#define TYPE_PIWIGO_SERVICE (piwigo_service_get_type ()) +#define PIWIGO_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIWIGO_SERVICE, PiwigoService)) +#define PIWIGO_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIWIGO_SERVICE, PiwigoServiceClass)) +#define IS_PIWIGO_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIWIGO_SERVICE)) +#define IS_PIWIGO_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIWIGO_SERVICE)) +#define PIWIGO_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIWIGO_SERVICE, PiwigoServiceClass)) + +typedef struct _PiwigoService PiwigoService; +typedef struct _PiwigoServiceClass PiwigoServiceClass; +typedef struct _PiwigoServicePrivate PiwigoServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER (publishing_piwigo_piwigo_publisher_get_type ()) +#define PUBLISHING_PIWIGO_PIWIGO_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher)) +#define PUBLISHING_PIWIGO_PIWIGO_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisherClass)) +#define PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER)) +#define PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER)) +#define PUBLISHING_PIWIGO_PIWIGO_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisherClass)) + +typedef struct _PublishingPiwigoPiwigoPublisher PublishingPiwigoPiwigoPublisher; +typedef struct _PublishingPiwigoPiwigoPublisherClass PublishingPiwigoPiwigoPublisherClass; + +#define PUBLISHING_PIWIGO_TYPE_CATEGORY (publishing_piwigo_category_get_type ()) +#define PUBLISHING_PIWIGO_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORY, PublishingPiwigoCategory)) +#define PUBLISHING_PIWIGO_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORY, PublishingPiwigoCategoryClass)) +#define PUBLISHING_PIWIGO_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORY)) +#define PUBLISHING_PIWIGO_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORY)) +#define PUBLISHING_PIWIGO_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORY, PublishingPiwigoCategoryClass)) + +typedef struct _PublishingPiwigoCategory PublishingPiwigoCategory; +typedef struct _PublishingPiwigoCategoryClass PublishingPiwigoCategoryClass; +typedef struct _PublishingPiwigoCategoryPrivate PublishingPiwigoCategoryPrivate; +typedef struct _PublishingPiwigoParamSpecCategory PublishingPiwigoParamSpecCategory; + +#define PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL (publishing_piwigo_permission_level_get_type ()) +#define PUBLISHING_PIWIGO_PERMISSION_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL, PublishingPiwigoPermissionLevel)) +#define PUBLISHING_PIWIGO_PERMISSION_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL, PublishingPiwigoPermissionLevelClass)) +#define PUBLISHING_PIWIGO_IS_PERMISSION_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)) +#define PUBLISHING_PIWIGO_IS_PERMISSION_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)) +#define PUBLISHING_PIWIGO_PERMISSION_LEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL, PublishingPiwigoPermissionLevelClass)) + +typedef struct _PublishingPiwigoPermissionLevel PublishingPiwigoPermissionLevel; +typedef struct _PublishingPiwigoPermissionLevelClass PublishingPiwigoPermissionLevelClass; +typedef struct _PublishingPiwigoPermissionLevelPrivate PublishingPiwigoPermissionLevelPrivate; +typedef struct _PublishingPiwigoParamSpecPermissionLevel PublishingPiwigoParamSpecPermissionLevel; + +#define PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY (publishing_piwigo_size_entry_get_type ()) +#define PUBLISHING_PIWIGO_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY, PublishingPiwigoSizeEntry)) +#define PUBLISHING_PIWIGO_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY, PublishingPiwigoSizeEntryClass)) +#define PUBLISHING_PIWIGO_IS_SIZE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)) +#define PUBLISHING_PIWIGO_IS_SIZE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)) +#define PUBLISHING_PIWIGO_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY, PublishingPiwigoSizeEntryClass)) + +typedef struct _PublishingPiwigoSizeEntry PublishingPiwigoSizeEntry; +typedef struct _PublishingPiwigoSizeEntryClass PublishingPiwigoSizeEntryClass; +typedef struct _PublishingPiwigoSizeEntryPrivate PublishingPiwigoSizeEntryPrivate; +typedef struct _PublishingPiwigoParamSpecSizeEntry PublishingPiwigoParamSpecSizeEntry; + +#define PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS (publishing_piwigo_publishing_parameters_get_type ()) +#define PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS, PublishingPiwigoPublishingParameters)) +#define PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS, PublishingPiwigoPublishingParametersClass)) +#define PUBLISHING_PIWIGO_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_PIWIGO_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS, PublishingPiwigoPublishingParametersClass)) + +typedef struct _PublishingPiwigoPublishingParameters PublishingPiwigoPublishingParameters; +typedef struct _PublishingPiwigoPublishingParametersClass PublishingPiwigoPublishingParametersClass; +typedef struct _PublishingPiwigoPublishingParametersPrivate PublishingPiwigoPublishingParametersPrivate; +#define _publishing_piwigo_category_unref0(var) ((var == NULL) ? NULL : (var = (publishing_piwigo_category_unref (var), NULL))) +#define _publishing_piwigo_permission_level_unref0(var) ((var == NULL) ? NULL : (var = (publishing_piwigo_permission_level_unref (var), NULL))) +#define _publishing_piwigo_size_entry_unref0(var) ((var == NULL) ? NULL : (var = (publishing_piwigo_size_entry_unref (var), NULL))) +typedef struct _PublishingPiwigoParamSpecPublishingParameters PublishingPiwigoParamSpecPublishingParameters; +typedef struct _PublishingPiwigoPiwigoPublisherPrivate PublishingPiwigoPiwigoPublisherPrivate; + +#define PUBLISHING_PIWIGO_TYPE_SESSION (publishing_piwigo_session_get_type ()) +#define PUBLISHING_PIWIGO_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSession)) +#define PUBLISHING_PIWIGO_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSessionClass)) +#define PUBLISHING_PIWIGO_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_SESSION)) +#define PUBLISHING_PIWIGO_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_SESSION)) +#define PUBLISHING_PIWIGO_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSessionClass)) + +typedef struct _PublishingPiwigoSession PublishingPiwigoSession; +typedef struct _PublishingPiwigoSessionClass PublishingPiwigoSessionClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) +#define _publishing_piwigo_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_piwigo_publishing_parameters_unref (var), NULL))) + +#define PUBLISHING_PIWIGO_AUTHENTICATION_PANE_TYPE_MODE (publishing_piwigo_authentication_pane_mode_get_type ()) + +#define PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE (publishing_piwigo_authentication_pane_get_type ()) +#define PUBLISHING_PIWIGO_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane)) +#define PUBLISHING_PIWIGO_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPaneClass)) +#define PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE)) +#define PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE)) +#define PUBLISHING_PIWIGO_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPaneClass)) + +typedef struct _PublishingPiwigoAuthenticationPane PublishingPiwigoAuthenticationPane; +typedef struct _PublishingPiwigoAuthenticationPaneClass PublishingPiwigoAuthenticationPaneClass; + +#define PUBLISHING_PIWIGO_TYPE_TRANSACTION (publishing_piwigo_transaction_get_type ()) +#define PUBLISHING_PIWIGO_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_TRANSACTION, PublishingPiwigoTransaction)) +#define PUBLISHING_PIWIGO_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_TRANSACTION, PublishingPiwigoTransactionClass)) +#define PUBLISHING_PIWIGO_IS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_TRANSACTION)) +#define PUBLISHING_PIWIGO_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_TRANSACTION, PublishingPiwigoTransactionClass)) + +typedef struct _PublishingPiwigoTransaction PublishingPiwigoTransaction; +typedef struct _PublishingPiwigoTransactionClass PublishingPiwigoTransactionClass; + +#define PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION (publishing_piwigo_session_login_transaction_get_type ()) +#define PUBLISHING_PIWIGO_SESSION_LOGIN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, PublishingPiwigoSessionLoginTransaction)) +#define PUBLISHING_PIWIGO_SESSION_LOGIN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, PublishingPiwigoSessionLoginTransactionClass)) +#define PUBLISHING_PIWIGO_IS_SESSION_LOGIN_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_SESSION_LOGIN_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION)) +#define PUBLISHING_PIWIGO_SESSION_LOGIN_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, PublishingPiwigoSessionLoginTransactionClass)) + +typedef struct _PublishingPiwigoSessionLoginTransaction PublishingPiwigoSessionLoginTransaction; +typedef struct _PublishingPiwigoSessionLoginTransactionClass PublishingPiwigoSessionLoginTransactionClass; +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _publishing_rest_support_xml_document_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_xml_document_unref (var), NULL))) + +#define PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION (publishing_piwigo_session_get_status_transaction_get_type ()) +#define PUBLISHING_PIWIGO_SESSION_GET_STATUS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, PublishingPiwigoSessionGetStatusTransaction)) +#define PUBLISHING_PIWIGO_SESSION_GET_STATUS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, PublishingPiwigoSessionGetStatusTransactionClass)) +#define PUBLISHING_PIWIGO_IS_SESSION_GET_STATUS_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_SESSION_GET_STATUS_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION)) +#define PUBLISHING_PIWIGO_SESSION_GET_STATUS_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, PublishingPiwigoSessionGetStatusTransactionClass)) + +typedef struct _PublishingPiwigoSessionGetStatusTransaction PublishingPiwigoSessionGetStatusTransaction; +typedef struct _PublishingPiwigoSessionGetStatusTransactionClass PublishingPiwigoSessionGetStatusTransactionClass; + +#define PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION (publishing_piwigo_categories_get_list_transaction_get_type ()) +#define PUBLISHING_PIWIGO_CATEGORIES_GET_LIST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION, PublishingPiwigoCategoriesGetListTransaction)) +#define PUBLISHING_PIWIGO_CATEGORIES_GET_LIST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION, PublishingPiwigoCategoriesGetListTransactionClass)) +#define PUBLISHING_PIWIGO_IS_CATEGORIES_GET_LIST_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_CATEGORIES_GET_LIST_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION)) +#define PUBLISHING_PIWIGO_CATEGORIES_GET_LIST_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION, PublishingPiwigoCategoriesGetListTransactionClass)) + +typedef struct _PublishingPiwigoCategoriesGetListTransaction PublishingPiwigoCategoriesGetListTransaction; +typedef struct _PublishingPiwigoCategoriesGetListTransactionClass PublishingPiwigoCategoriesGetListTransactionClass; +#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) + +#define PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE (publishing_piwigo_publishing_options_pane_get_type ()) +#define PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane)) +#define PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPaneClass)) +#define PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPaneClass)) + +typedef struct _PublishingPiwigoPublishingOptionsPane PublishingPiwigoPublishingOptionsPane; +typedef struct _PublishingPiwigoPublishingOptionsPaneClass PublishingPiwigoPublishingOptionsPaneClass; + +#define PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION (publishing_piwigo_session_logout_transaction_get_type ()) +#define PUBLISHING_PIWIGO_SESSION_LOGOUT_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION, PublishingPiwigoSessionLogoutTransaction)) +#define PUBLISHING_PIWIGO_SESSION_LOGOUT_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION, PublishingPiwigoSessionLogoutTransactionClass)) +#define PUBLISHING_PIWIGO_IS_SESSION_LOGOUT_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_SESSION_LOGOUT_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION)) +#define PUBLISHING_PIWIGO_SESSION_LOGOUT_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION, PublishingPiwigoSessionLogoutTransactionClass)) + +typedef struct _PublishingPiwigoSessionLogoutTransaction PublishingPiwigoSessionLogoutTransaction; +typedef struct _PublishingPiwigoSessionLogoutTransactionClass PublishingPiwigoSessionLogoutTransactionClass; + +#define PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION (publishing_piwigo_categories_add_transaction_get_type ()) +#define PUBLISHING_PIWIGO_CATEGORIES_ADD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION, PublishingPiwigoCategoriesAddTransaction)) +#define PUBLISHING_PIWIGO_CATEGORIES_ADD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION, PublishingPiwigoCategoriesAddTransactionClass)) +#define PUBLISHING_PIWIGO_IS_CATEGORIES_ADD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_CATEGORIES_ADD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION)) +#define PUBLISHING_PIWIGO_CATEGORIES_ADD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION, PublishingPiwigoCategoriesAddTransactionClass)) + +typedef struct _PublishingPiwigoCategoriesAddTransaction PublishingPiwigoCategoriesAddTransaction; +typedef struct _PublishingPiwigoCategoriesAddTransactionClass PublishingPiwigoCategoriesAddTransactionClass; + +#define PUBLISHING_PIWIGO_TYPE_UPLOADER (publishing_piwigo_uploader_get_type ()) +#define PUBLISHING_PIWIGO_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploader)) +#define PUBLISHING_PIWIGO_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploaderClass)) +#define PUBLISHING_PIWIGO_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_UPLOADER)) +#define PUBLISHING_PIWIGO_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_UPLOADER)) +#define PUBLISHING_PIWIGO_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploaderClass)) + +typedef struct _PublishingPiwigoUploader PublishingPiwigoUploader; +typedef struct _PublishingPiwigoUploaderClass PublishingPiwigoUploaderClass; +#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) +#define __vala_SoupCookie_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupCookie_free (var), NULL))) +#define __g_slist_free___vala_SoupCookie_free0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free___vala_SoupCookie_free0_ (var), NULL))) +typedef struct _PublishingPiwigoUploaderPrivate PublishingPiwigoUploaderPrivate; + +#define PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION (publishing_piwigo_images_add_transaction_get_type ()) +#define PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, PublishingPiwigoImagesAddTransaction)) +#define PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, PublishingPiwigoImagesAddTransactionClass)) +#define PUBLISHING_PIWIGO_IS_IMAGES_ADD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION)) +#define PUBLISHING_PIWIGO_IS_IMAGES_ADD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION)) +#define PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, PublishingPiwigoImagesAddTransactionClass)) + +typedef struct _PublishingPiwigoImagesAddTransaction PublishingPiwigoImagesAddTransaction; +typedef struct _PublishingPiwigoImagesAddTransactionClass PublishingPiwigoImagesAddTransactionClass; +typedef struct _PublishingPiwigoAuthenticationPanePrivate PublishingPiwigoAuthenticationPanePrivate; +typedef struct _PublishingPiwigoPublishingOptionsPanePrivate PublishingPiwigoPublishingOptionsPanePrivate; +typedef struct _PublishingPiwigoSessionPrivate PublishingPiwigoSessionPrivate; +typedef struct _PublishingPiwigoTransactionPrivate PublishingPiwigoTransactionPrivate; +typedef struct _PublishingPiwigoSessionLoginTransactionPrivate PublishingPiwigoSessionLoginTransactionPrivate; +typedef struct _PublishingPiwigoSessionGetStatusTransactionPrivate PublishingPiwigoSessionGetStatusTransactionPrivate; +typedef struct _PublishingPiwigoCategoriesGetListTransactionPrivate PublishingPiwigoCategoriesGetListTransactionPrivate; +typedef struct _PublishingPiwigoSessionLogoutTransactionPrivate PublishingPiwigoSessionLogoutTransactionPrivate; +typedef struct _PublishingPiwigoCategoriesAddTransactionPrivate PublishingPiwigoCategoriesAddTransactionPrivate; +typedef struct _PublishingPiwigoImagesAddTransactionPrivate PublishingPiwigoImagesAddTransactionPrivate; +#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _PiwigoService { + GObject parent_instance; + PiwigoServicePrivate * priv; +}; + +struct _PiwigoServiceClass { + GObjectClass parent_class; +}; + +struct _PublishingPiwigoCategory { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPiwigoCategoryPrivate * priv; + gint id; + gchar* name; + gchar* comment; + gchar* display_name; + gchar* uppercats; +}; + +struct _PublishingPiwigoCategoryClass { + GTypeClass parent_class; + void (*finalize) (PublishingPiwigoCategory *self); +}; + +struct _PublishingPiwigoParamSpecCategory { + GParamSpec parent_instance; +}; + +struct _PublishingPiwigoPermissionLevel { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPiwigoPermissionLevelPrivate * priv; + gint id; + gchar* name; +}; + +struct _PublishingPiwigoPermissionLevelClass { + GTypeClass parent_class; + void (*finalize) (PublishingPiwigoPermissionLevel *self); +}; + +struct _PublishingPiwigoParamSpecPermissionLevel { + GParamSpec parent_instance; +}; + +struct _PublishingPiwigoSizeEntry { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPiwigoSizeEntryPrivate * priv; + gint id; + gchar* name; +}; + +struct _PublishingPiwigoSizeEntryClass { + GTypeClass parent_class; + void (*finalize) (PublishingPiwigoSizeEntry *self); +}; + +struct _PublishingPiwigoParamSpecSizeEntry { + GParamSpec parent_instance; +}; + +struct _PublishingPiwigoPublishingParameters { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingPiwigoPublishingParametersPrivate * priv; + PublishingPiwigoCategory* category; + PublishingPiwigoPermissionLevel* perm_level; + PublishingPiwigoSizeEntry* photo_size; + gboolean title_as_comment; + gboolean no_upload_tags; +}; + +struct _PublishingPiwigoPublishingParametersClass { + GTypeClass parent_class; + void (*finalize) (PublishingPiwigoPublishingParameters *self); +}; + +struct _PublishingPiwigoParamSpecPublishingParameters { + GParamSpec parent_instance; +}; + +struct _PublishingPiwigoPiwigoPublisher { + GObject parent_instance; + PublishingPiwigoPiwigoPublisherPrivate * priv; +}; + +struct _PublishingPiwigoPiwigoPublisherClass { + GObjectClass parent_class; +}; + +struct _PublishingPiwigoPiwigoPublisherPrivate { + SpitPublishingService* service; + SpitPublishingPluginHost* host; + gboolean running; + gboolean strip_metadata; + PublishingPiwigoSession* session; + PublishingPiwigoCategory** categories; + gint categories_length1; + gint _categories_size_; + PublishingPiwigoPublishingParameters* parameters; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; +}; + +typedef enum { + PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO, + PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL, + PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER +} PublishingPiwigoAuthenticationPaneMode; + +struct _PublishingPiwigoUploader { + PublishingRESTSupportBatchUploader parent_instance; + PublishingPiwigoUploaderPrivate * priv; +}; + +struct _PublishingPiwigoUploaderClass { + PublishingRESTSupportBatchUploaderClass parent_class; +}; + +struct _PublishingPiwigoUploaderPrivate { + PublishingPiwigoPublishingParameters* parameters; +}; + +struct _PublishingPiwigoAuthenticationPane { + GObject parent_instance; + PublishingPiwigoAuthenticationPanePrivate * priv; +}; + +struct _PublishingPiwigoAuthenticationPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingPiwigoAuthenticationPanePrivate { + GtkBox* pane_widget; + GtkBuilder* builder; + GtkEntry* url_entry; + GtkEntry* username_entry; + GtkEntry* password_entry; + GtkCheckButton* remember_password_checkbutton; + GtkButton* login_button; +}; + +struct _PublishingPiwigoPublishingOptionsPane { + GObject parent_instance; + PublishingPiwigoPublishingOptionsPanePrivate * priv; +}; + +struct _PublishingPiwigoPublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingPiwigoPublishingOptionsPanePrivate { + GtkBox* pane_widget; + GtkBuilder* builder; + GtkRadioButton* use_existing_radio; + GtkRadioButton* create_new_radio; + GtkComboBoxText* existing_categories_combo; + GtkEntry* new_category_entry; + GtkLabel* within_existing_label; + GtkComboBoxText* within_existing_combo; + GtkComboBoxText* perms_combo; + GtkComboBoxText* size_combo; + GtkCheckButton* strip_metadata_check; + GtkCheckButton* title_as_comment_check; + GtkCheckButton* no_upload_tags_check; + GtkButton* logout_button; + GtkButton* publish_button; + GtkTextView* album_comment; + GtkLabel* album_comment_label; + PublishingPiwigoCategory** existing_categories; + gint existing_categories_length1; + gint _existing_categories_size_; + PublishingPiwigoPermissionLevel** perm_levels; + gint perm_levels_length1; + gint _perm_levels_size_; + PublishingPiwigoSizeEntry** photo_sizes; + gint photo_sizes_length1; + gint _photo_sizes_size_; + gint last_category; + gint last_permission_level; + gint last_photo_size; + gboolean last_title_as_comment; + gboolean last_no_upload_tags; +}; + +struct _PublishingPiwigoSession { + PublishingRESTSupportSession parent_instance; + PublishingPiwigoSessionPrivate * priv; +}; + +struct _PublishingPiwigoSessionClass { + PublishingRESTSupportSessionClass parent_class; +}; + +struct _PublishingPiwigoSessionPrivate { + gchar* pwg_url; + gchar* pwg_id; + gchar* username; +}; + +struct _PublishingPiwigoTransaction { + PublishingRESTSupportTransaction parent_instance; + PublishingPiwigoTransactionPrivate * priv; +}; + +struct _PublishingPiwigoTransactionClass { + PublishingRESTSupportTransactionClass parent_class; +}; + +struct _PublishingPiwigoSessionLoginTransaction { + PublishingPiwigoTransaction parent_instance; + PublishingPiwigoSessionLoginTransactionPrivate * priv; +}; + +struct _PublishingPiwigoSessionLoginTransactionClass { + PublishingPiwigoTransactionClass parent_class; +}; + +struct _PublishingPiwigoSessionGetStatusTransaction { + PublishingPiwigoTransaction parent_instance; + PublishingPiwigoSessionGetStatusTransactionPrivate * priv; +}; + +struct _PublishingPiwigoSessionGetStatusTransactionClass { + PublishingPiwigoTransactionClass parent_class; +}; + +struct _PublishingPiwigoCategoriesGetListTransaction { + PublishingPiwigoTransaction parent_instance; + PublishingPiwigoCategoriesGetListTransactionPrivate * priv; +}; + +struct _PublishingPiwigoCategoriesGetListTransactionClass { + PublishingPiwigoTransactionClass parent_class; +}; + +struct _PublishingPiwigoSessionLogoutTransaction { + PublishingPiwigoTransaction parent_instance; + PublishingPiwigoSessionLogoutTransactionPrivate * priv; +}; + +struct _PublishingPiwigoSessionLogoutTransactionClass { + PublishingPiwigoTransactionClass parent_class; +}; + +struct _PublishingPiwigoCategoriesAddTransaction { + PublishingPiwigoTransaction parent_instance; + PublishingPiwigoCategoriesAddTransactionPrivate * priv; +}; + +struct _PublishingPiwigoCategoriesAddTransactionClass { + PublishingPiwigoTransactionClass parent_class; +}; + +struct _PublishingPiwigoImagesAddTransaction { + PublishingRESTSupportUploadTransaction parent_instance; + PublishingPiwigoImagesAddTransactionPrivate * priv; +}; + +struct _PublishingPiwigoImagesAddTransactionClass { + PublishingRESTSupportUploadTransactionClass parent_class; +}; + +struct _PublishingPiwigoImagesAddTransactionPrivate { + PublishingPiwigoPublishingParameters* parameters; +}; + + +static gpointer piwigo_service_parent_class = NULL; +static GdkPixbuf** piwigo_service_icon_pixbuf_set; +static gint piwigo_service_icon_pixbuf_set_length1; +static GdkPixbuf** piwigo_service_icon_pixbuf_set = NULL; +static gint piwigo_service_icon_pixbuf_set_length1 = 0; +static gint _piwigo_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* piwigo_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface* piwigo_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_piwigo_category_parent_class = NULL; +static gpointer publishing_piwigo_permission_level_parent_class = NULL; +static gpointer publishing_piwigo_size_entry_parent_class = NULL; +static gpointer publishing_piwigo_publishing_parameters_parent_class = NULL; +static gpointer publishing_piwigo_piwigo_publisher_parent_class = NULL; +static SpitPublishingPublisherIface* publishing_piwigo_piwigo_publisher_spit_publishing_publisher_parent_iface = NULL; +static gpointer publishing_piwigo_uploader_parent_class = NULL; +static gpointer publishing_piwigo_authentication_pane_parent_class = NULL; +static gchar* publishing_piwigo_authentication_pane_INTRO_MESSAGE; +static gchar* publishing_piwigo_authentication_pane_INTRO_MESSAGE = NULL; +static gchar* publishing_piwigo_authentication_pane_FAILED_RETRY_URL_MESSAGE; +static gchar* publishing_piwigo_authentication_pane_FAILED_RETRY_URL_MESSAGE = NULL; +static gchar* publishing_piwigo_authentication_pane_FAILED_RETRY_USER_MESSAGE; +static gchar* publishing_piwigo_authentication_pane_FAILED_RETRY_USER_MESSAGE = NULL; +static SpitPublishingDialogPaneIface* publishing_piwigo_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_piwigo_publishing_options_pane_parent_class = NULL; +static gchar* publishing_piwigo_publishing_options_pane_DEFAULT_CATEGORY_NAME; +static gchar* publishing_piwigo_publishing_options_pane_DEFAULT_CATEGORY_NAME = NULL; +static SpitPublishingDialogPaneIface* publishing_piwigo_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_piwigo_session_parent_class = NULL; +static gpointer publishing_piwigo_transaction_parent_class = NULL; +static gpointer publishing_piwigo_session_login_transaction_parent_class = NULL; +static gpointer publishing_piwigo_session_get_status_transaction_parent_class = NULL; +static gpointer publishing_piwigo_categories_get_list_transaction_parent_class = NULL; +static gpointer publishing_piwigo_session_logout_transaction_parent_class = NULL; +static gpointer publishing_piwigo_categories_add_transaction_parent_class = NULL; +static gpointer publishing_piwigo_images_add_transaction_parent_class = NULL; + +GType piwigo_service_get_type (void) G_GNUC_CONST; +enum { + PIWIGO_SERVICE_DUMMY_PROPERTY +}; +#define PIWIGO_SERVICE_ICON_FILENAME "piwigo.png" +PiwigoService* piwigo_service_new (GFile* resource_directory); +PiwigoService* piwigo_service_construct (GType object_type, GFile* resource_directory); +static gint piwigo_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* piwigo_service_real_get_id (SpitPluggable* base); +static const gchar* piwigo_service_real_get_pluggable_name (SpitPluggable* base); +static void piwigo_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup10 (GdkPixbuf** self, int length); +static void piwigo_service_real_activation (SpitPluggable* base, gboolean enabled); +static SpitPublishingPublisher* piwigo_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingPiwigoPiwigoPublisher* publishing_piwigo_piwigo_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingPiwigoPiwigoPublisher* publishing_piwigo_piwigo_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_piwigo_piwigo_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType piwigo_service_real_get_supported_media (SpitPublishingService* base); +static void piwigo_service_finalize (GObject* obj); +#define PUBLISHING_PIWIGO_SERVICE_NAME "Piwigo" +#define PUBLISHING_PIWIGO_PIWIGO_WS "ws.php" +#define PUBLISHING_PIWIGO_ORIGINAL_SIZE -1 +gpointer publishing_piwigo_category_ref (gpointer instance); +void publishing_piwigo_category_unref (gpointer instance); +GParamSpec* publishing_piwigo_param_spec_category (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_piwigo_value_set_category (GValue* value, gpointer v_object); +void publishing_piwigo_value_take_category (GValue* value, gpointer v_object); +gpointer publishing_piwigo_value_get_category (const GValue* value); +GType publishing_piwigo_category_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_PIWIGO_CATEGORY_DUMMY_PROPERTY +}; +#define PUBLISHING_PIWIGO_CATEGORY_NO_ID -1 +PublishingPiwigoCategory* publishing_piwigo_category_new (gint id, const gchar* name, const gchar* uppercats, const gchar* comment); +PublishingPiwigoCategory* publishing_piwigo_category_construct (GType object_type, gint id, const gchar* name, const gchar* uppercats, const gchar* comment); +PublishingPiwigoCategory* publishing_piwigo_category_new_local (const gchar* name, gint parent_id, const gchar* comment); +PublishingPiwigoCategory* publishing_piwigo_category_construct_local (GType object_type, const gchar* name, gint parent_id, const gchar* comment); +gboolean publishing_piwigo_category_is_local (PublishingPiwigoCategory* self); +static void publishing_piwigo_category_finalize (PublishingPiwigoCategory* obj); +gpointer publishing_piwigo_permission_level_ref (gpointer instance); +void publishing_piwigo_permission_level_unref (gpointer instance); +GParamSpec* publishing_piwigo_param_spec_permission_level (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_piwigo_value_set_permission_level (GValue* value, gpointer v_object); +void publishing_piwigo_value_take_permission_level (GValue* value, gpointer v_object); +gpointer publishing_piwigo_value_get_permission_level (const GValue* value); +GType publishing_piwigo_permission_level_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_PIWIGO_PERMISSION_LEVEL_DUMMY_PROPERTY +}; +PublishingPiwigoPermissionLevel* publishing_piwigo_permission_level_new (gint id, const gchar* name); +PublishingPiwigoPermissionLevel* publishing_piwigo_permission_level_construct (GType object_type, gint id, const gchar* name); +static void publishing_piwigo_permission_level_finalize (PublishingPiwigoPermissionLevel* obj); +gpointer publishing_piwigo_size_entry_ref (gpointer instance); +void publishing_piwigo_size_entry_unref (gpointer instance); +GParamSpec* publishing_piwigo_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_piwigo_value_set_size_entry (GValue* value, gpointer v_object); +void publishing_piwigo_value_take_size_entry (GValue* value, gpointer v_object); +gpointer publishing_piwigo_value_get_size_entry (const GValue* value); +GType publishing_piwigo_size_entry_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_PIWIGO_SIZE_ENTRY_DUMMY_PROPERTY +}; +PublishingPiwigoSizeEntry* publishing_piwigo_size_entry_new (gint id, const gchar* name); +PublishingPiwigoSizeEntry* publishing_piwigo_size_entry_construct (GType object_type, gint id, const gchar* name); +static void publishing_piwigo_size_entry_finalize (PublishingPiwigoSizeEntry* obj); +gpointer publishing_piwigo_publishing_parameters_ref (gpointer instance); +void publishing_piwigo_publishing_parameters_unref (gpointer instance); +GParamSpec* publishing_piwigo_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_piwigo_value_set_publishing_parameters (GValue* value, gpointer v_object); +void publishing_piwigo_value_take_publishing_parameters (GValue* value, gpointer v_object); +gpointer publishing_piwigo_value_get_publishing_parameters (const GValue* value); +GType publishing_piwigo_publishing_parameters_get_type (void) G_GNUC_CONST; +enum { + PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_DUMMY_PROPERTY +}; +PublishingPiwigoPublishingParameters* publishing_piwigo_publishing_parameters_new (void); +PublishingPiwigoPublishingParameters* publishing_piwigo_publishing_parameters_construct (GType object_type); +static void publishing_piwigo_publishing_parameters_finalize (PublishingPiwigoPublishingParameters* obj); +GType publishing_piwigo_session_get_type (void) G_GNUC_CONST; +#define PUBLISHING_PIWIGO_PIWIGO_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisherPrivate)) +enum { + PUBLISHING_PIWIGO_PIWIGO_PUBLISHER_DUMMY_PROPERTY +}; +PublishingPiwigoSession* publishing_piwigo_session_new (void); +PublishingPiwigoSession* publishing_piwigo_session_construct (GType object_type); +static SpitPublishingService* publishing_piwigo_piwigo_publisher_real_get_service (SpitPublishingPublisher* base); +SpitPublishingPluginHost* publishing_piwigo_piwigo_publisher_get_host (PublishingPiwigoPiwigoPublisher* self); +static gboolean publishing_piwigo_piwigo_publisher_real_is_running (SpitPublishingPublisher* base); +static void publishing_piwigo_piwigo_publisher_real_start (SpitPublishingPublisher* base); +static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPiwigoPiwigoPublisher* self); +gchar* publishing_piwigo_piwigo_publisher_get_persistent_url (PublishingPiwigoPiwigoPublisher* self); +gchar* publishing_piwigo_piwigo_publisher_get_persistent_username (PublishingPiwigoPiwigoPublisher* self); +gchar* publishing_piwigo_piwigo_publisher_get_persistent_password (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_do_network_login (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* username, const gchar* password, gboolean remember_password); +gboolean publishing_piwigo_piwigo_publisher_get_remember_password (PublishingPiwigoPiwigoPublisher* self); +GType publishing_piwigo_authentication_pane_mode_get_type (void) G_GNUC_CONST; +static void publishing_piwigo_piwigo_publisher_do_show_authentication_pane (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoAuthenticationPaneMode mode); +static void publishing_piwigo_piwigo_publisher_real_stop (SpitPublishingPublisher* base); +static void publishing_piwigo_piwigo_publisher_set_persistent_url (PublishingPiwigoPiwigoPublisher* self, const gchar* url); +static void publishing_piwigo_piwigo_publisher_set_persistent_username (PublishingPiwigoPiwigoPublisher* self, const gchar* username); +static void publishing_piwigo_piwigo_publisher_set_persistent_password (PublishingPiwigoPiwigoPublisher* self, const gchar* password); +static void publishing_piwigo_piwigo_publisher_set_remember_password (PublishingPiwigoPiwigoPublisher* self, gboolean remember_password); +gint publishing_piwigo_piwigo_publisher_get_last_category (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_last_category (PublishingPiwigoPiwigoPublisher* self, gint last_category); +gint publishing_piwigo_piwigo_publisher_get_last_permission_level (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_last_permission_level (PublishingPiwigoPiwigoPublisher* self, gint last_permission_level); +gint publishing_piwigo_piwigo_publisher_get_last_photo_size (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_last_photo_size (PublishingPiwigoPiwigoPublisher* self, gint last_photo_size); +static gboolean publishing_piwigo_piwigo_publisher_get_last_title_as_comment (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_last_title_as_comment (PublishingPiwigoPiwigoPublisher* self, gboolean title_as_comment); +static gboolean publishing_piwigo_piwigo_publisher_get_last_no_upload_tags (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_last_no_upload_tags (PublishingPiwigoPiwigoPublisher* self, gboolean no_upload_tags); +static gboolean publishing_piwigo_piwigo_publisher_get_metadata_removal_choice (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_set_metadata_removal_choice (PublishingPiwigoPiwigoPublisher* self, gboolean strip_metadata); +GType publishing_piwigo_authentication_pane_get_type (void) G_GNUC_CONST; +PublishingPiwigoAuthenticationPane* publishing_piwigo_authentication_pane_new (PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoAuthenticationPaneMode mode); +PublishingPiwigoAuthenticationPane* publishing_piwigo_authentication_pane_construct (GType object_type, PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoAuthenticationPaneMode mode); +static void publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* username, const gchar* password, gboolean remember_password); +static void _publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked_publishing_piwigo_authentication_pane_login (PublishingPiwigoAuthenticationPane* _sender, const gchar* url, const gchar* user, const gchar* password, gboolean remember_password, gpointer self); +GtkWidget* publishing_piwigo_authentication_pane_get_default_widget (PublishingPiwigoAuthenticationPane* self); +GType publishing_piwigo_transaction_get_type (void) G_GNUC_CONST; +GType publishing_piwigo_session_login_transaction_get_type (void) G_GNUC_CONST; +gchar* publishing_piwigo_piwigo_publisher_normalise_url (const gchar* url); +PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_new (PublishingPiwigoSession* session, const gchar* url, const gchar* username, const gchar* password); +PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_construct (GType object_type, PublishingPiwigoSession* session, const gchar* url, const gchar* username, const gchar* password); +static void publishing_piwigo_piwigo_publisher_on_login_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_login_network_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_login_network_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_piwigo_piwigo_publisher_on_login_network_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_piwigo_piwigo_publisher_do_show_error (PublishingPiwigoPiwigoPublisher* self, GError* e); +gchar* publishing_piwigo_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc); +static gchar* _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); +gchar* publishing_piwigo_transaction_get_error_code (PublishingRESTSupportXmlDocument* doc); +static gchar* _publishing_piwigo_transaction_get_error_code_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); +static gchar* publishing_piwigo_piwigo_publisher_get_pwg_id_from_transaction (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +void publishing_piwigo_session_set_pwg_id (PublishingPiwigoSession* self, const gchar* id); +static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* pwg_id); +GType publishing_piwigo_session_get_status_transaction_get_type (void) G_GNUC_CONST; +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new_unauthenticated (PublishingPiwigoSession* session, const gchar* url, const gchar* pwg_id); +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_construct_unauthenticated (GType object_type, PublishingPiwigoSession* session, const gchar* url, const gchar* pwg_id); +static void publishing_piwigo_piwigo_publisher_on_session_get_status_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new (PublishingPiwigoSession* session); +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_construct (GType object_type, PublishingPiwigoSession* session); +gchar* publishing_piwigo_session_get_pwg_id (PublishingPiwigoSession* self); +void publishing_piwigo_session_authenticate (PublishingPiwigoSession* self, const gchar* url, const gchar* username, const gchar* id); +gchar* publishing_piwigo_session_get_pwg_url (PublishingPiwigoSession* self); +gchar* publishing_piwigo_session_get_username (PublishingPiwigoSession* self); +static void publishing_piwigo_piwigo_publisher_on_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +GType publishing_piwigo_categories_get_list_transaction_get_type (void) G_GNUC_CONST; +PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_list_transaction_new (PublishingPiwigoSession* session); +PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_list_transaction_construct (GType object_type, PublishingPiwigoSession* session); +static void publishing_piwigo_piwigo_publisher_on_category_fetch_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void _vala_array_add34 (PublishingPiwigoCategory*** array, int* length, int* size, PublishingPiwigoCategory* value); +static void publishing_piwigo_piwigo_publisher_do_show_publishing_options_pane (PublishingPiwigoPiwigoPublisher* self); +GType publishing_piwigo_publishing_options_pane_get_type (void) G_GNUC_CONST; +PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane_new (PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoCategory** categories, int categories_length1, gint last_category, gint last_permission_level, gint last_photo_size, gboolean last_title_as_comment, gboolean last_no_upload_tags, gboolean strip_metadata_enabled); +PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane_construct (GType object_type, PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoCategory** categories, int categories_length1, gint last_category, gint last_permission_level, gint last_photo_size, gboolean last_title_as_comment, gboolean last_no_upload_tags, gboolean strip_metadata_enabled); +static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked (PublishingPiwigoPiwigoPublisher* self); +static void _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked_publishing_piwigo_publishing_options_pane_logout (PublishingPiwigoPublishingOptionsPane* _sender, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoPublishingParameters* parameters, gboolean strip_metadata); +static void _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked_publishing_piwigo_publishing_options_pane_publish (PublishingPiwigoPublishingOptionsPane* _sender, PublishingPiwigoPublishingParameters* parameters, gboolean strip_metadata, gpointer self); +GtkWidget* publishing_piwigo_publishing_options_pane_get_default_widget (PublishingPiwigoPublishingOptionsPane* self); +GType publishing_piwigo_session_logout_transaction_get_type (void) G_GNUC_CONST; +PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_transaction_new (PublishingPiwigoSession* session); +PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_transaction_construct (GType object_type, PublishingPiwigoSession* session); +static void publishing_piwigo_piwigo_publisher_on_logout_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_logout_network_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_logout_network_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_piwigo_piwigo_publisher_on_logout_network_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +void publishing_piwigo_session_deauthenticate (PublishingPiwigoSession* self); +static void publishing_piwigo_piwigo_publisher_do_create_category (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoCategory* category); +static void publishing_piwigo_piwigo_publisher_do_upload (PublishingPiwigoPiwigoPublisher* self, gboolean strip_metadata); +GType publishing_piwigo_categories_add_transaction_get_type (void) G_GNUC_CONST; +PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_transaction_new (PublishingPiwigoSession* session, const gchar* category, gint parent_id, const gchar* comment); +PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_transaction_construct (GType object_type, PublishingPiwigoSession* session, const gchar* category, gint parent_id, const gchar* comment); +static void publishing_piwigo_piwigo_publisher_on_category_add_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_category_add_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_category_add_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_piwigo_piwigo_publisher_on_category_add_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +GType publishing_piwigo_uploader_get_type (void) G_GNUC_CONST; +PublishingPiwigoUploader* publishing_piwigo_uploader_new (PublishingPiwigoSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPiwigoPublishingParameters* parameters); +PublishingPiwigoUploader* publishing_piwigo_uploader_construct (GType object_type, PublishingPiwigoSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPiwigoPublishingParameters* parameters); +static void publishing_piwigo_piwigo_publisher_on_upload_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); +static void _publishing_piwigo_piwigo_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_upload_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); +static void _publishing_piwigo_piwigo_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); +static void publishing_piwigo_piwigo_publisher_on_upload_status_updated (PublishingPiwigoPiwigoPublisher* self, gint file_number, gdouble completed_fraction); +static void _publishing_piwigo_piwigo_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +static void publishing_piwigo_piwigo_publisher_do_show_success_pane (PublishingPiwigoPiwigoPublisher* self); +static void publishing_piwigo_piwigo_publisher_do_show_error_message (PublishingPiwigoPiwigoPublisher* self, const gchar* message); +static SoupCookie* _vala_SoupCookie_copy (SoupCookie* self); +static void _vala_SoupCookie_free (SoupCookie* self); +static void __vala_SoupCookie_free0_ (gpointer var); +static void _g_slist_free___vala_SoupCookie_free0_ (GSList* self); +static void publishing_piwigo_piwigo_publisher_finalize (GObject* obj); +#define PUBLISHING_PIWIGO_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploaderPrivate)) +enum { + PUBLISHING_PIWIGO_UPLOADER_DUMMY_PROPERTY +}; +static PublishingRESTSupportTransaction* publishing_piwigo_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); +PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_new (PublishingPiwigoSession* session, PublishingPiwigoPublishingParameters* parameters, SpitPublishingPublishable* publishable); +PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_construct (GType object_type, PublishingPiwigoSession* session, PublishingPiwigoPublishingParameters* parameters, SpitPublishingPublishable* publishable); +GType publishing_piwigo_images_add_transaction_get_type (void) G_GNUC_CONST; +static void publishing_piwigo_uploader_finalize (PublishingRESTSupportBatchUploader* obj); +#define PUBLISHING_PIWIGO_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPanePrivate)) +enum { + PUBLISHING_PIWIGO_AUTHENTICATION_PANE_DUMMY_PROPERTY +}; +static void publishing_piwigo_authentication_pane_on_user_changed (PublishingPiwigoAuthenticationPane* self); +static void _publishing_piwigo_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_piwigo_authentication_pane_on_url_changed (PublishingPiwigoAuthenticationPane* self); +static void _publishing_piwigo_authentication_pane_on_url_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_piwigo_authentication_pane_on_password_changed (PublishingPiwigoAuthenticationPane* self); +static void _publishing_piwigo_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_piwigo_authentication_pane_on_login_button_clicked (PublishingPiwigoAuthenticationPane* self); +static void _publishing_piwigo_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_piwigo_authentication_pane_update_login_button_sensitivity (PublishingPiwigoAuthenticationPane* self); +static GtkWidget* publishing_piwigo_authentication_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_piwigo_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_piwigo_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_piwigo_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void publishing_piwigo_authentication_pane_finalize (GObject* obj); +#define PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPanePrivate)) +enum { + PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +static void publishing_piwigo_publishing_options_pane_on_logout_button_clicked (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_piwigo_publishing_options_pane_on_publish_button_clicked (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_piwigo_publishing_options_pane_on_new_category_entry_changed (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_new_category_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self); +static void publishing_piwigo_publishing_options_pane_on_existing_combo_changed (PublishingPiwigoPublishingOptionsPane* self); +static void _publishing_piwigo_publishing_options_pane_on_existing_combo_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static PublishingPiwigoCategory** _vala_array_dup11 (PublishingPiwigoCategory** self, int length); +static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pane_create_perm_levels (PublishingPiwigoPublishingOptionsPane* self, int* result_length1); +static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_create_sizes (PublishingPiwigoPublishingOptionsPane* self, int* result_length1); +static gchar* publishing_piwigo_publishing_options_pane_get_common_comment_if_possible (PublishingPiwigoPublishingOptionsPane* self, PublishingPiwigoPiwigoPublisher* publisher); +static void _vala_array_add35 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add36 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add37 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add38 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add39 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value); +static void _vala_array_add40 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add41 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add42 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add43 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void _vala_array_add44 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value); +static void publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (PublishingPiwigoPublishingOptionsPane* self); +static gboolean publishing_piwigo_publishing_options_pane_category_already_exists (PublishingPiwigoPublishingOptionsPane* self, const gchar* category_name); +static GtkWidget* publishing_piwigo_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_piwigo_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_piwigo_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_piwigo_publishing_options_pane_create_categories_combo (PublishingPiwigoPublishingOptionsPane* self); +static void publishing_piwigo_publishing_options_pane_create_within_categories_combo (PublishingPiwigoPublishingOptionsPane* self); +static void publishing_piwigo_publishing_options_pane_create_permissions_combo (PublishingPiwigoPublishingOptionsPane* self); +static void publishing_piwigo_publishing_options_pane_create_size_combo (PublishingPiwigoPublishingOptionsPane* self); +static gint publishing_piwigo_publishing_options_pane_find_category_index (PublishingPiwigoPublishingOptionsPane* self, gint category_id); +static gint publishing_piwigo_publishing_options_pane_find_permission_level_index (PublishingPiwigoPublishingOptionsPane* self, gint permission_level_id); +static gint publishing_piwigo_publishing_options_pane_find_size_index (PublishingPiwigoPublishingOptionsPane* self, gint size_id); +static void publishing_piwigo_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +static void g_cclosure_user_marshal_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void publishing_piwigo_publishing_options_pane_finalize (GObject* obj); +#define PUBLISHING_PIWIGO_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSessionPrivate)) +enum { + PUBLISHING_PIWIGO_SESSION_DUMMY_PROPERTY +}; +static gboolean publishing_piwigo_session_real_is_authenticated (PublishingRESTSupportSession* base); +static void publishing_piwigo_session_finalize (PublishingRESTSupportSession* obj); +enum { + PUBLISHING_PIWIGO_TRANSACTION_DUMMY_PROPERTY +}; +PublishingPiwigoTransaction* publishing_piwigo_transaction_new (PublishingPiwigoSession* session); +PublishingPiwigoTransaction* publishing_piwigo_transaction_construct (GType object_type, PublishingPiwigoSession* session); +PublishingPiwigoTransaction* publishing_piwigo_transaction_new_authenticated (PublishingPiwigoSession* session); +PublishingPiwigoTransaction* publishing_piwigo_transaction_construct_authenticated (GType object_type, PublishingPiwigoSession* session); +enum { + PUBLISHING_PIWIGO_SESSION_LOGIN_TRANSACTION_DUMMY_PROPERTY +}; +enum { + PUBLISHING_PIWIGO_SESSION_GET_STATUS_TRANSACTION_DUMMY_PROPERTY +}; +enum { + PUBLISHING_PIWIGO_CATEGORIES_GET_LIST_TRANSACTION_DUMMY_PROPERTY +}; +enum { + PUBLISHING_PIWIGO_SESSION_LOGOUT_TRANSACTION_DUMMY_PROPERTY +}; +enum { + PUBLISHING_PIWIGO_CATEGORIES_ADD_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, PublishingPiwigoImagesAddTransactionPrivate)) +enum { + PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_DUMMY_PROPERTY +}; +static void _g_free0_ (gpointer var); +static void publishing_piwigo_images_add_transaction_finalize (PublishingRESTSupportTransaction* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static gint _vala_array_length (gpointer array); + + +PiwigoService* piwigo_service_construct (GType object_type, GFile* resource_directory) { + PiwigoService * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PiwigoService*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = piwigo_service_icon_pixbuf_set; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0__length1 = piwigo_service_icon_pixbuf_set_length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp0_ == NULL) { +#line 874 "PiwigoPublishing.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" PIWIGO_SERVICE_ICON_FILENAME, &_tmp1_); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_icon_pixbuf_set = (_vala_array_free (piwigo_service_icon_pixbuf_set, piwigo_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_icon_pixbuf_set = _tmp2_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_icon_pixbuf_set_length1 = _tmp1_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _piwigo_service_icon_pixbuf_set_size_ = piwigo_service_icon_pixbuf_set_length1; +#line 887 "PiwigoPublishing.c" + } +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 891 "PiwigoPublishing.c" +} + + +PiwigoService* piwigo_service_new (GFile* resource_directory) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return piwigo_service_construct (TYPE_PIWIGO_SERVICE, resource_directory); +#line 898 "PiwigoPublishing.c" +} + + +static gint piwigo_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + PiwigoService * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = min_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = max_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp2_; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 920 "PiwigoPublishing.c" +} + + +static const gchar* piwigo_service_real_get_id (SpitPluggable* base) { + PiwigoService * self; + const gchar* result = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = "org.yorba.shotwell.publishing.piwigo"; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 933 "PiwigoPublishing.c" +} + + +static const gchar* piwigo_service_real_get_pluggable_name (SpitPluggable* base) { + PiwigoService * self; + const gchar* result = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = "Piwigo"; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 946 "PiwigoPublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 953 "PiwigoPublishing.c" +} + + +static GdkPixbuf** _vala_array_dup10 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (i = 0; i < length; i++) { +#line 964 "PiwigoPublishing.c" + GdkPixbuf* _tmp0_ = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result[i] = _tmp0_; +#line 970 "PiwigoPublishing.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 974 "PiwigoPublishing.c" +} + + +static void piwigo_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + PiwigoService * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (info != NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = g_strdup ("Bruno Girin"); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).authors); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).authors = _tmp0_; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _ ("Copyright 2016 Software Freedom Conservancy Inc."); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).copyright); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).copyright = _tmp2_; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).translators); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).translators = _tmp3_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = g_strdup (_VERSION); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).version); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).version = _tmp4_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).website_name); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).website_name = _tmp5_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).website_url); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).website_url = _tmp6_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 ((*info).license); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).license = _tmp7_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = piwigo_service_icon_pixbuf_set; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8__length1 = piwigo_service_icon_pixbuf_set_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup10 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).icons = _tmp9_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*info).icons_length1 = _tmp9__length1; +#line 1056 "PiwigoPublishing.c" +} + + +static void piwigo_service_real_activation (SpitPluggable* base, gboolean enabled) { + PiwigoService * self; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 1064 "PiwigoPublishing.c" +} + + +static SpitPublishingPublisher* piwigo_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + PiwigoService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingPiwigoPiwigoPublisher* _tmp1_ = NULL; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = host; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_piwigo_piwigo_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 1085 "PiwigoPublishing.c" +} + + +static SpitPublishingPublisherMediaType piwigo_service_real_get_supported_media (SpitPublishingService* base) { + PiwigoService * self; + SpitPublishingPublisherMediaType result = 0; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_PHOTO; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 1098 "PiwigoPublishing.c" +} + + +static void piwigo_service_class_init (PiwigoServiceClass * klass) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = piwigo_service_finalize; +#line 1107 "PiwigoPublishing.c" +} + + +static void piwigo_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) piwigo_service_real_get_pluggable_interface; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) piwigo_service_real_get_id; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) piwigo_service_real_get_pluggable_name; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) piwigo_service_real_get_info; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) piwigo_service_real_activation; +#line 1124 "PiwigoPublishing.c" +} + + +static void piwigo_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + piwigo_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*)(SpitPublishingService*, SpitPublishingPluginHost*)) piwigo_service_real_create_publisher; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*)(SpitPublishingService*)) piwigo_service_real_get_supported_media; +#line 1135 "PiwigoPublishing.c" +} + + +static void piwigo_service_instance_init (PiwigoService * self) { +} + + +static void piwigo_service_finalize (GObject* obj) { + PiwigoService * self; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PIWIGO_SERVICE, PiwigoService); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (piwigo_service_parent_class)->finalize (obj); +#line 1149 "PiwigoPublishing.c" +} + + +GType piwigo_service_get_type (void) { + static volatile gsize piwigo_service_type_id__volatile = 0; + if (g_once_init_enter (&piwigo_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PiwigoServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) piwigo_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PiwigoService), 0, (GInstanceInitFunc) piwigo_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) piwigo_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) piwigo_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType piwigo_service_type_id; + piwigo_service_type_id = g_type_register_static (G_TYPE_OBJECT, "PiwigoService", &g_define_type_info, 0); + g_type_add_interface_static (piwigo_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (piwigo_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&piwigo_service_type_id__volatile, piwigo_service_type_id); + } + return piwigo_service_type_id__volatile; +} + + +PublishingPiwigoCategory* publishing_piwigo_category_construct (GType object_type, gint id, const gchar* name, const gchar* uppercats, const gchar* comment) { + PublishingPiwigoCategory* self = NULL; + gint _tmp0_ = 0; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (uppercats != NULL, NULL); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoCategory*) g_type_create_instance (object_type); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = id; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->id = _tmp0_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = name; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->name = _tmp2_; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = uppercats; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = g_strdup (_tmp3_); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->uppercats); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->uppercats = _tmp4_; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = comment; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_strdup (_tmp5_); +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->comment); +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->comment = _tmp6_; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 1214 "PiwigoPublishing.c" +} + + +PublishingPiwigoCategory* publishing_piwigo_category_new (gint id, const gchar* name, const gchar* uppercats, const gchar* comment) { +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_category_construct (PUBLISHING_PIWIGO_TYPE_CATEGORY, id, name, uppercats, comment); +#line 1221 "PiwigoPublishing.c" +} + + +PublishingPiwigoCategory* publishing_piwigo_category_construct_local (GType object_type, const gchar* name, gint parent_id, const gchar* comment) { + PublishingPiwigoCategory* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoCategory*) g_type_create_instance (object_type); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->id = PUBLISHING_PIWIGO_CATEGORY_NO_ID; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = name; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->name = _tmp1_; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = parent_id; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_strdup_printf ("%i", _tmp2_); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->uppercats); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->uppercats = _tmp3_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = comment; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->comment); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->comment = _tmp5_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 1265 "PiwigoPublishing.c" +} + + +PublishingPiwigoCategory* publishing_piwigo_category_new_local (const gchar* name, gint parent_id, const gchar* comment) { +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_category_construct_local (PUBLISHING_PIWIGO_TYPE_CATEGORY, name, parent_id, comment); +#line 1272 "PiwigoPublishing.c" +} + + +gboolean publishing_piwigo_category_is_local (PublishingPiwigoCategory* self) { + gboolean result = FALSE; + gint _tmp0_ = 0; +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_CATEGORY (self), FALSE); +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->id; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp0_ == PUBLISHING_PIWIGO_CATEGORY_NO_ID; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 1287 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_category_init (GValue* value) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1294 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_category_free_value (GValue* value) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (value->data[0].v_pointer) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_category_unref (value->data[0].v_pointer); +#line 1303 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_value_category_copy_value (const GValue* src_value, GValue* dest_value) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = publishing_piwigo_category_ref (src_value->data[0].v_pointer); +#line 1313 "PiwigoPublishing.c" + } else { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1317 "PiwigoPublishing.c" + } +} + + +static gpointer publishing_piwigo_value_category_peek_pointer (const GValue* value) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1325 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_category_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1332 "PiwigoPublishing.c" + PublishingPiwigoCategory* object; + object = collect_values[0].v_pointer; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1339 "PiwigoPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1343 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = publishing_piwigo_category_ref (object); +#line 1347 "PiwigoPublishing.c" + } else { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1351 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1355 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_category_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPiwigoCategory** object_p; + object_p = collect_values[0].v_pointer; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!object_p) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1366 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!value->data[0].v_pointer) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = NULL; +#line 1372 "PiwigoPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1376 "PiwigoPublishing.c" + } else { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = publishing_piwigo_category_ref (value->data[0].v_pointer); +#line 1380 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1384 "PiwigoPublishing.c" +} + + +GParamSpec* publishing_piwigo_param_spec_category (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPiwigoParamSpecCategory* spec; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PIWIGO_TYPE_CATEGORY), NULL); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1398 "PiwigoPublishing.c" +} + + +gpointer publishing_piwigo_value_get_category (const GValue* value) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_CATEGORY), NULL); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1407 "PiwigoPublishing.c" +} + + +void publishing_piwigo_value_set_category (GValue* value, gpointer v_object) { + PublishingPiwigoCategory* old; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_CATEGORY)); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_CATEGORY)); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_category_ref (value->data[0].v_pointer); +#line 1427 "PiwigoPublishing.c" + } else { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1431 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_category_unref (old); +#line 1437 "PiwigoPublishing.c" + } +} + + +void publishing_piwigo_value_take_category (GValue* value, gpointer v_object) { + PublishingPiwigoCategory* old; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_CATEGORY)); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_CATEGORY)); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1456 "PiwigoPublishing.c" + } else { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1460 "PiwigoPublishing.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_category_unref (old); +#line 1466 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_category_class_init (PublishingPiwigoCategoryClass * klass) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_category_parent_class = g_type_class_peek_parent (klass); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingPiwigoCategoryClass *) klass)->finalize = publishing_piwigo_category_finalize; +#line 1476 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_category_instance_init (PublishingPiwigoCategory * self) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->ref_count = 1; +#line 1483 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_category_finalize (PublishingPiwigoCategory* obj) { + PublishingPiwigoCategory * self; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_CATEGORY, PublishingPiwigoCategory); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_destroy (self); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->comment); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->display_name); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->uppercats); +#line 1501 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_category_get_type (void) { + static volatile gsize publishing_piwigo_category_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_category_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_piwigo_value_category_init, publishing_piwigo_value_category_free_value, publishing_piwigo_value_category_copy_value, publishing_piwigo_value_category_peek_pointer, "p", publishing_piwigo_value_category_collect_value, "p", publishing_piwigo_value_category_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoCategoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_category_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoCategory), 0, (GInstanceInitFunc) publishing_piwigo_category_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_piwigo_category_type_id; + publishing_piwigo_category_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPiwigoCategory", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_piwigo_category_type_id__volatile, publishing_piwigo_category_type_id); + } + return publishing_piwigo_category_type_id__volatile; +} + + +gpointer publishing_piwigo_category_ref (gpointer instance) { + PublishingPiwigoCategory* self; + self = instance; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return instance; +#line 1526 "PiwigoPublishing.c" +} + + +void publishing_piwigo_category_unref (gpointer instance) { + PublishingPiwigoCategory* self; + self = instance; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_PIWIGO_CATEGORY_GET_CLASS (self)->finalize (self); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1539 "PiwigoPublishing.c" + } +} + + +PublishingPiwigoPermissionLevel* publishing_piwigo_permission_level_construct (GType object_type, gint id, const gchar* name) { + PublishingPiwigoPermissionLevel* self = NULL; + gint _tmp0_ = 0; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoPermissionLevel*) g_type_create_instance (object_type); +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = id; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->id = _tmp0_; +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = name; +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->name = _tmp2_; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 1567 "PiwigoPublishing.c" +} + + +PublishingPiwigoPermissionLevel* publishing_piwigo_permission_level_new (gint id, const gchar* name) { +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_permission_level_construct (PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL, id, name); +#line 1574 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_permission_level_init (GValue* value) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1581 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_permission_level_free_value (GValue* value) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (value->data[0].v_pointer) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_permission_level_unref (value->data[0].v_pointer); +#line 1590 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_value_permission_level_copy_value (const GValue* src_value, GValue* dest_value) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = publishing_piwigo_permission_level_ref (src_value->data[0].v_pointer); +#line 1600 "PiwigoPublishing.c" + } else { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1604 "PiwigoPublishing.c" + } +} + + +static gpointer publishing_piwigo_value_permission_level_peek_pointer (const GValue* value) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1612 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_permission_level_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1619 "PiwigoPublishing.c" + PublishingPiwigoPermissionLevel* object; + object = collect_values[0].v_pointer; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1626 "PiwigoPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1630 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = publishing_piwigo_permission_level_ref (object); +#line 1634 "PiwigoPublishing.c" + } else { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1638 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1642 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_permission_level_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPiwigoPermissionLevel** object_p; + object_p = collect_values[0].v_pointer; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!object_p) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1653 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!value->data[0].v_pointer) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = NULL; +#line 1659 "PiwigoPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1663 "PiwigoPublishing.c" + } else { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = publishing_piwigo_permission_level_ref (value->data[0].v_pointer); +#line 1667 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1671 "PiwigoPublishing.c" +} + + +GParamSpec* publishing_piwigo_param_spec_permission_level (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPiwigoParamSpecPermissionLevel* spec; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL), NULL); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1685 "PiwigoPublishing.c" +} + + +gpointer publishing_piwigo_value_get_permission_level (const GValue* value) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL), NULL); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1694 "PiwigoPublishing.c" +} + + +void publishing_piwigo_value_set_permission_level (GValue* value, gpointer v_object) { + PublishingPiwigoPermissionLevel* old; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_permission_level_ref (value->data[0].v_pointer); +#line 1714 "PiwigoPublishing.c" + } else { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1718 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_permission_level_unref (old); +#line 1724 "PiwigoPublishing.c" + } +} + + +void publishing_piwigo_value_take_permission_level (GValue* value, gpointer v_object) { + PublishingPiwigoPermissionLevel* old; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL)); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 1743 "PiwigoPublishing.c" + } else { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1747 "PiwigoPublishing.c" + } +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_permission_level_unref (old); +#line 1753 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_permission_level_class_init (PublishingPiwigoPermissionLevelClass * klass) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_permission_level_parent_class = g_type_class_peek_parent (klass); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingPiwigoPermissionLevelClass *) klass)->finalize = publishing_piwigo_permission_level_finalize; +#line 1763 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_permission_level_instance_init (PublishingPiwigoPermissionLevel * self) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->ref_count = 1; +#line 1770 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_permission_level_finalize (PublishingPiwigoPermissionLevel* obj) { + PublishingPiwigoPermissionLevel * self; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_PERMISSION_LEVEL, PublishingPiwigoPermissionLevel); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_destroy (self); +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 1782 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_permission_level_get_type (void) { + static volatile gsize publishing_piwigo_permission_level_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_permission_level_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_piwigo_value_permission_level_init, publishing_piwigo_value_permission_level_free_value, publishing_piwigo_value_permission_level_copy_value, publishing_piwigo_value_permission_level_peek_pointer, "p", publishing_piwigo_value_permission_level_collect_value, "p", publishing_piwigo_value_permission_level_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoPermissionLevelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_permission_level_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoPermissionLevel), 0, (GInstanceInitFunc) publishing_piwigo_permission_level_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_piwigo_permission_level_type_id; + publishing_piwigo_permission_level_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPiwigoPermissionLevel", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_piwigo_permission_level_type_id__volatile, publishing_piwigo_permission_level_type_id); + } + return publishing_piwigo_permission_level_type_id__volatile; +} + + +gpointer publishing_piwigo_permission_level_ref (gpointer instance) { + PublishingPiwigoPermissionLevel* self; + self = instance; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return instance; +#line 1807 "PiwigoPublishing.c" +} + + +void publishing_piwigo_permission_level_unref (gpointer instance) { + PublishingPiwigoPermissionLevel* self; + self = instance; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_PIWIGO_PERMISSION_LEVEL_GET_CLASS (self)->finalize (self); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1820 "PiwigoPublishing.c" + } +} + + +PublishingPiwigoSizeEntry* publishing_piwigo_size_entry_construct (GType object_type, gint id, const gchar* name) { + PublishingPiwigoSizeEntry* self = NULL; + gint _tmp0_ = 0; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSizeEntry*) g_type_create_instance (object_type); +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = id; +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->id = _tmp0_; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = name; +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 106 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->name = _tmp2_; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 1848 "PiwigoPublishing.c" +} + + +PublishingPiwigoSizeEntry* publishing_piwigo_size_entry_new (gint id, const gchar* name) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_size_entry_construct (PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY, id, name); +#line 1855 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_size_entry_init (GValue* value) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1862 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_size_entry_free_value (GValue* value) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (value->data[0].v_pointer) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_size_entry_unref (value->data[0].v_pointer); +#line 1871 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_value_size_entry_copy_value (const GValue* src_value, GValue* dest_value) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = publishing_piwigo_size_entry_ref (src_value->data[0].v_pointer); +#line 1881 "PiwigoPublishing.c" + } else { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 1885 "PiwigoPublishing.c" + } +} + + +static gpointer publishing_piwigo_value_size_entry_peek_pointer (const GValue* value) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1893 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_size_entry_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (collect_values[0].v_pointer) { +#line 1900 "PiwigoPublishing.c" + PublishingPiwigoSizeEntry* object; + object = collect_values[0].v_pointer; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1907 "PiwigoPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1911 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = publishing_piwigo_size_entry_ref (object); +#line 1915 "PiwigoPublishing.c" + } else { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1919 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1923 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_size_entry_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPiwigoSizeEntry** object_p; + object_p = collect_values[0].v_pointer; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!object_p) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1934 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!value->data[0].v_pointer) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = NULL; +#line 1940 "PiwigoPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 1944 "PiwigoPublishing.c" + } else { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = publishing_piwigo_size_entry_ref (value->data[0].v_pointer); +#line 1948 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 1952 "PiwigoPublishing.c" +} + + +GParamSpec* publishing_piwigo_param_spec_size_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPiwigoParamSpecSizeEntry* spec; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY), NULL); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return G_PARAM_SPEC (spec); +#line 1966 "PiwigoPublishing.c" +} + + +gpointer publishing_piwigo_value_get_size_entry (const GValue* value) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY), NULL); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 1975 "PiwigoPublishing.c" +} + + +void publishing_piwigo_value_set_size_entry (GValue* value, gpointer v_object) { + PublishingPiwigoSizeEntry* old; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_size_entry_ref (value->data[0].v_pointer); +#line 1995 "PiwigoPublishing.c" + } else { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 1999 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_size_entry_unref (old); +#line 2005 "PiwigoPublishing.c" + } +} + + +void publishing_piwigo_value_take_size_entry (GValue* value, gpointer v_object) { + PublishingPiwigoSizeEntry* old; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY)); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 2024 "PiwigoPublishing.c" + } else { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2028 "PiwigoPublishing.c" + } +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_size_entry_unref (old); +#line 2034 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_size_entry_class_init (PublishingPiwigoSizeEntryClass * klass) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_size_entry_parent_class = g_type_class_peek_parent (klass); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingPiwigoSizeEntryClass *) klass)->finalize = publishing_piwigo_size_entry_finalize; +#line 2044 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_size_entry_instance_init (PublishingPiwigoSizeEntry * self) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->ref_count = 1; +#line 2051 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_size_entry_finalize (PublishingPiwigoSizeEntry* obj) { + PublishingPiwigoSizeEntry * self; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_SIZE_ENTRY, PublishingPiwigoSizeEntry); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_destroy (self); +#line 102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->name); +#line 2063 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_size_entry_get_type (void) { + static volatile gsize publishing_piwigo_size_entry_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_size_entry_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_piwigo_value_size_entry_init, publishing_piwigo_value_size_entry_free_value, publishing_piwigo_value_size_entry_copy_value, publishing_piwigo_value_size_entry_peek_pointer, "p", publishing_piwigo_value_size_entry_collect_value, "p", publishing_piwigo_value_size_entry_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoSizeEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_size_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoSizeEntry), 0, (GInstanceInitFunc) publishing_piwigo_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_piwigo_size_entry_type_id; + publishing_piwigo_size_entry_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPiwigoSizeEntry", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_piwigo_size_entry_type_id__volatile, publishing_piwigo_size_entry_type_id); + } + return publishing_piwigo_size_entry_type_id__volatile; +} + + +gpointer publishing_piwigo_size_entry_ref (gpointer instance) { + PublishingPiwigoSizeEntry* self; + self = instance; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return instance; +#line 2088 "PiwigoPublishing.c" +} + + +void publishing_piwigo_size_entry_unref (gpointer instance) { + PublishingPiwigoSizeEntry* self; + self = instance; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_PIWIGO_SIZE_ENTRY_GET_CLASS (self)->finalize (self); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 2101 "PiwigoPublishing.c" + } +} + + +PublishingPiwigoPublishingParameters* publishing_piwigo_publishing_parameters_construct (GType object_type) { + PublishingPiwigoPublishingParameters* self = NULL; +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoPublishingParameters*) g_type_create_instance (object_type); +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 2112 "PiwigoPublishing.c" +} + + +PublishingPiwigoPublishingParameters* publishing_piwigo_publishing_parameters_new (void) { +#line 117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_publishing_parameters_construct (PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS); +#line 2119 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_publishing_parameters_init (GValue* value) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2126 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_value_publishing_parameters_free_value (GValue* value) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (value->data[0].v_pointer) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_parameters_unref (value->data[0].v_pointer); +#line 2135 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (src_value->data[0].v_pointer) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = publishing_piwigo_publishing_parameters_ref (src_value->data[0].v_pointer); +#line 2145 "PiwigoPublishing.c" + } else { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 2149 "PiwigoPublishing.c" + } +} + + +static gpointer publishing_piwigo_value_publishing_parameters_peek_pointer (const GValue* value) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 2157 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (collect_values[0].v_pointer) { +#line 2164 "PiwigoPublishing.c" + PublishingPiwigoPublishingParameters* object; + object = collect_values[0].v_pointer; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 2171 "PiwigoPublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 2175 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = publishing_piwigo_publishing_parameters_ref (object); +#line 2179 "PiwigoPublishing.c" + } else { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2183 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 2187 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingPiwigoPublishingParameters** object_p; + object_p = collect_values[0].v_pointer; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!object_p) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 2198 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!value->data[0].v_pointer) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = NULL; +#line 2204 "PiwigoPublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = value->data[0].v_pointer; +#line 2208 "PiwigoPublishing.c" + } else { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *object_p = publishing_piwigo_publishing_parameters_ref (value->data[0].v_pointer); +#line 2212 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 2216 "PiwigoPublishing.c" +} + + +GParamSpec* publishing_piwigo_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingPiwigoParamSpecPublishingParameters* spec; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return G_PARAM_SPEC (spec); +#line 2230 "PiwigoPublishing.c" +} + + +gpointer publishing_piwigo_value_get_publishing_parameters (const GValue* value) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return value->data[0].v_pointer; +#line 2239 "PiwigoPublishing.c" +} + + +void publishing_piwigo_value_set_publishing_parameters (GValue* value, gpointer v_object) { + PublishingPiwigoPublishingParameters* old; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_parameters_ref (value->data[0].v_pointer); +#line 2259 "PiwigoPublishing.c" + } else { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2263 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_parameters_unref (old); +#line 2269 "PiwigoPublishing.c" + } +} + + +void publishing_piwigo_value_take_publishing_parameters (GValue* value, gpointer v_object) { + PublishingPiwigoPublishingParameters* old; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + old = value->data[0].v_pointer; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (v_object) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS)); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = v_object; +#line 2288 "PiwigoPublishing.c" + } else { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + value->data[0].v_pointer = NULL; +#line 2292 "PiwigoPublishing.c" + } +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (old) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_parameters_unref (old); +#line 2298 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_publishing_parameters_class_init (PublishingPiwigoPublishingParametersClass * klass) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_parameters_parent_class = g_type_class_peek_parent (klass); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingPiwigoPublishingParametersClass *) klass)->finalize = publishing_piwigo_publishing_parameters_finalize; +#line 2308 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_parameters_instance_init (PublishingPiwigoPublishingParameters * self) { +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->category = NULL; +#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->perm_level = NULL; +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->photo_size = NULL; +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->title_as_comment = FALSE; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->no_upload_tags = FALSE; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->ref_count = 1; +#line 2325 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_parameters_finalize (PublishingPiwigoPublishingParameters* obj) { + PublishingPiwigoPublishingParameters * self; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS, PublishingPiwigoPublishingParameters); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_destroy (self); +#line 111 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (self->category); +#line 112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_permission_level_unref0 (self->perm_level); +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_size_entry_unref0 (self->photo_size); +#line 2341 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_publishing_parameters_get_type (void) { + static volatile gsize publishing_piwigo_publishing_parameters_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_publishing_parameters_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_piwigo_value_publishing_parameters_init, publishing_piwigo_value_publishing_parameters_free_value, publishing_piwigo_value_publishing_parameters_copy_value, publishing_piwigo_value_publishing_parameters_peek_pointer, "p", publishing_piwigo_value_publishing_parameters_collect_value, "p", publishing_piwigo_value_publishing_parameters_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoPublishingParametersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_publishing_parameters_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoPublishingParameters), 0, (GInstanceInitFunc) publishing_piwigo_publishing_parameters_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_piwigo_publishing_parameters_type_id; + publishing_piwigo_publishing_parameters_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingPiwigoPublishingParameters", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_piwigo_publishing_parameters_type_id__volatile, publishing_piwigo_publishing_parameters_type_id); + } + return publishing_piwigo_publishing_parameters_type_id__volatile; +} + + +gpointer publishing_piwigo_publishing_parameters_ref (gpointer instance) { + PublishingPiwigoPublishingParameters* self; + self = instance; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return instance; +#line 2366 "PiwigoPublishing.c" +} + + +void publishing_piwigo_publishing_parameters_unref (gpointer instance) { + PublishingPiwigoPublishingParameters* self; + self = instance; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 2379 "PiwigoPublishing.c" + } +} + + +PublishingPiwigoPiwigoPublisher* publishing_piwigo_piwigo_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingPiwigoPiwigoPublisher * self = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingService* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + SpitPublishingPluginHost* _tmp3_ = NULL; + PublishingPiwigoSession* _tmp4_ = NULL; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoPiwigoPublisher*) g_object_new (object_type, NULL); +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:133: PiwigoPublisher instantiated."); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = service; +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->service = _tmp1_; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = host; +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->host = _tmp3_; +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = publishing_piwigo_session_new (); +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->session = _tmp4_; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 2423 "PiwigoPublishing.c" +} + + +PublishingPiwigoPiwigoPublisher* publishing_piwigo_piwigo_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_piwigo_publisher_construct (PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, service, host); +#line 2430 "PiwigoPublishing.c" +} + + +static SpitPublishingService* publishing_piwigo_piwigo_publisher_real_get_service (SpitPublishingPublisher* base) { + PublishingPiwigoPiwigoPublisher * self; + SpitPublishingService* result = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingService* _tmp1_ = NULL; +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher); +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->service; +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 142 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2449 "PiwigoPublishing.c" +} + + +SpitPublishingPluginHost* publishing_piwigo_piwigo_publisher_get_host (PublishingPiwigoPiwigoPublisher* self) { + SpitPublishingPluginHost* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 145 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), NULL); +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2467 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_piwigo_publisher_real_is_running (SpitPublishingPublisher* base) { + PublishingPiwigoPiwigoPublisher * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher); +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->running; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp0_; +#line 150 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2483 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_real_start (SpitPublishingPublisher* base) { + PublishingPiwigoPiwigoPublisher * self; + gboolean _tmp0_ = FALSE; + PublishingPiwigoSession* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher); +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp0_) { +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 2500 "PiwigoPublishing.c" + } +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:157: PiwigoPublisher: starting interaction."); +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->running = TRUE; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->session; +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp2_) { +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:162: PiwigoPublisher: session is authenticated."); +#line 163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_fetch_categories (self); +#line 2516 "PiwigoPublishing.c" + } else { + gchar* persistent_url = NULL; + gchar* _tmp3_ = NULL; + gchar* persistent_username = NULL; + gchar* _tmp4_ = NULL; + gchar* persistent_password = NULL; + gchar* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; + const gchar* _tmp8_ = NULL; +#line 165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:165: PiwigoPublisher: session is not authenticat" \ +"ed."); +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_piwigo_publisher_get_persistent_url (self); +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_url = _tmp3_; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = publishing_piwigo_piwigo_publisher_get_persistent_username (self); +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_username = _tmp4_; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_piwigo_publisher_get_persistent_password (self); +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_password = _tmp5_; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = persistent_url; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp8_ != NULL) { +#line 2545 "PiwigoPublishing.c" + const gchar* _tmp9_ = NULL; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = persistent_username; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp9_ != NULL; +#line 2551 "PiwigoPublishing.c" + } else { +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = FALSE; +#line 2555 "PiwigoPublishing.c" + } +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_) { +#line 2559 "PiwigoPublishing.c" + const gchar* _tmp10_ = NULL; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = persistent_password; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp10_ != NULL; +#line 2565 "PiwigoPublishing.c" + } else { +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = FALSE; +#line 2569 "PiwigoPublishing.c" + } +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp6_) { +#line 2573 "PiwigoPublishing.c" + const gchar* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = persistent_url; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = persistent_username; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = persistent_password; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = publishing_piwigo_piwigo_publisher_get_remember_password (self); +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_network_login (self, _tmp11_, _tmp12_, _tmp13_, _tmp14_); +#line 2588 "PiwigoPublishing.c" + } else { +#line 173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_authentication_pane (self, PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO); +#line 2592 "PiwigoPublishing.c" + } +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_password); +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_username); +#line 161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_url); +#line 2600 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_piwigo_publisher_real_stop (SpitPublishingPublisher* base) { + PublishingPiwigoPiwigoPublisher * self; +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher); +#line 178 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->running = FALSE; +#line 2611 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_piwigo_publisher_get_persistent_url (PublishingPiwigoPiwigoPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), NULL); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "url", NULL); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2629 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_persistent_url (PublishingPiwigoPiwigoPublisher* self, const gchar* url) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 187 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (url != NULL); +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = url; +#line 188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "url", _tmp1_); +#line 2646 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_piwigo_publisher_get_persistent_username (PublishingPiwigoPiwigoPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), NULL); +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "username", NULL); +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2664 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_persistent_username (PublishingPiwigoPiwigoPublisher* self, const gchar* username) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (username != NULL); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = username; +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "username", _tmp1_); +#line 2681 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_piwigo_publisher_get_persistent_password (PublishingPiwigoPiwigoPublisher* self) { + gchar* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), NULL); +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "password", NULL); +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2699 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_persistent_password (PublishingPiwigoPiwigoPublisher* self, const gchar* password) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 203 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = password; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "password", _tmp1_); +#line 2714 "PiwigoPublishing.c" +} + + +gboolean publishing_piwigo_piwigo_publisher_get_remember_password (PublishingPiwigoPiwigoPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), FALSE); +#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "remember-password", FALSE); +#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2732 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_remember_password (PublishingPiwigoPiwigoPublisher* self, gboolean remember_password) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = remember_password; +#line 212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "remember-password", _tmp1_); +#line 2747 "PiwigoPublishing.c" +} + + +gint publishing_piwigo_piwigo_publisher_get_last_category (PublishingPiwigoPiwigoPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), 0); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-category", -1); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2765 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_last_category (PublishingPiwigoPiwigoPublisher* self, gint last_category) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = last_category; +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-category", _tmp1_); +#line 2780 "PiwigoPublishing.c" +} + + +gint publishing_piwigo_piwigo_publisher_get_last_permission_level (PublishingPiwigoPiwigoPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), 0); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-permission-level", -1); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2798 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_last_permission_level (PublishingPiwigoPiwigoPublisher* self, gint last_permission_level) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = last_permission_level; +#line 228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-permission-level", _tmp1_); +#line 2813 "PiwigoPublishing.c" +} + + +gint publishing_piwigo_piwigo_publisher_get_last_photo_size (PublishingPiwigoPiwigoPublisher* self) { + gint result = 0; + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), 0); +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-photo-size", -1); +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2831 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_last_photo_size (PublishingPiwigoPiwigoPublisher* self, gint last_photo_size) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gint _tmp1_ = 0; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = last_photo_size; +#line 236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_int (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-photo-size", _tmp1_); +#line 2846 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_piwigo_publisher_get_last_title_as_comment (PublishingPiwigoPiwigoPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), FALSE); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-title-as-comment", FALSE); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2864 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_last_title_as_comment (PublishingPiwigoPiwigoPublisher* self, gboolean title_as_comment) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = title_as_comment; +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-title-as-comment", _tmp1_); +#line 2879 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_piwigo_publisher_get_last_no_upload_tags (PublishingPiwigoPiwigoPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), FALSE); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-no-upload-tags", FALSE); +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2897 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_last_no_upload_tags (PublishingPiwigoPiwigoPublisher* self, gboolean no_upload_tags) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = no_upload_tags; +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "last-no-upload-tags", _tmp1_); +#line 2912 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_piwigo_publisher_get_metadata_removal_choice (PublishingPiwigoPiwigoPublisher* self) { + gboolean result = FALSE; + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), FALSE); +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = spit_host_interface_get_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", FALSE); +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 256 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 2930 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_set_metadata_removal_choice (PublishingPiwigoPiwigoPublisher* self, gboolean strip_metadata) { + SpitPublishingPluginHost* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = strip_metadata; +#line 260 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_host_interface_set_config_bool (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "strip_metadata", _tmp1_); +#line 2945 "PiwigoPublishing.c" +} + + +/** + * Action that shows the authentication pane. + * + * This action method shows the authentication pane. It is shown at the + * very beginning of the interaction when no persistent parameters are found + * or after a failed login attempt using persisted parameters. It can be + * given a mode flag to specify whether it should be displayed in initial + * mode or in any of the error modes that it supports. + * + * @param mode the mode for the authentication pane + */ +static void _publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked_publishing_piwigo_authentication_pane_login (PublishingPiwigoAuthenticationPane* _sender, const gchar* url, const gchar* user, const gchar* password, gboolean remember_password, gpointer self) { +#line 282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked ((PublishingPiwigoPiwigoPublisher*) self, url, user, password, remember_password); +#line 2963 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_show_authentication_pane (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoAuthenticationPaneMode mode) { + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingPiwigoAuthenticationPane* authentication_pane = NULL; + PublishingPiwigoAuthenticationPaneMode _tmp1_ = 0; + PublishingPiwigoAuthenticationPane* _tmp2_ = NULL; + SpitPublishingPluginHost* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + GtkWidget* _tmp5_ = NULL; + GtkWidget* _tmp6_ = NULL; +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 277 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:277: ACTION: installing authentication pane"); +#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = mode; +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = publishing_piwigo_authentication_pane_new (self, _tmp1_); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + authentication_pane = _tmp2_; +#line 282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (authentication_pane, "login", (GCallback) _publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked_publishing_piwigo_authentication_pane_login, self, 0); +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->host; +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (authentication_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->host; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_authentication_pane_get_default_widget (authentication_pane); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_dialog_default_widget (_tmp4_, _tmp6_); +#line 284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp6_); +#line 276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (authentication_pane); +#line 3008 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the login button in the authentication panel is + * clicked. + * + * This event is triggered when the login button in the authentication + * panel is clicked. It then triggers a network login interaction. + * + * @param url the URL of the Piwigo service as entered in the dialog + * @param username the name of the Piwigo user as entered in the dialog + * @param password the password of the Piwigo as entered in the dialog + */ +static void publishing_piwigo_piwigo_publisher_on_authentication_pane_login_clicked (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* username, const gchar* password, gboolean remember_password) { + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (url != NULL); +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (username != NULL); +#line 298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (password != NULL); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:301: EVENT: on_authentication_pane_login_clicked"); +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->running; +#line 302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp0_) { +#line 303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3045 "PiwigoPublishing.c" + } +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = url; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = username; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = password; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = remember_password; +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_network_login (self, _tmp1_, _tmp2_, _tmp3_, _tmp4_); +#line 3057 "PiwigoPublishing.c" +} + + +/** + * Action to perform a network login to a Piwigo service. + * + * This action performs a network login a Piwigo service specified by a + * URL and using the given user name and password as credentials. + * + * @param url the URL of the Piwigo service; this URL will be normalised + * before being used + * @param username the name of the Piwigo user used to login + * @param password the password of the Piwigo user used to login + */ +static void _publishing_piwigo_piwigo_publisher_on_login_network_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_login_network_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 3075 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_login_network_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_login_network_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender); +#line 3082 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_network_login (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* username, const gchar* password, gboolean remember_password) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + PublishingPiwigoSessionLoginTransaction* login_trans = NULL; + PublishingPiwigoSession* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + PublishingPiwigoSessionLoginTransaction* _tmp11_ = NULL; + PublishingPiwigoSessionLoginTransaction* _tmp12_ = NULL; + GError * _inner_error_ = NULL; +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (url != NULL); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (username != NULL); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (password != NULL); +#line 320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:320: ACTION: logging in"); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->host; +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_login_wait_pane (_tmp1_); +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = remember_password; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_remember_password (self, _tmp2_); +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = remember_password; +#line 325 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp3_) { +#line 3127 "PiwigoPublishing.c" + const gchar* _tmp4_ = NULL; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = password; +#line 326 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_persistent_password (self, _tmp4_); +#line 3133 "PiwigoPublishing.c" + } else { +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_persistent_password (self, NULL); +#line 3137 "PiwigoPublishing.c" + } +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->session; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = url; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_piwigo_piwigo_publisher_normalise_url (_tmp6_); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _tmp7_; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = username; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = password; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = publishing_piwigo_session_login_transaction_new (_tmp5_, _tmp8_, _tmp9_, _tmp10_); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_; +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp8_); +#line 330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + login_trans = _tmp12_; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (login_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_error_publishing_rest_support_transaction_network_error, self, 0); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (login_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_complete_publishing_rest_support_transaction_completed, self, 0); +#line 3163 "PiwigoPublishing.c" + { +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (login_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3171 "PiwigoPublishing.c" + goto __catch32_spit_publishing_publishing_error; + } +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (login_trans); +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3182 "PiwigoPublishing.c" + } + } + goto __finally32; + __catch32_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp13_ = NULL; +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 338 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:338: ERROR: do_network_login"); +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = err; +#line 339 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp13_); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 3202 "PiwigoPublishing.c" + } + __finally32: +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (login_trans); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 335 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3215 "PiwigoPublishing.c" + } +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (login_trans); +#line 3219 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_piwigo_publisher_normalise_url (const gchar* url) { + gchar* result = NULL; + gchar* norm_url = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + gboolean _tmp10_ = FALSE; + const gchar* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#line 343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (url != NULL, NULL); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = url; +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + norm_url = _tmp1_; +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = norm_url; +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_str_has_suffix (_tmp2_, ".php"); +#line 346 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp3_) { +#line 3247 "PiwigoPublishing.c" + const gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + const gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = norm_url; +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_str_has_suffix (_tmp4_, "/"); +#line 347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp5_) { +#line 3258 "PiwigoPublishing.c" + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = norm_url; +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strconcat (_tmp6_, "/", NULL); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (norm_url); +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + norm_url = _tmp7_; +#line 3269 "PiwigoPublishing.c" + } +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = norm_url; +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = g_strconcat (_tmp8_, PUBLISHING_PIWIGO_PIWIGO_WS, NULL); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (norm_url); +#line 350 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + norm_url = _tmp9_; +#line 3279 "PiwigoPublishing.c" + } +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = norm_url; +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = g_str_has_prefix (_tmp11_, "http://"); +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp12_) { +#line 3287 "PiwigoPublishing.c" + const gchar* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = norm_url; +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = g_str_has_prefix (_tmp13_, "https://"); +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = !_tmp14_; +#line 3296 "PiwigoPublishing.c" + } else { +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = FALSE; +#line 3300 "PiwigoPublishing.c" + } +#line 353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp10_) { +#line 3304 "PiwigoPublishing.c" + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = norm_url; +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = g_strconcat ("http://", _tmp15_, NULL); +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (norm_url); +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + norm_url = _tmp16_; +#line 3315 "PiwigoPublishing.c" + } +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = norm_url; +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 3321 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the network login action is complete and successful. + * + * This event is triggered on successful completion of a network login. + * Calling this event implies that the URL, user name and password provided + * in the authentication pane are valid and that the transaction should + * contain a Set-Cookie header that includes the value pwg_id for that + * user. As a result, this event will also authenticate the session and + * persist all values so that they can be re-used during the next publishing + * interaction. + * + * @param txn the received REST transaction + */ +static gchar* _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { + gchar* result; + result = publishing_piwigo_transaction_validate_xml (doc); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 3343 "PiwigoPublishing.c" +} + + +static gchar* _publishing_piwigo_transaction_get_error_code_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { + gchar* result; + result = publishing_piwigo_transaction_get_error_code (doc); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 3352 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_on_login_network_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gchar* endpoint_url = NULL; + PublishingRESTSupportTransaction* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + gchar* pwg_id = NULL; + PublishingRESTSupportTransaction* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + PublishingPiwigoSession* _tmp25_ = NULL; + PublishingPiwigoSession* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + GError * _inner_error_ = NULL; +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 374 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:374: EVENT: on_login_network_complete"); +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_complete_publishing_rest_support_transaction_completed, self); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = txn; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_error_publishing_rest_support_transaction_network_error, self); +#line 3393 "PiwigoPublishing.c" + { + PublishingRESTSupportTransaction* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + PublishingRESTSupportXmlDocument* _tmp7_ = NULL; + PublishingRESTSupportXmlDocument* _tmp8_ = NULL; +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = txn; +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_rest_support_xml_document_parse_string (_tmp6_, _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _tmp7_; +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp8_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp6_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3418 "PiwigoPublishing.c" + goto __catch33_spit_publishing_publishing_error; + } +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3427 "PiwigoPublishing.c" + } + } + goto __finally33; + __catch33_spit_publishing_publishing_error: + { + GError* err = NULL; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 3438 "PiwigoPublishing.c" + { + PublishingRESTSupportTransaction* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + PublishingRESTSupportXmlDocument* _tmp12_ = NULL; + PublishingRESTSupportXmlDocument* _tmp13_ = NULL; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = txn; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = publishing_rest_support_transaction_get_response (_tmp9_); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _tmp10_; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = publishing_rest_support_xml_document_parse_string (_tmp11_, _publishing_piwigo_transaction_get_error_code_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = _tmp12_; +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp13_); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp11_); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3463 "PiwigoPublishing.c" + goto __catch34_spit_publishing_publishing_error; + } +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 384 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3474 "PiwigoPublishing.c" + } + } + goto __finally34; + __catch34_spit_publishing_publishing_error: + { + GError* code = NULL; + gint code_int = 0; + GError* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + gint _tmp16_ = 0; + gint _tmp17_ = 0; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + code = _inner_error_; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = code; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = _tmp14_->message; +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = atoi (_tmp15_); +#line 387 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + code_int = _tmp16_; +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = code_int; +#line 388 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp17_ == 999) { +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:389: ERROR: on_login_network_complete, code 999"); +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_authentication_pane (self, PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER); +#line 3506 "PiwigoPublishing.c" + } else { + GError* _tmp18_ = NULL; +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:392: ERROR: on_login_network_complete"); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = err; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp18_); +#line 3515 "PiwigoPublishing.c" + } +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (code); +#line 3519 "PiwigoPublishing.c" + } + __finally34: +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3534 "PiwigoPublishing.c" + } +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3540 "PiwigoPublishing.c" + } + __finally33: +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 378 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3551 "PiwigoPublishing.c" + } +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = txn; +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = publishing_rest_support_transaction_get_endpoint_url (_tmp19_); +#line 399 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + endpoint_url = _tmp20_; +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = endpoint_url; +#line 400 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:400: Setting endpoint URL to %s", _tmp21_); +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = txn; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = publishing_piwigo_piwigo_publisher_get_pwg_id_from_transaction (self, _tmp22_); +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pwg_id = _tmp23_; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = pwg_id; +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:402: Setting session pwg_id to %s", _tmp24_); +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = publishing_piwigo_session_new (); +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->session = _tmp25_; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = self->priv->session; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = pwg_id; +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_set_pwg_id (_tmp26_, _tmp27_); +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = endpoint_url; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = pwg_id; +#line 406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_fetch_session_status (self, _tmp28_, _tmp29_); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 3595 "PiwigoPublishing.c" +} + + +/** + * Event triggered when a network login action fails due to a network error. + * + * This event triggered as a result of a network error during the login + * transaction. As a result, it assumes that the service URL entered in the + * authentication dialog is incorrect and re-presents the authentication + * dialog with FAILED_RETRY_URL mode. + * + * @param bad_txn the received REST transaction + * @param err the received error + */ +static void publishing_piwigo_piwigo_publisher_on_login_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingPiwigoSession* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 424 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:424: EVENT: on_login_network_error"); +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = bad_txn; +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_complete_publishing_rest_support_transaction_completed, self); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = bad_txn; +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_login_network_error_publishing_rest_support_transaction_network_error, self); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->session; +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp5_) { +#line 429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3643 "PiwigoPublishing.c" + } +#line 431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_authentication_pane (self, PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL); +#line 3647 "PiwigoPublishing.c" +} + + +/** + * Action to fetch the session status for a known Piwigo user. + * + * This action fetches the session status for a Piwigo user for whom the + * pwg_id is known. If triggered after a network login, it should just + * confirm that the session is OK. It can also be triggered as the first + * action of the interaction for users for who the pwg_id was previously + * persisted. In this case, it will log the user in and confirm the + * identity. + */ +static void _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_session_get_status_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 3664 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_session_get_status_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender); +#line 3671 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_fetch_session_status (PublishingPiwigoPiwigoPublisher* self, const gchar* url, const gchar* pwg_id) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPiwigoSession* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + GError * _inner_error_ = NULL; +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (url != NULL); +#line 444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (pwg_id != NULL); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:445: ACTION: fetching session status"); +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 446 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->host; +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->session; +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp3_) { +#line 3703 "PiwigoPublishing.c" + PublishingPiwigoSessionGetStatusTransaction* status_txn = NULL; + PublishingPiwigoSession* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp7_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp8_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp9_ = NULL; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->session; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = url; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = pwg_id; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_piwigo_session_get_status_transaction_new_unauthenticated (_tmp4_, _tmp5_, _tmp6_); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + status_txn = _tmp7_; +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = status_txn; +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error, self, 0); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = status_txn; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed, self, 0); +#line 3729 "PiwigoPublishing.c" + { + PublishingPiwigoSessionGetStatusTransaction* _tmp10_ = NULL; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = status_txn; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3740 "PiwigoPublishing.c" + goto __catch35_spit_publishing_publishing_error; + } +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3751 "PiwigoPublishing.c" + } + } + goto __finally35; + __catch35_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp11_ = NULL; +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:457: ERROR: do_fetch_session_status, not authent" \ +"icated"); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = err; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp11_); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 3771 "PiwigoPublishing.c" + } + __finally35: +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3784 "PiwigoPublishing.c" + } +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 3788 "PiwigoPublishing.c" + } else { + PublishingPiwigoSessionGetStatusTransaction* status_txn = NULL; + PublishingPiwigoSession* _tmp12_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp13_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp14_ = NULL; + PublishingPiwigoSessionGetStatusTransaction* _tmp15_ = NULL; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = self->priv->session; +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = publishing_piwigo_session_get_status_transaction_new (_tmp12_); +#line 461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + status_txn = _tmp13_; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = status_txn; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error, self, 0); +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = status_txn; +#line 463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed, self, 0); +#line 3809 "PiwigoPublishing.c" + { + PublishingPiwigoSessionGetStatusTransaction* _tmp16_ = NULL; +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = status_txn; +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3820 "PiwigoPublishing.c" + goto __catch36_spit_publishing_publishing_error; + } +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3831 "PiwigoPublishing.c" + } + } + goto __finally36; + __catch36_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp17_ = NULL; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:468: ERROR: do_fetch_session_status, authenticat" \ +"ed"); +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = err; +#line 469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp17_); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 3851 "PiwigoPublishing.c" + } + __finally36: +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3864 "PiwigoPublishing.c" + } +#line 449 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (status_txn); +#line 3868 "PiwigoPublishing.c" + } +} + + +/** + * Event triggered when the get session status action completes successfully. + * + * This event being triggered confirms that the session is valid and can becyclonic enema + * used. If the session is not fully authenticated yet, this event finalises + * session authentication. It then triggers the fetch categories action. + */ +static void publishing_piwigo_piwigo_publisher_on_session_get_status_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingPiwigoSession* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + GError * _inner_error_ = NULL; +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:482: EVENT: on_session_get_status_complete"); +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 483 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed, self); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = txn; +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error, self); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->session; +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp5_) { +#line 3912 "PiwigoPublishing.c" + gchar* endpoint_url = NULL; + PublishingRESTSupportTransaction* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* pwg_id = NULL; + PublishingPiwigoSession* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = txn; +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_rest_support_transaction_get_endpoint_url (_tmp6_); +#line 487 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + endpoint_url = _tmp7_; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->session; +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = publishing_piwigo_session_get_pwg_id (_tmp8_); +#line 488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pwg_id = _tmp9_; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = pwg_id; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:489: Fetching session status for pwg_id %s", _tmp10_); +#line 3936 "PiwigoPublishing.c" + { + PublishingRESTSupportXmlDocument* doc = NULL; + PublishingRESTSupportTransaction* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + PublishingRESTSupportXmlDocument* _tmp14_ = NULL; + PublishingRESTSupportXmlDocument* _tmp15_ = NULL; + xmlNode* root = NULL; + PublishingRESTSupportXmlDocument* _tmp16_ = NULL; + xmlNode* _tmp17_ = NULL; + xmlNode* username_node = NULL; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = txn; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = publishing_rest_support_transaction_get_response (_tmp11_); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = _tmp12_; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = publishing_rest_support_xml_document_parse_string (_tmp13_, _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = _tmp14_; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp13_); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + doc = _tmp15_; +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 3966 "PiwigoPublishing.c" + goto __catch37_spit_publishing_publishing_error; + } +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 3979 "PiwigoPublishing.c" + } +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = doc; +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = publishing_rest_support_xml_document_get_root_node (_tmp16_); +#line 495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + root = _tmp17_; +#line 3987 "PiwigoPublishing.c" + { + xmlNode* _tmp18_ = NULL; + PublishingRESTSupportXmlDocument* _tmp19_ = NULL; + xmlNode* _tmp20_ = NULL; + xmlNode* _tmp21_ = NULL; + gchar* username = NULL; + xmlNode* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + PublishingPiwigoSession* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + PublishingPiwigoSession* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + PublishingPiwigoSession* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = doc; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = root; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = publishing_rest_support_xml_document_get_named_child (_tmp19_, _tmp20_, "username", &_inner_error_); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = _tmp21_; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4019 "PiwigoPublishing.c" + goto __catch38_spit_publishing_publishing_error; + } +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4034 "PiwigoPublishing.c" + } +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + username_node = _tmp18_; +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = username_node; +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = (gchar*) xmlNodeGetContent (_tmp22_); +#line 499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + username = _tmp23_; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = username; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:500: Returned username is %s", _tmp24_); +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = self->priv->session; +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = endpoint_url; +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = username; +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = pwg_id; +#line 501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_authenticate (_tmp25_, _tmp26_, _tmp27_, _tmp28_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = self->priv->session; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = publishing_piwigo_session_get_pwg_url (_tmp29_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = _tmp30_; +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_persistent_url (self, _tmp31_); +#line 502 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp31_); +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = self->priv->session; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = publishing_piwigo_session_get_username (_tmp32_); +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = _tmp33_; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_persistent_username (self, _tmp34_); +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp34_); +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_fetch_categories (self); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (username); +#line 4082 "PiwigoPublishing.c" + } + goto __finally38; + __catch38_spit_publishing_publishing_error: + { + GError* err2 = NULL; + GError* _tmp35_ = NULL; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err2 = _inner_error_; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 506 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:506: ERROR: on_session_get_status_complete, inne" \ +"r"); +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = err2; +#line 507 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp35_); +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err2); +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4109 "PiwigoPublishing.c" + } + __finally38: +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4118 "PiwigoPublishing.c" + goto __catch37_spit_publishing_publishing_error; + } +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4133 "PiwigoPublishing.c" + } +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 4137 "PiwigoPublishing.c" + } + goto __finally37; + __catch37_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp36_ = NULL; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 511 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:511: ERROR: on_session_get_status_complete, oute" \ +"r"); +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = err; +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp36_); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4162 "PiwigoPublishing.c" + } + __finally37: +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 491 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4177 "PiwigoPublishing.c" + } +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (endpoint_url); +#line 4183 "PiwigoPublishing.c" + } else { +#line 519 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_fetch_categories (self); +#line 4187 "PiwigoPublishing.c" + } +} + + +/** + * Event triggered when the get session status fails due to a network error. + */ +static void publishing_piwigo_piwigo_publisher_on_session_get_status_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + GError* _tmp5_ = NULL; +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 526 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:530: EVENT: on_session_get_status_error"); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = bad_txn; +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_complete_publishing_rest_support_transaction_completed, self); +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = bad_txn; +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_session_get_status_error_publishing_rest_support_transaction_network_error, self); +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = bad_txn; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = err; +#line 533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_network_error (self, _tmp4_, _tmp5_); +#line 4226 "PiwigoPublishing.c" +} + + +/** + * Action that fetches all available categories from the Piwigo service. + * + * This action fetches all categories from the Piwigo service in order + * to populate the publishing pane presented to the user. + */ +static void _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_category_fetch_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 4239 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_category_fetch_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender); +#line 4246 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_fetch_categories (PublishingPiwigoPiwigoPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPiwigoCategoriesGetListTransaction* cat_trans = NULL; + PublishingPiwigoSession* _tmp2_ = NULL; + PublishingPiwigoCategoriesGetListTransaction* _tmp3_ = NULL; + GError * _inner_error_ = NULL; +#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:543: ACTION: fetching categories"); +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->host; +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->session; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_categories_get_list_transaction_new (_tmp2_); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat_trans = _tmp3_; +#line 548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (cat_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error, self, 0); +#line 549 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (cat_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed, self, 0); +#line 4279 "PiwigoPublishing.c" + { +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (cat_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4287 "PiwigoPublishing.c" + goto __catch39_spit_publishing_publishing_error; + } +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (cat_trans); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4298 "PiwigoPublishing.c" + } + } + goto __finally39; + __catch39_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp4_ = NULL; +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:554: ERROR: do_fetch_categories"); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = err; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp4_); +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 4318 "PiwigoPublishing.c" + } + __finally39: +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (cat_trans); +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4331 "PiwigoPublishing.c" + } +#line 542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (cat_trans); +#line 4335 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the fetch categories action completes successfully. + * + * This event retrieves all categories from the received transaction and + * populates the categories list. It then triggers the display of the + * publishing options pane. + */ +static void _vala_array_add34 (PublishingPiwigoCategory*** array, int* length, int* size, PublishingPiwigoCategory* value) { +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoCategory*, *array, (*size) + 1); +#line 4353 "PiwigoPublishing.c" + } +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 4359 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_on_category_fetch_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + PublishingPiwigoCategory** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + GError * _inner_error_ = NULL; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:567: EVENT: on_category_fetch_complete"); +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = txn; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = txn; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:570: PiwigoConnector: list of categories: %s", _tmp6_); +#line 570 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp6_); +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->categories; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7__length1 = self->priv->categories_length1; +#line 572 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ != NULL) { +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = (_vala_array_free (self->priv->categories, self->priv->categories_length1, (GDestroyNotify) publishing_piwigo_category_unref), NULL); +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = NULL; +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories_length1 = 0; +#line 573 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_categories_size_ = self->priv->categories_length1; +#line 4416 "PiwigoPublishing.c" + } + { + PublishingRESTSupportXmlDocument* doc = NULL; + PublishingRESTSupportTransaction* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + PublishingRESTSupportXmlDocument* _tmp11_ = NULL; + PublishingRESTSupportXmlDocument* _tmp12_ = NULL; + xmlNode* root = NULL; + PublishingRESTSupportXmlDocument* _tmp13_ = NULL; + xmlNode* _tmp14_ = NULL; + xmlNode* categories_node = NULL; + xmlNode* _tmp15_ = NULL; + xmlNode* _tmp16_ = NULL; + xmlNode* category_node_iter = NULL; + xmlNode* _tmp17_ = NULL; + xmlNode* _tmp18_ = NULL; + xmlNode* name_node = NULL; + xmlNode* uppercats_node = NULL; + gchar* name = NULL; + gchar* _tmp19_ = NULL; + gchar* id_string = NULL; + gchar* _tmp20_ = NULL; + gchar* uppercats = NULL; + gchar* _tmp21_ = NULL; +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = txn; +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = publishing_rest_support_transaction_get_response (_tmp8_); +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _tmp9_; +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = publishing_rest_support_xml_document_parse_string (_tmp10_, _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_; +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp10_); +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + doc = _tmp12_; +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4460 "PiwigoPublishing.c" + goto __catch40_spit_publishing_publishing_error; + } +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 577 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4469 "PiwigoPublishing.c" + } +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = doc; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = publishing_rest_support_xml_document_get_root_node (_tmp13_); +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + root = _tmp14_; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = root; +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = xmlFirstElementChild (_tmp15_); +#line 581 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + categories_node = _tmp16_; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = categories_node; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = _tmp17_->children; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category_node_iter = _tmp18_; +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = g_strdup (""); +#line 585 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + name = _tmp19_; +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = g_strdup (""); +#line 586 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + id_string = _tmp20_; +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = g_strdup (""); +#line 587 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + uppercats = _tmp21_; +#line 4501 "PiwigoPublishing.c" + { + gboolean _tmp22_ = FALSE; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = TRUE; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 4508 "PiwigoPublishing.c" + xmlNode* _tmp25_ = NULL; + xmlNode* _tmp26_ = NULL; + PublishingRESTSupportXmlDocument* _tmp27_ = NULL; + xmlNode* _tmp28_ = NULL; + xmlNode* _tmp29_ = NULL; + xmlNode* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + xmlNode* _tmp32_ = NULL; + PublishingRESTSupportXmlDocument* _tmp33_ = NULL; + xmlNode* _tmp34_ = NULL; + xmlNode* _tmp35_ = NULL; + xmlNode* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + xmlNode* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; + PublishingPiwigoCategory** _tmp40_ = NULL; + gint _tmp40__length1 = 0; + PublishingPiwigoCategory** _tmp42_ = NULL; + gint _tmp42__length1 = 0; + const gchar* _tmp43_ = NULL; + gint _tmp44_ = 0; + const gchar* _tmp45_ = NULL; + const gchar* _tmp46_ = NULL; + PublishingPiwigoCategory* _tmp47_ = NULL; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp22_) { +#line 4535 "PiwigoPublishing.c" + xmlNode* _tmp23_ = NULL; + xmlNode* _tmp24_ = NULL; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = category_node_iter; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = _tmp23_->next; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category_node_iter = _tmp24_; +#line 4544 "PiwigoPublishing.c" + } +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = FALSE; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = category_node_iter; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp25_ != NULL)) { +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 4554 "PiwigoPublishing.c" + } +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = doc; +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = category_node_iter; +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = publishing_rest_support_xml_document_get_named_child (_tmp27_, _tmp28_, "name", &_inner_error_); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = _tmp29_; +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4576 "PiwigoPublishing.c" + goto __catch40_spit_publishing_publishing_error; + } +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4593 "PiwigoPublishing.c" + } +#line 589 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + name_node = _tmp26_; +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = name_node; +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = (gchar*) xmlNodeGetContent (_tmp30_); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 590 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + name = _tmp31_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = doc; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = category_node_iter; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = publishing_rest_support_xml_document_get_named_child (_tmp33_, _tmp34_, "uppercats", &_inner_error_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = _tmp35_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 4625 "PiwigoPublishing.c" + goto __catch40_spit_publishing_publishing_error; + } +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4642 "PiwigoPublishing.c" + } +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + uppercats_node = _tmp32_; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = uppercats_node; +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp37_ = (gchar*) xmlNodeGetContent (_tmp36_); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + uppercats = (gchar*) _tmp37_; +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_ = category_node_iter; +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp39_ = (gchar*) xmlGetProp (_tmp38_, (xmlChar*) "id"); +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + id_string = _tmp39_; +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = self->priv->categories; +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40__length1 = self->priv->categories_length1; +#line 594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp40_ == NULL) { +#line 4668 "PiwigoPublishing.c" + PublishingPiwigoCategory** _tmp41_ = NULL; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41_ = g_new0 (PublishingPiwigoCategory*, 0 + 1); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = (_vala_array_free (self->priv->categories, self->priv->categories_length1, (GDestroyNotify) publishing_piwigo_category_unref), NULL); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = _tmp41_; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories_length1 = 0; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_categories_size_ = self->priv->categories_length1; +#line 4680 "PiwigoPublishing.c" + } +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42_ = self->priv->categories; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42__length1 = self->priv->categories_length1; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp43_ = id_string; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = atoi (_tmp43_); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp45_ = name; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp46_ = uppercats; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_ = publishing_piwigo_category_new (_tmp44_, _tmp45_, _tmp46_, ""); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add34 (&self->priv->categories, &self->priv->categories_length1, &self->priv->_categories_size_, _tmp47_); +#line 4698 "PiwigoPublishing.c" + } + } + { + gint i = 0; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = 0; +#line 4705 "PiwigoPublishing.c" + { + gboolean _tmp48_ = FALSE; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = TRUE; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 4712 "PiwigoPublishing.c" + gint _tmp50_ = 0; + PublishingPiwigoCategory** _tmp51_ = NULL; + gint _tmp51__length1 = 0; + gchar** upcatids = NULL; + PublishingPiwigoCategory** _tmp52_ = NULL; + gint _tmp52__length1 = 0; + gint _tmp53_ = 0; + PublishingPiwigoCategory* _tmp54_ = NULL; + const gchar* _tmp55_ = NULL; + gchar** _tmp56_ = NULL; + gchar** _tmp57_ = NULL; + gint upcatids_length1 = 0; + gint _upcatids_size_ = 0; + GString* builder = NULL; + GString* _tmp58_ = NULL; + PublishingPiwigoCategory** _tmp84_ = NULL; + gint _tmp84__length1 = 0; + gint _tmp85_ = 0; + PublishingPiwigoCategory* _tmp86_ = NULL; + GString* _tmp87_ = NULL; + const gchar* _tmp88_ = NULL; + gchar* _tmp89_ = NULL; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp48_) { +#line 4737 "PiwigoPublishing.c" + gint _tmp49_ = 0; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp49_ = i; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = _tmp49_ + 1; +#line 4743 "PiwigoPublishing.c" + } +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = FALSE; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp50_ = i; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51_ = self->priv->categories; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51__length1 = self->priv->categories_length1; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp50_ < _tmp51__length1)) { +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 4757 "PiwigoPublishing.c" + } +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52_ = self->priv->categories; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52__length1 = self->priv->categories_length1; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp53_ = i; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp54_ = _tmp52_[_tmp53_]; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp55_ = _tmp54_->uppercats; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp57_ = _tmp56_ = g_strsplit (_tmp55_, ",", 0); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + upcatids = _tmp57_; +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + upcatids_length1 = _vala_array_length (_tmp56_); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _upcatids_size_ = upcatids_length1; +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp58_ = g_string_new (""); +#line 607 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + builder = _tmp58_; +#line 4781 "PiwigoPublishing.c" + { + gint j = 0; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + j = 0; +#line 4786 "PiwigoPublishing.c" + { + gboolean _tmp59_ = FALSE; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp59_ = TRUE; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 4793 "PiwigoPublishing.c" + gint _tmp61_ = 0; + gchar** _tmp62_ = NULL; + gint _tmp62__length1 = 0; + GString* _tmp63_ = NULL; + GString* _tmp83_ = NULL; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp59_) { +#line 4801 "PiwigoPublishing.c" + gint _tmp60_ = 0; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp60_ = j; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + j = _tmp60_ + 1; +#line 4807 "PiwigoPublishing.c" + } +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp59_ = FALSE; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp61_ = j; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp62_ = upcatids; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp62__length1 = upcatids_length1; +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp61_ < _tmp62__length1)) { +#line 608 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 4821 "PiwigoPublishing.c" + } +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp63_ = builder; +#line 609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_string_append (_tmp63_, "/ "); +#line 4827 "PiwigoPublishing.c" + { + gint k = 0; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + k = 0; +#line 4832 "PiwigoPublishing.c" + { + gboolean _tmp64_ = FALSE; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp64_ = TRUE; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 4839 "PiwigoPublishing.c" + gint _tmp66_ = 0; + PublishingPiwigoCategory** _tmp67_ = NULL; + gint _tmp67__length1 = 0; + gchar** _tmp68_ = NULL; + gint _tmp68__length1 = 0; + gint _tmp69_ = 0; + const gchar* _tmp70_ = NULL; + PublishingPiwigoCategory** _tmp71_ = NULL; + gint _tmp71__length1 = 0; + gint _tmp72_ = 0; + PublishingPiwigoCategory* _tmp73_ = NULL; + gint _tmp74_ = 0; + gchar* _tmp75_ = NULL; + gchar* _tmp76_ = NULL; + gboolean _tmp77_ = FALSE; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp64_) { +#line 4857 "PiwigoPublishing.c" + gint _tmp65_ = 0; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp65_ = k; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + k = _tmp65_ + 1; +#line 4863 "PiwigoPublishing.c" + } +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp64_ = FALSE; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp66_ = k; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp67_ = self->priv->categories; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp67__length1 = self->priv->categories_length1; +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp66_ < _tmp67__length1)) { +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 4877 "PiwigoPublishing.c" + } +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp68_ = upcatids; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp68__length1 = upcatids_length1; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp69_ = j; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp70_ = _tmp68_[_tmp69_]; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp71_ = self->priv->categories; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp71__length1 = self->priv->categories_length1; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp72_ = k; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp73_ = _tmp71_[_tmp72_]; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp74_ = _tmp73_->id; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp75_ = g_strdup_printf ("%i", _tmp74_); +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp76_ = _tmp75_; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp77_ = g_strcmp0 (_tmp70_, _tmp76_) == 0; +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp76_); +#line 612 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp77_) { +#line 4907 "PiwigoPublishing.c" + GString* _tmp78_ = NULL; + PublishingPiwigoCategory** _tmp79_ = NULL; + gint _tmp79__length1 = 0; + gint _tmp80_ = 0; + PublishingPiwigoCategory* _tmp81_ = NULL; + const gchar* _tmp82_ = NULL; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp78_ = builder; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp79_ = self->priv->categories; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp79__length1 = self->priv->categories_length1; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp80_ = k; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp81_ = _tmp79_[_tmp80_]; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp82_ = _tmp81_->name; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_string_append (_tmp78_, _tmp82_); +#line 614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 4930 "PiwigoPublishing.c" + } + } + } + } +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp83_ = builder; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_string_append (_tmp83_, " "); +#line 4939 "PiwigoPublishing.c" + } + } + } +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp84_ = self->priv->categories; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp84__length1 = self->priv->categories_length1; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp85_ = i; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp86_ = _tmp84_[_tmp85_]; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp87_ = builder; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp88_ = _tmp87_->str; +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp89_ = g_strdup (_tmp88_); +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp86_->display_name); +#line 619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp86_->display_name = _tmp89_; +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_string_free0 (builder); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + upcatids = (_vala_array_free (upcatids, upcatids_length1, (GDestroyNotify) g_free), NULL); +#line 4965 "PiwigoPublishing.c" + } + } + } +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uppercats); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 4977 "PiwigoPublishing.c" + } + goto __finally40; + __catch40_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp90_ = NULL; +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:622: ERROR: on_category_fetch_complete"); +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp90_ = err; +#line 623 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp90_); +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 624 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 4998 "PiwigoPublishing.c" + } + __finally40: +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 576 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5009 "PiwigoPublishing.c" + } +#line 627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_publishing_options_pane (self); +#line 5013 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the fetch categories transaction fails due to a + * network error. + */ +static void publishing_piwigo_piwigo_publisher_on_category_fetch_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + GError* _tmp5_ = NULL; +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:638: EVENT: on_category_fetch_error"); +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = bad_txn; +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 639 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = bad_txn; +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 640 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = bad_txn; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = err; +#line 641 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_network_error (self, _tmp4_, _tmp5_); +#line 5052 "PiwigoPublishing.c" +} + + +/** + * Action that shows the publishing options pane. + * + * This action method shows the publishing options pane. + */ +static void _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked_publishing_piwigo_publishing_options_pane_logout (PublishingPiwigoPublishingOptionsPane* _sender, gpointer self) { +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked ((PublishingPiwigoPiwigoPublisher*) self); +#line 5064 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked_publishing_piwigo_publishing_options_pane_publish (PublishingPiwigoPublishingOptionsPane* _sender, PublishingPiwigoPublishingParameters* parameters, gboolean strip_metadata, gpointer self) { +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked ((PublishingPiwigoPiwigoPublisher*) self, parameters, strip_metadata); +#line 5071 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_show_publishing_options_pane (PublishingPiwigoPiwigoPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingPiwigoPublishingOptionsPane* opts_pane = NULL; + PublishingPiwigoCategory** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; + PublishingPiwigoPublishingOptionsPane* _tmp8_ = NULL; + SpitPublishingPluginHost* _tmp9_ = NULL; + SpitPublishingPluginHost* _tmp10_ = NULL; + GtkWidget* _tmp11_ = NULL; + GtkWidget* _tmp12_ = NULL; +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 650 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:650: ACTION: installing publishing options pane"); +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 652 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->categories; +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1__length1 = self->priv->categories_length1; +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = publishing_piwigo_piwigo_publisher_get_last_category (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_piwigo_publisher_get_last_permission_level (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = publishing_piwigo_piwigo_publisher_get_last_photo_size (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_piwigo_publisher_get_last_title_as_comment (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_piwigo_piwigo_publisher_get_last_no_upload_tags (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_piwigo_piwigo_publisher_get_metadata_removal_choice (self); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = publishing_piwigo_publishing_options_pane_new (self, _tmp1_, _tmp1__length1, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_, _tmp7_); +#line 653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + opts_pane = _tmp8_; +#line 656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (opts_pane, "logout", (GCallback) _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked_publishing_piwigo_publishing_options_pane_logout, self, 0); +#line 657 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (opts_pane, "publish", (GCallback) _publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked_publishing_piwigo_publishing_options_pane_publish, self, 0); +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->host; +#line 658 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp9_, G_TYPE_CHECK_INSTANCE_CAST (opts_pane, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = self->priv->host; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = publishing_piwigo_publishing_options_pane_get_default_widget (opts_pane); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_; +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_dialog_default_widget (_tmp10_, _tmp12_); +#line 659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp12_); +#line 649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (opts_pane); +#line 5139 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the user clicks logout in the publishing options pane. + */ +static void _publishing_piwigo_piwigo_publisher_on_logout_network_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_logout_network_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 5149 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_logout_network_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_logout_network_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender); +#line 5156 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_logout_clicked (PublishingPiwigoPiwigoPublisher* self) { + PublishingPiwigoSessionLogoutTransaction* logout_trans = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + PublishingPiwigoSessionLogoutTransaction* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:666: EVENT: on_publishing_options_pane_logout_cl" \ +"icked"); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->session; +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_piwigo_session_logout_transaction_new (_tmp0_); +#line 667 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + logout_trans = _tmp1_; +#line 668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (logout_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_error_publishing_rest_support_transaction_network_error, self, 0); +#line 669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (logout_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_complete_publishing_rest_support_transaction_completed, self, 0); +#line 5179 "PiwigoPublishing.c" + { +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (logout_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5187 "PiwigoPublishing.c" + goto __catch41_spit_publishing_publishing_error; + } +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (logout_trans); +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 672 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5198 "PiwigoPublishing.c" + } + } + goto __finally41; + __catch41_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp2_ = NULL; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:674: ERROR: on_publishing_options_pane_logout_cl" \ +"icked"); +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = err; +#line 675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp2_); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 5218 "PiwigoPublishing.c" + } + __finally41: +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (logout_trans); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 671 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5231 "PiwigoPublishing.c" + } +#line 665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (logout_trans); +#line 5235 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the logout action completes successfully. + * + * This event de-authenticates the session and shows the authentication + * pane again. + */ +static void publishing_piwigo_piwigo_publisher_on_logout_network_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingPiwigoSession* _tmp4_ = NULL; +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 685 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 686 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:686: EVENT: on_logout_network_complete"); +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 687 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_complete_publishing_rest_support_transaction_completed, self); +#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = txn; +#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_error_publishing_rest_support_transaction_network_error, self); +#line 690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->session; +#line 690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_deauthenticate (_tmp4_); +#line 692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_authentication_pane (self, PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO); +#line 5275 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the logout action fails due to a network error. + */ +static void publishing_piwigo_piwigo_publisher_on_logout_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + GError* _tmp5_ = NULL; +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 698 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 702 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:702: EVENT: on_logout_network_error"); +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = bad_txn; +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_complete_publishing_rest_support_transaction_completed, self); +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = bad_txn; +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 704 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_logout_network_error_publishing_rest_support_transaction_network_error, self); +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = bad_txn; +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = err; +#line 705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_network_error (self, _tmp4_, _tmp5_); +#line 5313 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the user clicks publish in the publishing options pane. + * + * This event first saves the parameters so that they can re-used later. + * If the publishing parameters indicate that the user wants to create a new + * category, the create category action is called. Otherwise, the upload + * action is called. + * + * @param parameters the publishing parameters + */ +static gpointer _publishing_piwigo_publishing_parameters_ref0 (gpointer self) { +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? publishing_piwigo_publishing_parameters_ref (self) : NULL; +#line 5330 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_on_publishing_options_pane_publish_clicked (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoPublishingParameters* parameters, gboolean strip_metadata) { + PublishingPiwigoPublishingParameters* _tmp0_ = NULL; + PublishingPiwigoPublishingParameters* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + PublishingPiwigoPublishingParameters* _tmp3_ = NULL; + PublishingPiwigoCategory* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 718 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_PARAMETERS (parameters)); +#line 720 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:720: EVENT: on_publishing_options_pane_publish_c" \ +"licked"); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = parameters; +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _publishing_piwigo_publishing_parameters_ref0 (_tmp0_); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 721 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->parameters = _tmp1_; +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = strip_metadata; +#line 722 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->strip_metadata = _tmp2_; +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = parameters; +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_->category; +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_category_is_local (_tmp4_); +#line 724 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp5_) { +#line 5367 "PiwigoPublishing.c" + PublishingPiwigoPublishingParameters* _tmp6_ = NULL; + PublishingPiwigoCategory* _tmp7_ = NULL; +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = parameters; +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_->category; +#line 725 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_create_category (self, _tmp7_); +#line 5376 "PiwigoPublishing.c" + } else { + gboolean _tmp8_ = FALSE; +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->strip_metadata; +#line 727 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_upload (self, _tmp8_); +#line 5383 "PiwigoPublishing.c" + } +} + + +/** + * Action that creates a new category in the Piwigo library. + * + * This actions runs a REST transaction to create a new category in the + * Piwigo library. It displays a wait pane with an information message + * while the transaction is running. This action should only be called with + * a local cateogory, i.e. one that does not exist on the server and does + * not yet have an ID. + * + * @param category the new category to create on the server + */ +static gchar* string_strip (const gchar* self) { + gchar* result = NULL; + gchar* _result_ = NULL; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 1207 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = g_strdup (self); +#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _result_; +#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_strstrip (_tmp1_); +#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _result_; +#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 5418 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_category_add_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_category_add_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 5425 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_category_add_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_category_add_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender); +#line 5432 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_create_category (PublishingPiwigoPiwigoPublisher* self, PublishingPiwigoCategory* category) { + PublishingPiwigoCategory* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingPiwigoCategory* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + SpitPublishingPluginHost* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + PublishingPiwigoCategory* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + PublishingPiwigoCategoriesAddTransaction* creation_trans = NULL; + PublishingPiwigoSession* _tmp13_ = NULL; + PublishingPiwigoCategory* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + PublishingPiwigoCategory* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + gint _tmp20_ = 0; + PublishingPiwigoCategory* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + PublishingPiwigoCategoriesAddTransaction* _tmp23_ = NULL; + PublishingPiwigoCategoriesAddTransaction* _tmp24_ = NULL; + GError * _inner_error_ = NULL; +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_CATEGORY (category)); +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = category; +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _tmp0_->name; +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = g_strdup_printf ("ACTION: creating a new category: %s", _tmp1_); +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _tmp2_; +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:743: %s", _tmp3_); +#line 743 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp3_); +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = category; +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_category_is_local (_tmp4_); +#line 744 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_assert (_tmp5_, "category.is_local()"); +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->host; +#line 746 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp6_, TRUE); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->host; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _ ("Creating album %s..."); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = category; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _tmp9_->name; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = g_strdup_printf (_tmp8_, _tmp10_); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_; +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp7_, _tmp12_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 747 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp12_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = self->priv->session; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = category; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = _tmp14_->name; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = string_strip (_tmp15_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = _tmp16_; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = category; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = _tmp18_->uppercats; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = atoi (_tmp19_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = category; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = _tmp21_->comment; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = publishing_piwigo_categories_add_transaction_new (_tmp13_, _tmp17_, _tmp20_, _tmp22_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = _tmp23_; +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp17_); +#line 749 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + creation_trans = _tmp24_; +#line 751 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_error_publishing_rest_support_transaction_network_error, self, 0); +#line 752 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_complete_publishing_rest_support_transaction_completed, self, 0); +#line 5538 "PiwigoPublishing.c" + { +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (creation_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5546 "PiwigoPublishing.c" + goto __catch42_spit_publishing_publishing_error; + } +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 755 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5557 "PiwigoPublishing.c" + } + } + goto __finally42; + __catch42_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp25_ = NULL; +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 757 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:757: ERROR: do_create_category"); +#line 758 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = err; +#line 758 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp25_); +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 5577 "PiwigoPublishing.c" + } + __finally42: +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 754 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5590 "PiwigoPublishing.c" + } +#line 742 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_transaction_unref0 (creation_trans); +#line 5594 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the add category action completes successfully. + * + * This event parses the ID assigned to new category out of the received + * transaction and assigns that ID to the category currently held in + * the publishing parameters. It then calls the upload action. + */ +static void publishing_piwigo_piwigo_publisher_on_category_add_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + GError * _inner_error_ = NULL; +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 769 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 770 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:770: EVENT: on_category_add_complete"); +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 771 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_complete_publishing_rest_support_transaction_completed, self); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = txn; +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 772 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_error_publishing_rest_support_transaction_network_error, self); +#line 5629 "PiwigoPublishing.c" + { + PublishingRESTSupportXmlDocument* doc = NULL; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + PublishingRESTSupportXmlDocument* _tmp7_ = NULL; + PublishingRESTSupportXmlDocument* _tmp8_ = NULL; + xmlNode* rsp = NULL; + PublishingRESTSupportXmlDocument* _tmp9_ = NULL; + xmlNode* _tmp10_ = NULL; + xmlNode* id_node = NULL; + xmlNode* _tmp11_ = NULL; + PublishingRESTSupportXmlDocument* _tmp12_ = NULL; + xmlNode* _tmp13_ = NULL; + xmlNode* _tmp14_ = NULL; + gchar* id_string = NULL; + xmlNode* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gint id = 0; + const gchar* _tmp17_ = NULL; + gint _tmp18_ = 0; + PublishingPiwigoPublishingParameters* _tmp19_ = NULL; + PublishingPiwigoCategory* _tmp20_ = NULL; + gint _tmp21_ = 0; + gboolean _tmp22_ = FALSE; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = txn; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishing_rest_support_xml_document_parse_string (_tmp6_, _publishing_piwigo_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _tmp7_; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp6_); +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + doc = _tmp8_; +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5673 "PiwigoPublishing.c" + goto __catch43_spit_publishing_publishing_error; + } +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 776 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5682 "PiwigoPublishing.c" + } +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = doc; +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = publishing_rest_support_xml_document_get_root_node (_tmp9_); +#line 779 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + rsp = _tmp10_; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = doc; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = rsp; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = publishing_rest_support_xml_document_get_named_child (_tmp12_, _tmp13_, "id", &_inner_error_); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _tmp14_; +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 5704 "PiwigoPublishing.c" + goto __catch43_spit_publishing_publishing_error; + } +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5715 "PiwigoPublishing.c" + } +#line 781 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + id_node = _tmp11_; +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = id_node; +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = (gchar*) xmlNodeGetContent (_tmp15_); +#line 782 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + id_string = _tmp16_; +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = id_string; +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = atoi (_tmp17_); +#line 783 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + id = _tmp18_; +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = self->priv->parameters; +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = _tmp19_->category; +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = id; +#line 784 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_->id = _tmp21_; +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = self->priv->strip_metadata; +#line 785 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_upload (self, _tmp22_); +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (id_string); +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_xml_document_unref0 (doc); +#line 5747 "PiwigoPublishing.c" + } + goto __finally43; + __catch43_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp23_ = NULL; +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 787 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:787: ERROR: on_category_add_complete"); +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = err; +#line 788 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp23_); +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 5766 "PiwigoPublishing.c" + } + __finally43: +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 775 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 5777 "PiwigoPublishing.c" + } +} + + +/** + * Event triggered when the add category action fails due to a network error. + */ +static void publishing_piwigo_piwigo_publisher_on_category_add_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + GError* _tmp5_ = NULL; +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 795 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 799 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:799: EVENT: on_category_add_error"); +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = bad_txn; +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 800 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_complete_publishing_rest_support_transaction_completed, self); +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = bad_txn; +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 801 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_category_add_error_publishing_rest_support_transaction_network_error, self); +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = bad_txn; +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = err; +#line 802 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_network_error (self, _tmp4_, _tmp5_); +#line 5816 "PiwigoPublishing.c" +} + + +/** + * Upload action: the big one, the one we've been waiting for! + */ +static void _publishing_piwigo_piwigo_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { +#line 825 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_upload_complete ((PublishingPiwigoPiwigoPublisher*) self, _sender, num_photos_published); +#line 5826 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_upload_error ((PublishingPiwigoPiwigoPublisher*) self, _sender, err); +#line 5833 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_piwigo_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_on_upload_status_updated ((PublishingPiwigoPiwigoPublisher*) self, file_number, fraction_complete); +#line 5840 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_do_upload (PublishingPiwigoPiwigoPublisher* self, gboolean strip_metadata) { + gboolean _tmp0_ = FALSE; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingPiwigoPublishingParameters* _tmp2_ = NULL; + PublishingPiwigoCategory* _tmp3_ = NULL; + gint _tmp4_ = 0; + PublishingPiwigoPublishingParameters* _tmp5_ = NULL; + PublishingPiwigoPermissionLevel* _tmp6_ = NULL; + gint _tmp7_ = 0; + PublishingPiwigoPublishingParameters* _tmp8_ = NULL; + PublishingPiwigoSizeEntry* _tmp9_ = NULL; + gint _tmp10_ = 0; + PublishingPiwigoPublishingParameters* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + PublishingPiwigoPublishingParameters* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + gboolean _tmp15_ = FALSE; + SpitPublishingPluginHost* _tmp16_ = NULL; + PublishingPiwigoPublishingParameters* _tmp17_ = NULL; + PublishingPiwigoSizeEntry* _tmp18_ = NULL; + gint _tmp19_ = 0; + gboolean _tmp20_ = FALSE; + void* _tmp21_ = NULL; + GDestroyNotify _tmp22_ = NULL; + SpitPublishingProgressCallback _tmp23_ = NULL; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp24_ = NULL; + gint _tmp25_ = 0; + SpitPublishingPublishable** _tmp26_ = NULL; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + PublishingPiwigoUploader* uploader = NULL; + PublishingPiwigoSession* _tmp27_ = NULL; + PublishingPiwigoPublishingParameters* _tmp28_ = NULL; + PublishingPiwigoUploader* _tmp29_ = NULL; +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = strip_metadata; +#line 809 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->strip_metadata = _tmp0_; +#line 810 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:810: ACTION: uploading pictures"); +#line 812 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->host; +#line 812 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->parameters; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _tmp2_->category; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_->id; +#line 814 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_last_category (self, _tmp4_); +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->parameters; +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_->perm_level; +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_->id; +#line 815 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_last_permission_level (self, _tmp7_); +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->parameters; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = _tmp8_->photo_size; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _tmp9_->id; +#line 816 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_last_photo_size (self, _tmp10_); +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = self->priv->parameters; +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_->title_as_comment; +#line 817 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_last_title_as_comment (self, _tmp12_); +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = self->priv->parameters; +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _tmp13_->no_upload_tags; +#line 818 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_last_no_upload_tags (self, _tmp14_); +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = strip_metadata; +#line 819 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_set_metadata_removal_choice (self, _tmp15_); +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = self->priv->host; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = self->priv->parameters; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = _tmp17_->photo_size; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = _tmp18_->id; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = self->priv->strip_metadata; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = spit_publishing_plugin_host_serialize_publishables (_tmp16_, _tmp19_, _tmp20_, &_tmp21_, &_tmp22_); +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter = NULL; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter = _tmp23_; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target = _tmp21_; +#line 821 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp22_; +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = self->priv->host; +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = spit_publishing_plugin_host_get_publishables (_tmp24_, &_tmp25_); +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables = _tmp26_; +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables_length1 = _tmp25_; +#line 822 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishables_size_ = publishables_length1; +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = self->priv->session; +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = self->priv->parameters; +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = publishing_piwigo_uploader_new (_tmp27_, publishables, publishables_length1, _tmp28_); +#line 824 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + uploader = _tmp29_; +#line 825 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (uploader, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); +#line 826 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (uploader, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); +#line 827 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (uploader, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_piwigo_piwigo_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_batch_uploader_unref0 (uploader); +#line 808 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 5985 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the batch uploader reports that at least one of the + * network transactions encapsulating uploads has completed successfully + */ +static void publishing_piwigo_piwigo_publisher_on_upload_complete (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { + PublishingRESTSupportBatchUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 834 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 835 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:835: EVENT: on_upload_complete"); +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = uploader; +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); +#line 836 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = uploader; +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 837 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 841 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_success_pane (self); +#line 6018 "PiwigoPublishing.c" +} + + +/** + * Event triggered when the batch uploader reports that at least one of the + * network transactions encapsulating uploads has caused a network error + */ +static void publishing_piwigo_piwigo_publisher_on_upload_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { + PublishingRESTSupportBatchUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + GError* _tmp4_ = NULL; +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 848 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 852 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:852: EVENT: on_upload_error"); +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = uploader; +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); +#line 853 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = uploader; +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 854 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_piwigo_piwigo_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = err; +#line 856 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp4_); +#line 6054 "PiwigoPublishing.c" +} + + +/** + * Event triggered when upload progresses and the status needs to be updated. + */ +static void publishing_piwigo_piwigo_publisher_on_upload_status_updated (PublishingPiwigoPiwigoPublisher* self, gint file_number, gdouble completed_fraction) { + gboolean _tmp0_ = FALSE; + gdouble _tmp1_ = 0.0; + SpitPublishingProgressCallback _tmp2_ = NULL; + void* _tmp2__target = NULL; + SpitPublishingProgressCallback _tmp3_ = NULL; + void* _tmp3__target = NULL; + gint _tmp4_ = 0; + gdouble _tmp5_ = 0.0; +#line 862 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = spit_publishing_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher)); +#line 863 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp0_) { +#line 864 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 6078 "PiwigoPublishing.c" + } +#line 866 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = completed_fraction; +#line 866 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:866: EVENT: uploader reports upload %.2f percent" \ +" complete.", 100.0 * _tmp1_); +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->progress_reporter; +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2__target = self->priv->progress_reporter_target; +#line 868 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_assert (_tmp2_ != NULL, "progress_reporter != null"); +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = file_number; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = completed_fraction; +#line 870 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 6100 "PiwigoPublishing.c" +} + + +/** + * Action to display the success pane in the publishing dialog. + */ +static void publishing_piwigo_piwigo_publisher_do_show_success_pane (PublishingPiwigoPiwigoPublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 876 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 877 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:877: ACTION: installing success pane"); +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 879 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->host; +#line 880 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 6122 "PiwigoPublishing.c" +} + + +/** + * Helper event to handle network errors. + */ +static void publishing_piwigo_piwigo_publisher_on_network_error (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + GError* _tmp0_ = NULL; +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 886 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 890 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:890: EVENT: on_network_error"); +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = err; +#line 891 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error (self, _tmp0_); +#line 6141 "PiwigoPublishing.c" +} + + +/** + * Action to display an error to the user. + */ +static void publishing_piwigo_piwigo_publisher_do_show_error (PublishingPiwigoPiwigoPublisher* self, GError* e) { + gchar* error_type = NULL; + gchar* _tmp0_ = NULL; + GError* _tmp1_ = NULL; + const gchar* _tmp16_ = NULL; + GError* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 898 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:898: ACTION: do_show_error"); +#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = g_strdup ("UNKNOWN"); +#line 899 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp0_; +#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = e; +#line 900 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp1_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_NO_ANSWER)) { +#line 901 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_authentication_pane (self, PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL); +#line 902 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 902 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return; +#line 6176 "PiwigoPublishing.c" + } else { + GError* _tmp2_ = NULL; +#line 903 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = e; +#line 903 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp2_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_COMMUNICATION_FAILED)) { +#line 6183 "PiwigoPublishing.c" + gchar* _tmp3_ = NULL; +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_strdup ("COMMUNICATION_FAILED"); +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 904 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp3_; +#line 6191 "PiwigoPublishing.c" + } else { + GError* _tmp4_ = NULL; +#line 905 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = e; +#line 905 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp4_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_PROTOCOL_ERROR)) { +#line 6198 "PiwigoPublishing.c" + gchar* _tmp5_ = NULL; +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup ("PROTOCOL_ERROR"); +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 906 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp5_; +#line 6206 "PiwigoPublishing.c" + } else { + GError* _tmp6_ = NULL; +#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = e; +#line 907 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp6_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SERVICE_ERROR)) { +#line 6213 "PiwigoPublishing.c" + gchar* _tmp7_ = NULL; +#line 908 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strdup ("SERVICE_ERROR"); +#line 908 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 908 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp7_; +#line 6221 "PiwigoPublishing.c" + } else { + GError* _tmp8_ = NULL; +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = e; +#line 909 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp8_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE)) { +#line 6228 "PiwigoPublishing.c" + gchar* _tmp9_ = NULL; +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = g_strdup ("MALFORMED_RESPONSE"); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 910 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp9_; +#line 6236 "PiwigoPublishing.c" + } else { + GError* _tmp10_ = NULL; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = e; +#line 911 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp10_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR)) { +#line 6243 "PiwigoPublishing.c" + gchar* _tmp11_ = NULL; +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = g_strdup ("LOCAL_FILE_ERROR"); +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 912 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp11_; +#line 6251 "PiwigoPublishing.c" + } else { + GError* _tmp12_ = NULL; +#line 913 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = e; +#line 913 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp12_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_EXPIRED_SESSION)) { +#line 6258 "PiwigoPublishing.c" + gchar* _tmp13_ = NULL; +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = g_strdup ("EXPIRED_SESSION"); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 914 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp13_; +#line 6266 "PiwigoPublishing.c" + } else { + GError* _tmp14_ = NULL; +#line 915 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = e; +#line 915 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_error_matches (_tmp14_, SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_SSL_FAILED)) { +#line 6273 "PiwigoPublishing.c" + gchar* _tmp15_ = NULL; +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = g_strdup ("SECURE_CONNECTION_FAILED"); +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 916 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + error_type = _tmp15_; +#line 6281 "PiwigoPublishing.c" + } + } + } + } + } + } + } + } +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = error_type; +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = e; +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = _tmp17_->message; +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = g_strdup_printf ("Unhandled error: type=%s; message='%s'", _tmp16_, _tmp18_); +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = _tmp19_; +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:919: %s", _tmp20_); +#line 919 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp20_); +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = _ ("An error message occurred when publishing to Piwigo. Please try again."); +#line 920 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_do_show_error_message (self, _tmp21_); +#line 897 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (error_type); +#line 6310 "PiwigoPublishing.c" +} + + +/** + * Action to display an error message to the user. + */ +static void publishing_piwigo_piwigo_publisher_do_show_error_message (PublishingPiwigoPiwigoPublisher* self, const gchar* message) { + SpitPublishingPluginHost* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self)); +#line 926 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (message != NULL); +#line 927 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:927: ACTION: do_show_error_message"); +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->host; +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = message; +#line 928 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_install_static_message_pane (_tmp0_, _tmp1_, SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CLOSE); +#line 6332 "PiwigoPublishing.c" +} + + +/** + * Retrieves session ID from a REST Transaction received + * + * This helper method extracts the pwg_id out of the Set-Cookie header if + * present in the received transaction. + * + * @param txn the received transaction + * @return the value of pwg_id if present or null if not found + */ +static SoupCookie* _vala_SoupCookie_copy (SoupCookie* self) { +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return g_boxed_copy (soup_cookie_get_type (), self); +#line 6348 "PiwigoPublishing.c" +} + + +static gpointer __vala_SoupCookie_copy0 (gpointer self) { +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? _vala_SoupCookie_copy (self) : NULL; +#line 6355 "PiwigoPublishing.c" +} + + +static void _vala_SoupCookie_free (SoupCookie* self) { +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_boxed_free (soup_cookie_get_type (), self); +#line 6362 "PiwigoPublishing.c" +} + + +static void __vala_SoupCookie_free0_ (gpointer var) { +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (var == NULL) ? NULL : (var = (_vala_SoupCookie_free (var), NULL)); +#line 6369 "PiwigoPublishing.c" +} + + +static void _g_slist_free___vala_SoupCookie_free0_ (GSList* self) { +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_slist_foreach (self, (GFunc) __vala_SoupCookie_free0_, NULL); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_slist_free (self); +#line 6378 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_piwigo_publisher_get_pwg_id_from_transaction (PublishingPiwigoPiwigoPublisher* self, PublishingRESTSupportTransaction* txn) { + gchar* result = NULL; + gchar* pwg_id = NULL; + PublishingRESTSupportTransaction* _tmp0_ = NULL; + SoupMessage* _tmp1_ = NULL; + SoupMessage* _tmp2_ = NULL; + GSList* _tmp3_ = NULL; + GSList* _tmp4_ = NULL; +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (self), NULL); +#line 943 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn), NULL); +#line 944 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pwg_id = NULL; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = txn; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_rest_support_transaction_get_message (_tmp0_); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _tmp1_; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = soup_cookies_from_response (_tmp2_); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp2_); +#line 6408 "PiwigoPublishing.c" + { + GSList* cookie_collection = NULL; + GSList* cookie_it = NULL; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cookie_collection = _tmp4_; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (cookie_it = cookie_collection; cookie_it != NULL; cookie_it = cookie_it->next) { +#line 6416 "PiwigoPublishing.c" + SoupCookie* _tmp5_ = NULL; + SoupCookie* cookie = NULL; +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = __vala_SoupCookie_copy0 ((SoupCookie*) cookie_it->data); +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cookie = _tmp5_; +#line 6423 "PiwigoPublishing.c" + { + SoupCookie* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = cookie; +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = soup_cookie_get_name (_tmp6_); +#line 947 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp7_, "pwg_id") == 0) { +#line 6433 "PiwigoPublishing.c" + SoupCookie* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = cookie; +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = soup_cookie_get_value (_tmp8_); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = g_strdup (_tmp9_); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (pwg_id); +#line 950 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pwg_id = _tmp10_; +#line 951 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = pwg_id; +#line 951 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:951: Found pwg_id %s", _tmp11_); +#line 6452 "PiwigoPublishing.c" + } +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + __vala_SoupCookie_free0 (cookie); +#line 6456 "PiwigoPublishing.c" + } + } +#line 946 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + __g_slist_free___vala_SoupCookie_free0_0 (cookie_collection); +#line 6461 "PiwigoPublishing.c" + } +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = pwg_id; +#line 955 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 6467 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_class_init (PublishingPiwigoPiwigoPublisherClass * klass) { +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_parent_class = g_type_class_peek_parent (klass); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoPiwigoPublisherPrivate)); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_piwigo_piwigo_publisher_finalize; +#line 6478 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_spit_publishing_publisher_interface_init (SpitPublishingPublisherIface * iface) { +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_piwigo_publisher_spit_publishing_publisher_parent_iface = g_type_interface_peek_parent (iface); +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_service = (SpitPublishingService* (*)(SpitPublishingPublisher*)) publishing_piwigo_piwigo_publisher_real_get_service; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->is_running = (gboolean (*)(SpitPublishingPublisher*)) publishing_piwigo_piwigo_publisher_real_is_running; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->start = (void (*)(SpitPublishingPublisher*)) publishing_piwigo_piwigo_publisher_real_start; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->stop = (void (*)(SpitPublishingPublisher*)) publishing_piwigo_piwigo_publisher_real_stop; +#line 6493 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_instance_init (PublishingPiwigoPiwigoPublisher * self) { +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_PIWIGO_PUBLISHER_GET_PRIVATE (self); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->running = FALSE; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->strip_metadata = FALSE; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = NULL; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories_length1 = 0; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_categories_size_ = self->priv->categories_length1; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->parameters = NULL; +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter = NULL; +#line 6514 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_piwigo_publisher_finalize (GObject* obj) { + PublishingPiwigoPiwigoPublisher * self; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_PIWIGO_PUBLISHER, PublishingPiwigoPiwigoPublisher); +#line 122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->service); +#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->host); +#line 126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->categories = (_vala_array_free (self->priv->categories, self->priv->categories_length1, (GDestroyNotify) publishing_piwigo_category_unref), NULL); +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter = NULL; +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (publishing_piwigo_piwigo_publisher_parent_class)->finalize (obj); +#line 6542 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_piwigo_publisher_get_type (void) { + static volatile gsize publishing_piwigo_piwigo_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_piwigo_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoPiwigoPublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_piwigo_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoPiwigoPublisher), 0, (GInstanceInitFunc) publishing_piwigo_piwigo_publisher_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_publisher_info = { (GInterfaceInitFunc) publishing_piwigo_piwigo_publisher_spit_publishing_publisher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_piwigo_piwigo_publisher_type_id; + publishing_piwigo_piwigo_publisher_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingPiwigoPiwigoPublisher", &g_define_type_info, 0); + g_type_add_interface_static (publishing_piwigo_piwigo_publisher_type_id, SPIT_PUBLISHING_TYPE_PUBLISHER, &spit_publishing_publisher_info); + g_once_init_leave (&publishing_piwigo_piwigo_publisher_type_id__volatile, publishing_piwigo_piwigo_publisher_type_id); + } + return publishing_piwigo_piwigo_publisher_type_id__volatile; +} + + +PublishingPiwigoUploader* publishing_piwigo_uploader_construct (GType object_type, PublishingPiwigoSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPiwigoPublishingParameters* parameters) { + PublishingPiwigoUploader* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingPiwigoPublishingParameters* _tmp2_ = NULL; + PublishingPiwigoPublishingParameters* _tmp3_ = NULL; +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishables; +#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1__length1 = publishables_length1; +#line 966 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); +#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = parameters; +#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _publishing_piwigo_publishing_parameters_ref0 (_tmp2_); +#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 968 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->parameters = _tmp3_; +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 6589 "PiwigoPublishing.c" +} + + +PublishingPiwigoUploader* publishing_piwigo_uploader_new (PublishingPiwigoSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingPiwigoPublishingParameters* parameters) { +#line 964 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_uploader_construct (PUBLISHING_PIWIGO_TYPE_UPLOADER, session, publishables, publishables_length1, parameters); +#line 6596 "PiwigoPublishing.c" +} + + +static PublishingRESTSupportTransaction* publishing_piwigo_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { + PublishingPiwigoUploader * self; + PublishingRESTSupportTransaction* result = NULL; + PublishingRESTSupportSession* _tmp0_ = NULL; + PublishingPiwigoSession* _tmp1_ = NULL; + PublishingPiwigoPublishingParameters* _tmp2_ = NULL; + SpitPublishingPublishable* _tmp3_ = NULL; + PublishingPiwigoImagesAddTransaction* _tmp4_ = NULL; + PublishingRESTSupportTransaction* _tmp5_ = NULL; +#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploader); +#line 971 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSession); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->parameters; +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishable; +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = publishing_piwigo_images_add_transaction_new (_tmp1_, _tmp2_, _tmp3_); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp5_; +#line 973 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 6631 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_uploader_class_init (PublishingPiwigoUploaderClass * klass) { +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_uploader_parent_class = g_type_class_peek_parent (klass); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_piwigo_uploader_finalize; +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoUploaderPrivate)); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = publishing_piwigo_uploader_real_create_transaction; +#line 6644 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_uploader_instance_init (PublishingPiwigoUploader * self) { +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_UPLOADER_GET_PRIVATE (self); +#line 6651 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_uploader_finalize (PublishingRESTSupportBatchUploader* obj) { + PublishingPiwigoUploader * self; +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_UPLOADER, PublishingPiwigoUploader); +#line 962 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 961 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_piwigo_uploader_parent_class)->finalize (obj); +#line 6663 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_uploader_get_type (void) { + static volatile gsize publishing_piwigo_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_uploader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoUploader), 0, (GInstanceInitFunc) publishing_piwigo_uploader_instance_init, NULL }; + GType publishing_piwigo_uploader_type_id; + publishing_piwigo_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingPiwigoUploader", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_uploader_type_id__volatile, publishing_piwigo_uploader_type_id); + } + return publishing_piwigo_uploader_type_id__volatile; +} + + +GType publishing_piwigo_authentication_pane_mode_get_type (void) { + static volatile gsize publishing_piwigo_authentication_pane_mode_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_authentication_pane_mode_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO, "PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO", "intro"}, {PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL, "PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL", "failed-retry-url"}, {PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER, "PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER", "failed-retry-user"}, {0, NULL, NULL}}; + GType publishing_piwigo_authentication_pane_mode_type_id; + publishing_piwigo_authentication_pane_mode_type_id = g_enum_register_static ("PublishingPiwigoAuthenticationPaneMode", values); + g_once_init_leave (&publishing_piwigo_authentication_pane_mode_type_id__volatile, publishing_piwigo_authentication_pane_mode_type_id); + } + return publishing_piwigo_authentication_pane_mode_type_id__volatile; +} + + +static void _publishing_piwigo_authentication_pane_on_user_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 1051 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_on_user_changed ((PublishingPiwigoAuthenticationPane*) self); +#line 6694 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_authentication_pane_on_url_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_on_url_changed ((PublishingPiwigoAuthenticationPane*) self); +#line 6701 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_authentication_pane_on_password_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 1053 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_on_password_changed ((PublishingPiwigoAuthenticationPane*) self); +#line 6708 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_authentication_pane_on_login_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1054 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_on_login_button_clicked ((PublishingPiwigoAuthenticationPane*) self); +#line 6715 "PiwigoPublishing.c" +} + + +PublishingPiwigoAuthenticationPane* publishing_piwigo_authentication_pane_construct (GType object_type, PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoAuthenticationPaneMode mode) { + PublishingPiwigoAuthenticationPane * self = NULL; + GtkBox* _tmp0_ = NULL; + GError * _inner_error_ = NULL; +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (publisher), NULL); +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoAuthenticationPane*) g_object_new (object_type, NULL); +#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_object_ref_sink (_tmp0_); +#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1005 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pane_widget = _tmp0_; +#line 6735 "PiwigoPublishing.c" + { + GtkBuilder* _tmp1_ = NULL; + GtkBuilder* _tmp2_ = NULL; + GtkBuilder* _tmp3_ = NULL; + GtkAlignment* align = NULL; + GtkBuilder* _tmp4_ = NULL; + GObject* _tmp5_ = NULL; + GtkAlignment* _tmp6_ = NULL; + GtkLabel* message_label = NULL; + GtkBuilder* _tmp7_ = NULL; + GObject* _tmp8_ = NULL; + GtkLabel* _tmp9_ = NULL; + PublishingPiwigoAuthenticationPaneMode _tmp10_ = 0; + GtkBuilder* _tmp23_ = NULL; + GObject* _tmp24_ = NULL; + GtkEntry* _tmp25_ = NULL; + gchar* persistent_url = NULL; + PublishingPiwigoPiwigoPublisher* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GtkBuilder* _tmp31_ = NULL; + GObject* _tmp32_ = NULL; + GtkEntry* _tmp33_ = NULL; + gchar* persistent_username = NULL; + PublishingPiwigoPiwigoPublisher* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + const gchar* _tmp36_ = NULL; + GtkBuilder* _tmp39_ = NULL; + GObject* _tmp40_ = NULL; + GtkEntry* _tmp41_ = NULL; + gchar* persistent_password = NULL; + PublishingPiwigoPiwigoPublisher* _tmp42_ = NULL; + gchar* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + GtkBuilder* _tmp47_ = NULL; + GObject* _tmp48_ = NULL; + GtkCheckButton* _tmp49_ = NULL; + GtkCheckButton* _tmp50_ = NULL; + PublishingPiwigoPiwigoPublisher* _tmp51_ = NULL; + gboolean _tmp52_ = FALSE; + GtkBuilder* _tmp53_ = NULL; + GObject* _tmp54_ = NULL; + GtkButton* _tmp55_ = NULL; + GtkEntry* _tmp56_ = NULL; + GtkEntry* _tmp57_ = NULL; + GtkEntry* _tmp58_ = NULL; + GtkButton* _tmp59_ = NULL; + GtkAlignment* _tmp60_ = NULL; + GtkBox* _tmp61_ = NULL; + PublishingPiwigoPiwigoPublisher* _tmp62_ = NULL; + SpitPublishingPluginHost* _tmp63_ = NULL; + SpitPublishingPluginHost* _tmp64_ = NULL; + GtkButton* _tmp65_ = NULL; +#line 1008 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = gtk_builder_new (); +#line 1008 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1008 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->builder = _tmp1_; +#line 1009 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->builder; +#line 1009 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_builder_add_from_resource (_tmp2_, PLUGIN_RESOURCE_PATH "/piwigo_authentication_pane.ui", &_inner_error_); +#line 1009 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 6801 "PiwigoPublishing.c" + goto __catch44_g_error; + } +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->builder; +#line 1010 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_builder_connect_signals (_tmp3_, NULL); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->builder; +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = gtk_builder_get_object (_tmp4_, "alignment"); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_alignment_get_type ()) ? ((GtkAlignment*) _tmp5_) : NULL); +#line 1011 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + align = _tmp6_; +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->builder; +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = gtk_builder_get_object (_tmp7_, "message_label"); +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp8_) : NULL); +#line 1013 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + message_label = _tmp9_; +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = mode; +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + switch (_tmp10_) { +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + case PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_INTRO: +#line 6830 "PiwigoPublishing.c" + { + GtkLabel* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = message_label; +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = publishing_piwigo_authentication_pane_INTRO_MESSAGE; +#line 1016 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_label_set_text (_tmp11_, _tmp12_); +#line 1017 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 6842 "PiwigoPublishing.c" + } +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + case PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_URL: +#line 6846 "PiwigoPublishing.c" + { + GtkLabel* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = message_label; +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _ ("Invalid URL"); +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = publishing_piwigo_authentication_pane_FAILED_RETRY_URL_MESSAGE; +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = g_strdup_printf ("<b>%s</b>\n\n%s", _tmp14_, _tmp15_); +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = _tmp16_; +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_label_set_markup (_tmp13_, _tmp17_); +#line 1020 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp17_); +#line 1022 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 6869 "PiwigoPublishing.c" + } +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + case PUBLISHING_PIWIGO_AUTHENTICATION_PANE_MODE_FAILED_RETRY_USER: +#line 6873 "PiwigoPublishing.c" + { + GtkLabel* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + const gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = message_label; +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = _ ("Invalid User Name or Password"); +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = publishing_piwigo_authentication_pane_FAILED_RETRY_USER_MESSAGE; +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = g_strdup_printf ("<b>%s</b>\n\n%s", _tmp19_, _tmp20_); +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = _tmp21_; +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_label_set_markup (_tmp18_, _tmp22_); +#line 1025 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp22_); +#line 1027 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 6896 "PiwigoPublishing.c" + } + default: +#line 1014 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 6901 "PiwigoPublishing.c" + } +#line 1030 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = self->priv->builder; +#line 1030 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = gtk_builder_get_object (_tmp23_, "url_entry"); +#line 1030 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp24_) : NULL); +#line 1030 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->url_entry); +#line 1030 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->url_entry = _tmp25_; +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = publisher; +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = publishing_piwigo_piwigo_publisher_get_persistent_url (_tmp26_); +#line 1031 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_url = _tmp27_; +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = persistent_url; +#line 1032 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp28_ != NULL) { +#line 6923 "PiwigoPublishing.c" + GtkEntry* _tmp29_ = NULL; + const gchar* _tmp30_ = NULL; +#line 1033 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = self->priv->url_entry; +#line 1033 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = persistent_url; +#line 1033 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_entry_set_text (_tmp29_, _tmp30_); +#line 6932 "PiwigoPublishing.c" + } +#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = self->priv->builder; +#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = gtk_builder_get_object (_tmp31_, "username_entry"); +#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp32_) : NULL); +#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->username_entry); +#line 1035 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->username_entry = _tmp33_; +#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = publisher; +#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = publishing_piwigo_piwigo_publisher_get_persistent_username (_tmp34_); +#line 1036 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_username = _tmp35_; +#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = persistent_username; +#line 1037 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp36_ != NULL) { +#line 6954 "PiwigoPublishing.c" + GtkEntry* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; +#line 1038 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp37_ = self->priv->username_entry; +#line 1038 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_ = persistent_username; +#line 1038 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_entry_set_text (_tmp37_, _tmp38_); +#line 6963 "PiwigoPublishing.c" + } +#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp39_ = self->priv->builder; +#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = gtk_builder_get_object (_tmp39_, "password_entry"); +#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp40_) : NULL); +#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->password_entry); +#line 1040 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->password_entry = _tmp41_; +#line 1041 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42_ = publisher; +#line 1041 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp43_ = publishing_piwigo_piwigo_publisher_get_persistent_password (_tmp42_); +#line 1041 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + persistent_password = _tmp43_; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = persistent_password; +#line 1042 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp44_ != NULL) { +#line 6985 "PiwigoPublishing.c" + GtkEntry* _tmp45_ = NULL; + const gchar* _tmp46_ = NULL; +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp45_ = self->priv->password_entry; +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp46_ = persistent_password; +#line 1043 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_entry_set_text (_tmp45_, _tmp46_); +#line 6994 "PiwigoPublishing.c" + } +#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_ = self->priv->builder; +#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = gtk_builder_get_object (_tmp47_, "remember_password_checkbutton"); +#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp49_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, gtk_check_button_get_type ()) ? ((GtkCheckButton*) _tmp48_) : NULL); +#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->remember_password_checkbutton); +#line 1045 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->remember_password_checkbutton = _tmp49_; +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp50_ = self->priv->remember_password_checkbutton; +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51_ = publisher; +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52_ = publishing_piwigo_piwigo_publisher_get_remember_password (_tmp51_); +#line 1047 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp52_); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp53_ = self->priv->builder; +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp54_ = gtk_builder_get_object (_tmp53_, "login_button"); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp55_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, gtk_button_get_type ()) ? ((GtkButton*) _tmp54_) : NULL); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->login_button); +#line 1049 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->login_button = _tmp55_; +#line 1051 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp56_ = self->priv->username_entry; +#line 1051 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_piwigo_authentication_pane_on_user_changed_gtk_editable_changed, self, 0); +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp57_ = self->priv->url_entry; +#line 1052 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_piwigo_authentication_pane_on_url_changed_gtk_editable_changed, self, 0); +#line 1053 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp58_ = self->priv->password_entry; +#line 1053 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_piwigo_authentication_pane_on_password_changed_gtk_editable_changed, self, 0); +#line 1054 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp59_ = self->priv->login_button; +#line 1054 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (_tmp59_, "clicked", (GCallback) _publishing_piwigo_authentication_pane_on_login_button_clicked_gtk_button_clicked, self, 0); +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp60_ = align; +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp61_ = self->priv->pane_widget; +#line 1056 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_reparent (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, gtk_widget_get_type (), GtkWidget)); +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp62_ = publisher; +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp63_ = publishing_piwigo_piwigo_publisher_get_host (_tmp62_); +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp64_ = _tmp63_; +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp65_ = self->priv->login_button; +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + spit_publishing_plugin_host_set_dialog_default_widget (_tmp64_, G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_widget_get_type (), GtkWidget)); +#line 1057 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp64_); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_password); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_username); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (persistent_url); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (message_label); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (align); +#line 7068 "PiwigoPublishing.c" + } + goto __finally44; + __catch44_g_error: + { + GError* e = NULL; + GError* _tmp66_ = NULL; + const gchar* _tmp67_ = NULL; +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + e = _inner_error_; +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp66_ = e; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp67_ = _tmp66_->message; +#line 1059 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_warning ("PiwigoPublishing.vala:1059: Could not load UI: %s", _tmp67_); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (e); +#line 7088 "PiwigoPublishing.c" + } + __finally44: +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1007 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 7099 "PiwigoPublishing.c" + } +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 7103 "PiwigoPublishing.c" +} + + +PublishingPiwigoAuthenticationPane* publishing_piwigo_authentication_pane_new (PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoAuthenticationPaneMode mode) { +#line 1004 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_authentication_pane_construct (PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, publisher, mode); +#line 7110 "PiwigoPublishing.c" +} + + +GtkWidget* publishing_piwigo_authentication_pane_get_default_widget (PublishingPiwigoAuthenticationPane* self) { + GtkWidget* result = NULL; + GtkButton* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1063 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self), NULL); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->login_button; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1064 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 7128 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_on_login_button_clicked (PublishingPiwigoAuthenticationPane* self) { + GtkEntry* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + GtkEntry* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + GtkEntry* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GtkCheckButton* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#line 1067 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self)); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->url_entry; +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = gtk_entry_get_text (_tmp0_); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->username_entry; +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = gtk_entry_get_text (_tmp2_); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->password_entry; +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = gtk_entry_get_text (_tmp4_); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->remember_password_checkbutton; +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1068 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_emit_by_name (self, "login", _tmp1_, _tmp3_, _tmp5_, _tmp7_); +#line 7161 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_on_url_changed (PublishingPiwigoAuthenticationPane* self) { +#line 1072 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self)); +#line 1073 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_update_login_button_sensitivity (self); +#line 7170 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_on_user_changed (PublishingPiwigoAuthenticationPane* self) { +#line 1076 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self)); +#line 1077 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_update_login_button_sensitivity (self); +#line 7179 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_on_password_changed (PublishingPiwigoAuthenticationPane* self) { +#line 1080 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self)); +#line 1081 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_update_login_button_sensitivity (self); +#line 7188 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_update_login_button_sensitivity (PublishingPiwigoAuthenticationPane* self) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GtkEntry* _tmp2_ = NULL; + guint _tmp3_ = 0U; + guint _tmp4_ = 0U; + GtkButton* _tmp11_ = NULL; +#line 1084 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_AUTHENTICATION_PANE (self)); +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->url_entry; +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = gtk_entry_get_text_length (_tmp2_); +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_; +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp4_ != ((guint) 0)) { +#line 7209 "PiwigoPublishing.c" + GtkEntry* _tmp5_ = NULL; + guint _tmp6_ = 0U; + guint _tmp7_ = 0U; +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->username_entry; +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = gtk_entry_get_text_length (_tmp5_); +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_; +#line 1086 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _tmp7_ != ((guint) 0); +#line 7221 "PiwigoPublishing.c" + } else { +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = FALSE; +#line 7225 "PiwigoPublishing.c" + } +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp1_) { +#line 7229 "PiwigoPublishing.c" + GtkEntry* _tmp8_ = NULL; + guint _tmp9_ = 0U; + guint _tmp10_ = 0U; +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->password_entry; +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = gtk_entry_get_text_length (_tmp8_); +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _tmp9_; +#line 1087 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _tmp10_ != ((guint) 0); +#line 7241 "PiwigoPublishing.c" + } else { +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = FALSE; +#line 7245 "PiwigoPublishing.c" + } +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = self->priv->login_button; +#line 1085 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), _tmp0_); +#line 7251 "PiwigoPublishing.c" +} + + +static GtkWidget* publishing_piwigo_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingPiwigoAuthenticationPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1090 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane); +#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1091 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 7270 "PiwigoPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_piwigo_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingPiwigoAuthenticationPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 1094 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane); +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 1095 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 7283 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingPiwigoAuthenticationPane * self; + GtkEntry* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + GtkButton* _tmp2_ = NULL; +#line 1098 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane); +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->url_entry; +#line 1099 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->password_entry; +#line 1100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_entry_set_activates_default (_tmp1_, TRUE); +#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->login_button; +#line 1101 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1102 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_update_login_button_sensitivity (self); +#line 7308 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingPiwigoAuthenticationPane * self; +#line 1105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane); +#line 7316 "PiwigoPublishing.c" +} + + +static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_BOOLEAN) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gboolean arg_4, gpointer data2); + register GMarshalFunc_VOID__STRING_STRING_STRING_BOOLEAN callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (n_param_values == 5); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data1 = closure->data; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data2 = param_values->data[0].v_pointer; +#line 7335 "PiwigoPublishing.c" + } else { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data1 = param_values->data[0].v_pointer; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data2 = closure->data; +#line 7341 "PiwigoPublishing.c" + } +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + callback = (GMarshalFunc_VOID__STRING_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), g_value_get_boolean (param_values + 4), data2); +#line 7347 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_class_init (PublishingPiwigoAuthenticationPaneClass * klass) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_parent_class = g_type_class_peek_parent (klass); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoAuthenticationPanePrivate)); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_piwigo_authentication_pane_finalize; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_new ("login", PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); +#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _ ("Enter the URL of your Piwigo photo library as well as the username and" \ +" password associated with your Piwigo account for that library."); +#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 990 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_INTRO_MESSAGE = _tmp1_; +#line 991 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _ ("Shotwell cannot contact your Piwigo photo library. Please verify the U" \ +"RL you entered"); +#line 991 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 991 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_FAILED_RETRY_URL_MESSAGE = _tmp3_; +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _ ("Username and/or password invalid. Please try again"); +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 992 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_FAILED_RETRY_USER_MESSAGE = _tmp5_; +#line 7384 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_piwigo_authentication_pane_real_get_widget; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_piwigo_authentication_pane_real_get_preferred_geometry; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_piwigo_authentication_pane_real_on_pane_installed; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_piwigo_authentication_pane_real_on_pane_uninstalled; +#line 7399 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_instance_init (PublishingPiwigoAuthenticationPane * self) { +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_AUTHENTICATION_PANE_GET_PRIVATE (self); +#line 994 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pane_widget = NULL; +#line 7408 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_authentication_pane_finalize (GObject* obj) { + PublishingPiwigoAuthenticationPane * self; +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_AUTHENTICATION_PANE, PublishingPiwigoAuthenticationPane); +#line 994 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 995 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 996 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->url_entry); +#line 997 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->username_entry); +#line 998 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->password_entry); +#line 999 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->remember_password_checkbutton); +#line 1000 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->login_button); +#line 984 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (publishing_piwigo_authentication_pane_parent_class)->finalize (obj); +#line 7432 "PiwigoPublishing.c" +} + + +/** + * The authentication pane used when asking service URL, user name and password + * from the user. + */ +GType publishing_piwigo_authentication_pane_get_type (void) { + static volatile gsize publishing_piwigo_authentication_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_authentication_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoAuthenticationPane), 0, (GInstanceInitFunc) publishing_piwigo_authentication_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_piwigo_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_piwigo_authentication_pane_type_id; + publishing_piwigo_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingPiwigoAuthenticationPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_piwigo_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_piwigo_authentication_pane_type_id__volatile, publishing_piwigo_authentication_pane_type_id); + } + return publishing_piwigo_authentication_pane_type_id__volatile; +} + + +static void _publishing_piwigo_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_logout_button_clicked ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7457 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_publish_button_clicked ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7464 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7471 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7478 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_publishing_options_pane_on_new_category_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self) { +#line 1196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_new_category_entry_changed ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7485 "PiwigoPublishing.c" +} + + +static void _publishing_piwigo_publishing_options_pane_on_existing_combo_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_on_existing_combo_changed ((PublishingPiwigoPublishingOptionsPane*) self); +#line 7492 "PiwigoPublishing.c" +} + + +static gpointer _publishing_piwigo_category_ref0 (gpointer self) { +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? publishing_piwigo_category_ref (self) : NULL; +#line 7499 "PiwigoPublishing.c" +} + + +static PublishingPiwigoCategory** _vala_array_dup11 (PublishingPiwigoCategory** self, int length) { + PublishingPiwigoCategory** result; + int i; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = g_new0 (PublishingPiwigoCategory*, length + 1); +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (i = 0; i < length; i++) { +#line 7510 "PiwigoPublishing.c" + PublishingPiwigoCategory* _tmp0_ = NULL; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _publishing_piwigo_category_ref0 (self[i]); +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result[i] = _tmp0_; +#line 7516 "PiwigoPublishing.c" + } +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 7520 "PiwigoPublishing.c" +} + + +PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane_construct (GType object_type, PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoCategory** categories, int categories_length1, gint last_category, gint last_permission_level, gint last_photo_size, gboolean last_title_as_comment, gboolean last_no_upload_tags, gboolean strip_metadata_enabled) { + PublishingPiwigoPublishingOptionsPane * self = NULL; + GtkBox* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + PublishingPiwigoCategory** _tmp78_ = NULL; + gint _tmp78__length1 = 0; + PublishingPiwigoCategory** _tmp79_ = NULL; + gint _tmp79__length1 = 0; + gint _tmp80_ = 0; + PublishingPiwigoPermissionLevel** _tmp81_ = NULL; + gint _tmp82_ = 0; + PublishingPiwigoSizeEntry** _tmp83_ = NULL; + GtkTextView* _tmp84_ = NULL; + GtkTextBuffer* _tmp85_ = NULL; + GtkTextBuffer* _tmp86_ = NULL; + PublishingPiwigoPiwigoPublisher* _tmp87_ = NULL; + gchar* _tmp88_ = NULL; + gchar* _tmp89_ = NULL; + GError * _inner_error_ = NULL; +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (publisher), NULL); +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoPublishingOptionsPane*) g_object_new (object_type, NULL); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_object_ref_sink (_tmp0_); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1152 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pane_widget = _tmp0_; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = last_category; +#line 1153 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->last_category = _tmp1_; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = last_permission_level; +#line 1154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->last_permission_level = _tmp2_; +#line 1155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = last_photo_size; +#line 1155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->last_photo_size = _tmp3_; +#line 1156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = last_title_as_comment; +#line 1156 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->last_title_as_comment = _tmp4_; +#line 1157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = last_no_upload_tags; +#line 1157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->last_no_upload_tags = _tmp5_; +#line 7579 "PiwigoPublishing.c" + { + GtkBuilder* _tmp6_ = NULL; + GtkBuilder* _tmp7_ = NULL; + GtkBuilder* _tmp8_ = NULL; + GtkAlignment* align = NULL; + GtkBuilder* _tmp9_ = NULL; + GObject* _tmp10_ = NULL; + GtkAlignment* _tmp11_ = NULL; + GtkBuilder* _tmp12_ = NULL; + GObject* _tmp13_ = NULL; + GtkRadioButton* _tmp14_ = NULL; + GtkBuilder* _tmp15_ = NULL; + GObject* _tmp16_ = NULL; + GtkRadioButton* _tmp17_ = NULL; + GtkBuilder* _tmp18_ = NULL; + GObject* _tmp19_ = NULL; + GtkComboBoxText* _tmp20_ = NULL; + GtkBuilder* _tmp21_ = NULL; + GObject* _tmp22_ = NULL; + GtkEntry* _tmp23_ = NULL; + GtkBuilder* _tmp24_ = NULL; + GObject* _tmp25_ = NULL; + GtkLabel* _tmp26_ = NULL; + GtkBuilder* _tmp27_ = NULL; + GObject* _tmp28_ = NULL; + GtkComboBoxText* _tmp29_ = NULL; + GtkBuilder* _tmp30_ = NULL; + GObject* _tmp31_ = NULL; + GtkTextView* _tmp32_ = NULL; + GtkTextView* _tmp33_ = NULL; + GtkTextBuffer* _tmp34_ = NULL; + GtkTextBuffer* _tmp35_ = NULL; + GtkBuilder* _tmp36_ = NULL; + GObject* _tmp37_ = NULL; + GtkLabel* _tmp38_ = NULL; + GtkBuilder* _tmp39_ = NULL; + GObject* _tmp40_ = NULL; + GtkComboBoxText* _tmp41_ = NULL; + GtkBuilder* _tmp42_ = NULL; + GObject* _tmp43_ = NULL; + GtkComboBoxText* _tmp44_ = NULL; + GtkBuilder* _tmp45_ = NULL; + GObject* _tmp46_ = NULL; + GtkCheckButton* _tmp47_ = NULL; + GtkCheckButton* _tmp48_ = NULL; + gboolean _tmp49_ = FALSE; + GtkBuilder* _tmp50_ = NULL; + GObject* _tmp51_ = NULL; + GtkCheckButton* _tmp52_ = NULL; + GtkCheckButton* _tmp53_ = NULL; + gboolean _tmp54_ = FALSE; + GtkBuilder* _tmp55_ = NULL; + GObject* _tmp56_ = NULL; + GtkCheckButton* _tmp57_ = NULL; + GtkCheckButton* _tmp58_ = NULL; + gboolean _tmp59_ = FALSE; + GtkBuilder* _tmp60_ = NULL; + GObject* _tmp61_ = NULL; + GtkButton* _tmp62_ = NULL; + GtkButton* _tmp63_ = NULL; + GtkBuilder* _tmp64_ = NULL; + GObject* _tmp65_ = NULL; + GtkButton* _tmp66_ = NULL; + GtkButton* _tmp67_ = NULL; + GtkRadioButton* _tmp68_ = NULL; + GtkRadioButton* _tmp69_ = NULL; + GtkEntry* _tmp70_ = NULL; + GtkComboBoxText* _tmp71_ = NULL; + GtkAlignment* _tmp72_ = NULL; + GtkBox* _tmp73_ = NULL; + GtkBox* _tmp74_ = NULL; + GtkAlignment* _tmp75_ = NULL; +#line 1160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = gtk_builder_new (); +#line 1160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1160 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->builder = _tmp6_; +#line 1161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->builder; +#line 1161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_builder_add_from_resource (_tmp7_, PLUGIN_RESOURCE_PATH "/piwigo_publishing_options_pane.ui", &_inner_error_); +#line 1161 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 7664 "PiwigoPublishing.c" + goto __catch45_g_error; + } +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->builder; +#line 1162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_builder_connect_signals (_tmp8_, NULL); +#line 1163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->builder; +#line 1163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = gtk_builder_get_object (_tmp9_, "alignment"); +#line 1163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, gtk_alignment_get_type ()) ? ((GtkAlignment*) _tmp10_) : NULL); +#line 1163 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + align = _tmp11_; +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = self->priv->builder; +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = gtk_builder_get_object (_tmp12_, "use_existing_radio"); +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, gtk_radio_button_get_type ()) ? ((GtkRadioButton*) _tmp13_) : NULL); +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 1165 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->use_existing_radio = _tmp14_; +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = self->priv->builder; +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = gtk_builder_get_object (_tmp15_, "create_new_radio"); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, gtk_radio_button_get_type ()) ? ((GtkRadioButton*) _tmp16_) : NULL); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 1166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->create_new_radio = _tmp17_; +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = self->priv->builder; +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = gtk_builder_get_object (_tmp18_, "existing_categories_combo"); +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, gtk_combo_box_text_get_type ()) ? ((GtkComboBoxText*) _tmp19_) : NULL); +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->existing_categories_combo); +#line 1167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->existing_categories_combo = _tmp20_; +#line 1168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = self->priv->builder; +#line 1168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = gtk_builder_get_object (_tmp21_, "new_category_entry"); +#line 1168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, gtk_entry_get_type ()) ? ((GtkEntry*) _tmp22_) : NULL); +#line 1168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->new_category_entry); +#line 1168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->new_category_entry = _tmp23_; +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = self->priv->builder; +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = gtk_builder_get_object (_tmp24_, "within_existing_label"); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp25_) : NULL); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->within_existing_label); +#line 1169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->within_existing_label = _tmp26_; +#line 1170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = self->priv->builder; +#line 1170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = gtk_builder_get_object (_tmp27_, "within_existing_combo"); +#line 1170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, gtk_combo_box_text_get_type ()) ? ((GtkComboBoxText*) _tmp28_) : NULL); +#line 1170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->within_existing_combo); +#line 1170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->within_existing_combo = _tmp29_; +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = self->priv->builder; +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = gtk_builder_get_object (_tmp30_, "album_comment"); +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, gtk_text_view_get_type ()) ? ((GtkTextView*) _tmp31_) : NULL); +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->album_comment); +#line 1172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->album_comment = _tmp32_; +#line 1173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = self->priv->album_comment; +#line 1173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = gtk_text_buffer_new (NULL); +#line 1173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = _tmp34_; +#line 1173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_text_view_set_buffer (_tmp33_, _tmp35_); +#line 1173 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp35_); +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = self->priv->builder; +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp37_ = gtk_builder_get_object (_tmp36_, "album_comment_label"); +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp37_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp37_) : NULL); +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->album_comment_label); +#line 1174 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->album_comment_label = _tmp38_; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp39_ = self->priv->builder; +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = gtk_builder_get_object (_tmp39_, "perms_combo"); +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, gtk_combo_box_text_get_type ()) ? ((GtkComboBoxText*) _tmp40_) : NULL); +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->perms_combo); +#line 1176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->perms_combo = _tmp41_; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42_ = self->priv->builder; +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp43_ = gtk_builder_get_object (_tmp42_, "size_combo"); +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, gtk_combo_box_text_get_type ()) ? ((GtkComboBoxText*) _tmp43_) : NULL); +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 1177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->size_combo = _tmp44_; +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp45_ = self->priv->builder; +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp46_ = gtk_builder_get_object (_tmp45_, "strip_metadata_check"); +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp46_, gtk_check_button_get_type ()) ? ((GtkCheckButton*) _tmp46_) : NULL); +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->strip_metadata_check = _tmp47_; +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = self->priv->strip_metadata_check; +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp49_ = strip_metadata_enabled; +#line 1180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp49_); +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp50_ = self->priv->builder; +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51_ = gtk_builder_get_object (_tmp50_, "title_as_comment_check"); +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp51_, gtk_check_button_get_type ()) ? ((GtkCheckButton*) _tmp51_) : NULL); +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->title_as_comment_check); +#line 1182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->title_as_comment_check = _tmp52_; +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp53_ = self->priv->title_as_comment_check; +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp54_ = last_title_as_comment; +#line 1183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp54_); +#line 1185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp55_ = self->priv->builder; +#line 1185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp56_ = gtk_builder_get_object (_tmp55_, "no_upload_tags_check"); +#line 1185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp57_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp56_, gtk_check_button_get_type ()) ? ((GtkCheckButton*) _tmp56_) : NULL); +#line 1185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->no_upload_tags_check); +#line 1185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->no_upload_tags_check = _tmp57_; +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp58_ = self->priv->no_upload_tags_check; +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp59_ = last_no_upload_tags; +#line 1186 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp59_); +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp60_ = self->priv->builder; +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp61_ = gtk_builder_get_object (_tmp60_, "logout_button"); +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp62_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, gtk_button_get_type ()) ? ((GtkButton*) _tmp61_) : NULL); +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1188 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->logout_button = _tmp62_; +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp63_ = self->priv->logout_button; +#line 1189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (_tmp63_, "clicked", (GCallback) _publishing_piwigo_publishing_options_pane_on_logout_button_clicked_gtk_button_clicked, self, 0); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp64_ = self->priv->builder; +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp65_ = gtk_builder_get_object (_tmp64_, "publish_button"); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp66_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, gtk_button_get_type ()) ? ((GtkButton*) _tmp65_) : NULL); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->publish_button = _tmp66_; +#line 1192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp67_ = self->priv->publish_button; +#line 1192 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (_tmp67_, "clicked", (GCallback) _publishing_piwigo_publishing_options_pane_on_publish_button_clicked_gtk_button_clicked, self, 0); +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp68_ = self->priv->use_existing_radio; +#line 1194 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked_gtk_button_clicked, self, 0); +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp69_ = self->priv->create_new_radio; +#line 1195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked_gtk_button_clicked, self, 0); +#line 1196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp70_ = self->priv->new_category_entry; +#line 1196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, GTK_TYPE_EDITABLE, GtkEditable), "changed", (GCallback) _publishing_piwigo_publishing_options_pane_on_new_category_entry_changed_gtk_editable_changed, self, 0); +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp71_ = self->priv->within_existing_combo; +#line 1197 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _publishing_piwigo_publishing_options_pane_on_existing_combo_changed_gtk_combo_box_changed, self, 0); +#line 1199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp72_ = align; +#line 1199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp73_ = self->priv->pane_widget; +#line 1199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_reparent (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, gtk_widget_get_type (), GtkWidget)); +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp74_ = self->priv->pane_widget; +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp75_ = align; +#line 1200 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_box_set_child_packing (_tmp74_, G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0, GTK_PACK_START); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (align); +#line 7895 "PiwigoPublishing.c" + } + goto __finally45; + __catch45_g_error: + { + GError* e = NULL; + GError* _tmp76_ = NULL; + const gchar* _tmp77_ = NULL; +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + e = _inner_error_; +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 1202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp76_ = e; +#line 1202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp77_ = _tmp76_->message; +#line 1202 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_warning ("PiwigoPublishing.vala:1202: Could not load UI: %s", _tmp77_); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (e); +#line 7915 "PiwigoPublishing.c" + } + __finally45: +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 7926 "PiwigoPublishing.c" + } +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp78_ = categories; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp78__length1 = categories_length1; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp79_ = (_tmp78_ != NULL) ? _vala_array_dup11 (_tmp78_, _tmp78__length1) : ((gpointer) _tmp78_); +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp79__length1 = _tmp78__length1; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->existing_categories = (_vala_array_free (self->priv->existing_categories, self->priv->existing_categories_length1, (GDestroyNotify) publishing_piwigo_category_unref), NULL); +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->existing_categories = _tmp79_; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->existing_categories_length1 = _tmp79__length1; +#line 1205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_existing_categories_size_ = self->priv->existing_categories_length1; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp81_ = publishing_piwigo_publishing_options_pane_create_perm_levels (self, &_tmp80_); +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->perm_levels = (_vala_array_free (self->priv->perm_levels, self->priv->perm_levels_length1, (GDestroyNotify) publishing_piwigo_permission_level_unref), NULL); +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->perm_levels = _tmp81_; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->perm_levels_length1 = _tmp80_; +#line 1206 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_perm_levels_size_ = self->priv->perm_levels_length1; +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp83_ = publishing_piwigo_publishing_options_pane_create_sizes (self, &_tmp82_); +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->photo_sizes = (_vala_array_free (self->priv->photo_sizes, self->priv->photo_sizes_length1, (GDestroyNotify) publishing_piwigo_size_entry_unref), NULL); +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->photo_sizes = _tmp83_; +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->photo_sizes_length1 = _tmp82_; +#line 1207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->_photo_sizes_size_ = self->priv->photo_sizes_length1; +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp84_ = self->priv->album_comment; +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp85_ = gtk_text_view_get_buffer (_tmp84_); +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp86_ = _tmp85_; +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp87_ = publisher; +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp88_ = publishing_piwigo_publishing_options_pane_get_common_comment_if_possible (self, _tmp87_); +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp89_ = _tmp88_; +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_text_buffer_set_text (_tmp86_, _tmp89_, -1); +#line 1208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp89_); +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 7982 "PiwigoPublishing.c" +} + + +PublishingPiwigoPublishingOptionsPane* publishing_piwigo_publishing_options_pane_new (PublishingPiwigoPiwigoPublisher* publisher, PublishingPiwigoCategory** categories, int categories_length1, gint last_category, gint last_permission_level, gint last_photo_size, gboolean last_title_as_comment, gboolean last_no_upload_tags, gboolean strip_metadata_enabled) { +#line 1147 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_publishing_options_pane_construct (PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, publisher, categories, categories_length1, last_category, last_permission_level, last_photo_size, last_title_as_comment, last_no_upload_tags, strip_metadata_enabled); +#line 7989 "PiwigoPublishing.c" +} + + +GtkWidget* publishing_piwigo_publishing_options_pane_get_default_widget (PublishingPiwigoPublishingOptionsPane* self) { + GtkWidget* result = NULL; + GtkButton* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1211 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->publish_button; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1212 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 8007 "PiwigoPublishing.c" +} + + +static void _vala_array_add35 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoPermissionLevel*, *array, (*size) + 1); +#line 8018 "PiwigoPublishing.c" + } +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8024 "PiwigoPublishing.c" +} + + +static void _vala_array_add36 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoPermissionLevel*, *array, (*size) + 1); +#line 8035 "PiwigoPublishing.c" + } +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8041 "PiwigoPublishing.c" +} + + +static void _vala_array_add37 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoPermissionLevel*, *array, (*size) + 1); +#line 8052 "PiwigoPublishing.c" + } +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8058 "PiwigoPublishing.c" +} + + +static void _vala_array_add38 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoPermissionLevel*, *array, (*size) + 1); +#line 8069 "PiwigoPublishing.c" + } +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8075 "PiwigoPublishing.c" +} + + +static void _vala_array_add39 (PublishingPiwigoPermissionLevel*** array, int* length, int* size, PublishingPiwigoPermissionLevel* value) { +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoPermissionLevel*, *array, (*size) + 1); +#line 8086 "PiwigoPublishing.c" + } +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8092 "PiwigoPublishing.c" +} + + +static PublishingPiwigoPermissionLevel** publishing_piwigo_publishing_options_pane_create_perm_levels (PublishingPiwigoPublishingOptionsPane* self, int* result_length1) { + PublishingPiwigoPermissionLevel** result = NULL; + PublishingPiwigoPermissionLevel** _result_ = NULL; + PublishingPiwigoPermissionLevel** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingPiwigoPermissionLevel** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingPiwigoPermissionLevel* _tmp3_ = NULL; + PublishingPiwigoPermissionLevel** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingPiwigoPermissionLevel* _tmp6_ = NULL; + PublishingPiwigoPermissionLevel** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingPiwigoPermissionLevel* _tmp9_ = NULL; + PublishingPiwigoPermissionLevel** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + PublishingPiwigoPermissionLevel* _tmp12_ = NULL; + PublishingPiwigoPermissionLevel** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + PublishingPiwigoPermissionLevel* _tmp15_ = NULL; + PublishingPiwigoPermissionLevel** _tmp16_ = NULL; + gint _tmp16__length1 = 0; +#line 1215 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = g_new0 (PublishingPiwigoPermissionLevel*, 0 + 1); +#line 1216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = _tmp0_; +#line 1216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result__length1 = 0; +#line 1216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + __result__size_ = _result__length1; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _result_; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _ ("Everyone"); +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_permission_level_new (0, _tmp2_); +#line 1218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add35 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _result_; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4__length1 = _result__length1; +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _ ("Admins, Family, Friends, Contacts"); +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_piwigo_permission_level_new (1, _tmp5_); +#line 1219 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add36 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _result_; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7__length1 = _result__length1; +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _ ("Admins, Family, Friends"); +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = publishing_piwigo_permission_level_new (2, _tmp8_); +#line 1220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add37 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _result_; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10__length1 = _result__length1; +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _ ("Admins, Family"); +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = publishing_piwigo_permission_level_new (4, _tmp11_); +#line 1221 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add38 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = _result_; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13__length1 = _result__length1; +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _ ("Admins"); +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = publishing_piwigo_permission_level_new (8, _tmp14_); +#line 1222 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add39 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = _result_; +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16__length1 = _result__length1; +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (result_length1) { +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *result_length1 = _tmp16__length1; +#line 8192 "PiwigoPublishing.c" + } +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp16_; +#line 1224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 8198 "PiwigoPublishing.c" +} + + +static void _vala_array_add40 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoSizeEntry*, *array, (*size) + 1); +#line 8209 "PiwigoPublishing.c" + } +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8215 "PiwigoPublishing.c" +} + + +static void _vala_array_add41 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoSizeEntry*, *array, (*size) + 1); +#line 8226 "PiwigoPublishing.c" + } +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8232 "PiwigoPublishing.c" +} + + +static void _vala_array_add42 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoSizeEntry*, *array, (*size) + 1); +#line 8243 "PiwigoPublishing.c" + } +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8249 "PiwigoPublishing.c" +} + + +static void _vala_array_add43 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoSizeEntry*, *array, (*size) + 1); +#line 8260 "PiwigoPublishing.c" + } +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8266 "PiwigoPublishing.c" +} + + +static void _vala_array_add44 (PublishingPiwigoSizeEntry*** array, int* length, int* size, PublishingPiwigoSizeEntry* value) { +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if ((*length) == (*size)) { +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *array = g_renew (PublishingPiwigoSizeEntry*, *array, (*size) + 1); +#line 8277 "PiwigoPublishing.c" + } +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[(*length)++] = value; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + (*array)[*length] = NULL; +#line 8283 "PiwigoPublishing.c" +} + + +static PublishingPiwigoSizeEntry** publishing_piwigo_publishing_options_pane_create_sizes (PublishingPiwigoPublishingOptionsPane* self, int* result_length1) { + PublishingPiwigoSizeEntry** result = NULL; + PublishingPiwigoSizeEntry** _result_ = NULL; + PublishingPiwigoSizeEntry** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingPiwigoSizeEntry** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingPiwigoSizeEntry* _tmp3_ = NULL; + PublishingPiwigoSizeEntry** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingPiwigoSizeEntry* _tmp6_ = NULL; + PublishingPiwigoSizeEntry** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingPiwigoSizeEntry* _tmp9_ = NULL; + PublishingPiwigoSizeEntry** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + PublishingPiwigoSizeEntry* _tmp12_ = NULL; + PublishingPiwigoSizeEntry** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + PublishingPiwigoSizeEntry* _tmp15_ = NULL; + PublishingPiwigoSizeEntry** _tmp16_ = NULL; + gint _tmp16__length1 = 0; +#line 1227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = g_new0 (PublishingPiwigoSizeEntry*, 0 + 1); +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = _tmp0_; +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result__length1 = 0; +#line 1228 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + __result__size_ = _result__length1; +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _result_; +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1__length1 = _result__length1; +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _ ("500 x 375 pixels"); +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_size_entry_new (500, _tmp2_); +#line 1230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add40 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _result_; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4__length1 = _result__length1; +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _ ("1024 x 768 pixels"); +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_piwigo_size_entry_new (1024, _tmp5_); +#line 1231 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add41 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _result_; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7__length1 = _result__length1; +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _ ("2048 x 1536 pixels"); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = publishing_piwigo_size_entry_new (2048, _tmp8_); +#line 1232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add42 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = _result_; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10__length1 = _result__length1; +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _ ("4096 x 3072 pixels"); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = publishing_piwigo_size_entry_new (4096, _tmp11_); +#line 1233 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add43 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = _result_; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13__length1 = _result__length1; +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _ ("Original size"); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = publishing_piwigo_size_entry_new (PUBLISHING_PIWIGO_ORIGINAL_SIZE, _tmp14_); +#line 1234 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _vala_array_add44 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = _result_; +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16__length1 = _result__length1; +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (result_length1) { +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + *result_length1 = _tmp16__length1; +#line 8383 "PiwigoPublishing.c" + } +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp16_; +#line 1236 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 8389 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_logout_button_clicked (PublishingPiwigoPublishingOptionsPane* self) { +#line 1239 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 8398 "PiwigoPublishing.c" +} + + +static gpointer _publishing_piwigo_permission_level_ref0 (gpointer self) { +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? publishing_piwigo_permission_level_ref (self) : NULL; +#line 8405 "PiwigoPublishing.c" +} + + +static gpointer _publishing_piwigo_size_entry_ref0 (gpointer self) { +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self ? publishing_piwigo_size_entry_ref (self) : NULL; +#line 8412 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_publish_button_clicked (PublishingPiwigoPublishingOptionsPane* self) { + PublishingPiwigoPublishingParameters* params = NULL; + PublishingPiwigoPublishingParameters* _tmp0_ = NULL; + PublishingPiwigoPublishingParameters* _tmp1_ = NULL; + PublishingPiwigoPermissionLevel** _tmp2_ = NULL; + gint _tmp2__length1 = 0; + GtkComboBoxText* _tmp3_ = NULL; + gint _tmp4_ = 0; + PublishingPiwigoPermissionLevel* _tmp5_ = NULL; + PublishingPiwigoPermissionLevel* _tmp6_ = NULL; + PublishingPiwigoPublishingParameters* _tmp7_ = NULL; + PublishingPiwigoSizeEntry** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GtkComboBoxText* _tmp9_ = NULL; + gint _tmp10_ = 0; + PublishingPiwigoSizeEntry* _tmp11_ = NULL; + PublishingPiwigoSizeEntry* _tmp12_ = NULL; + PublishingPiwigoPublishingParameters* _tmp13_ = NULL; + GtkCheckButton* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + PublishingPiwigoPublishingParameters* _tmp16_ = NULL; + GtkCheckButton* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + GtkRadioButton* _tmp19_ = NULL; + gboolean _tmp20_ = FALSE; + PublishingPiwigoPublishingParameters* _tmp53_ = NULL; + GtkCheckButton* _tmp54_ = NULL; + gboolean _tmp55_ = FALSE; +#line 1243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = publishing_piwigo_publishing_parameters_new (); +#line 1244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + params = _tmp0_; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = params; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->perm_levels; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2__length1 = self->priv->perm_levels_length1; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->perms_combo; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp2_[_tmp4_]; +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _publishing_piwigo_permission_level_ref0 (_tmp5_); +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_permission_level_unref0 (_tmp1_->perm_level); +#line 1245 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_->perm_level = _tmp6_; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = params; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->photo_sizes; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8__length1 = self->priv->photo_sizes_length1; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->size_combo; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _tmp8_[_tmp10_]; +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _publishing_piwigo_size_entry_ref0 (_tmp11_); +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_size_entry_unref0 (_tmp7_->photo_size); +#line 1246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_->photo_size = _tmp12_; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = params; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = self->priv->title_as_comment_check; +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1247 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_->title_as_comment = _tmp15_; +#line 1248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = params; +#line 1248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = self->priv->no_upload_tags_check; +#line 1248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1248 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_->no_upload_tags = _tmp18_; +#line 1249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = self->priv->create_new_radio; +#line 1249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp20_) { +#line 8508 "PiwigoPublishing.c" + gchar* uploadcomment = NULL; + GtkTextView* _tmp21_ = NULL; + GtkTextBuffer* _tmp22_ = NULL; + GtkTextBuffer* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gint a = 0; + GtkComboBoxText* _tmp29_ = NULL; + gint _tmp30_ = 0; + gint _tmp31_ = 0; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = self->priv->album_comment; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = gtk_text_view_get_buffer (_tmp21_); +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = _tmp22_; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_object_get (_tmp23_, "text", &_tmp24_, NULL); +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = _tmp24_; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = _tmp25_; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = string_strip (_tmp26_); +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = _tmp27_; +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp26_); +#line 1250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + uploadcomment = _tmp28_; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = self->priv->within_existing_combo; +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1251 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + a = _tmp30_; +#line 1252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = a; +#line 1252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp31_ == 0) { +#line 8552 "PiwigoPublishing.c" + PublishingPiwigoPublishingParameters* _tmp32_ = NULL; + GtkEntry* _tmp33_ = NULL; + const gchar* _tmp34_ = NULL; + const gchar* _tmp35_ = NULL; + PublishingPiwigoCategory* _tmp36_ = NULL; +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = params; +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = self->priv->new_category_entry; +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = gtk_entry_get_text (_tmp33_); +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = uploadcomment; +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = publishing_piwigo_category_new_local (_tmp34_, 0, _tmp35_); +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (_tmp32_->category); +#line 1253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_->category = _tmp36_; +#line 8572 "PiwigoPublishing.c" + } else { + gint _tmp37_ = 0; + PublishingPiwigoPublishingParameters* _tmp38_ = NULL; + GtkEntry* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + PublishingPiwigoCategory** _tmp41_ = NULL; + gint _tmp41__length1 = 0; + gint _tmp42_ = 0; + PublishingPiwigoCategory* _tmp43_ = NULL; + gint _tmp44_ = 0; + const gchar* _tmp45_ = NULL; + PublishingPiwigoCategory* _tmp46_ = NULL; +#line 1257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp37_ = a; +#line 1257 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + a = _tmp37_ - 1; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_ = params; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp39_ = self->priv->new_category_entry; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = gtk_entry_get_text (_tmp39_); +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41_ = self->priv->existing_categories; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41__length1 = self->priv->existing_categories_length1; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42_ = a; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp43_ = _tmp41_[_tmp42_]; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = _tmp43_->id; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp45_ = uploadcomment; +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp46_ = publishing_piwigo_category_new_local (_tmp40_, _tmp44_, _tmp45_); +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (_tmp38_->category); +#line 1258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_->category = _tmp46_; +#line 8613 "PiwigoPublishing.c" + } +#line 1249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (uploadcomment); +#line 8617 "PiwigoPublishing.c" + } else { + PublishingPiwigoPublishingParameters* _tmp47_ = NULL; + PublishingPiwigoCategory** _tmp48_ = NULL; + gint _tmp48__length1 = 0; + GtkComboBoxText* _tmp49_ = NULL; + gint _tmp50_ = 0; + PublishingPiwigoCategory* _tmp51_ = NULL; + PublishingPiwigoCategory* _tmp52_ = NULL; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_ = params; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = self->priv->existing_categories; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48__length1 = self->priv->existing_categories_length1; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp49_ = self->priv->existing_categories_combo; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp50_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51_ = _tmp48_[_tmp50_]; +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52_ = _publishing_piwigo_category_ref0 (_tmp51_); +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (_tmp47_->category); +#line 1262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_->category = _tmp52_; +#line 8644 "PiwigoPublishing.c" + } +#line 1264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp53_ = params; +#line 1264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp54_ = self->priv->strip_metadata_check; +#line 1264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp55_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_emit_by_name (self, "publish", _tmp53_, _tmp55_); +#line 1243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (params); +#line 8656 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_use_existing_radio_clicked (PublishingPiwigoPublishingOptionsPane* self) { + GtkComboBoxText* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + GtkLabel* _tmp2_ = NULL; + GtkComboBoxText* _tmp3_ = NULL; + GtkComboBoxText* _tmp4_ = NULL; + GtkLabel* _tmp5_ = NULL; + GtkTextView* _tmp6_ = NULL; +#line 1268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->existing_categories_combo; +#line 1269 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->new_category_entry; +#line 1270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->within_existing_label; +#line 1271 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->within_existing_combo; +#line 1272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->existing_categories_combo; +#line 1273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget)); +#line 1274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->album_comment_label; +#line 1274 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->album_comment; +#line 1275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1276 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (self); +#line 8700 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_create_new_radio_clicked (PublishingPiwigoPublishingOptionsPane* self) { + GtkEntry* _tmp0_ = NULL; + GtkLabel* _tmp1_ = NULL; + GtkComboBoxText* _tmp2_ = NULL; + GtkLabel* _tmp3_ = NULL; + GtkTextView* _tmp4_ = NULL; + GtkComboBoxText* _tmp5_ = NULL; + GtkEntry* _tmp6_ = NULL; +#line 1279 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->new_category_entry; +#line 1280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->within_existing_label; +#line 1281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->within_existing_combo; +#line 1282 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->album_comment_label; +#line 1283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->album_comment; +#line 1284 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->existing_categories_combo; +#line 1285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->new_category_entry; +#line 1286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget)); +#line 1287 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (self); +#line 8744 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_new_category_entry_changed (PublishingPiwigoPublishingOptionsPane* self) { +#line 1290 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (self); +#line 8753 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_on_existing_combo_changed (PublishingPiwigoPublishingOptionsPane* self) { +#line 1294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1295 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (self); +#line 8762 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (PublishingPiwigoPublishingOptionsPane* self) { + gchar* category_name = NULL; + GtkEntry* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gint a = 0; + GtkComboBoxText* _tmp3_ = NULL; + gint _tmp4_ = 0; + gchar* search_name = NULL; + gint _tmp5_ = 0; + gboolean _tmp17_ = FALSE; + GtkRadioButton* _tmp18_ = NULL; + gboolean _tmp19_ = FALSE; + GtkButton* _tmp24_ = NULL; +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->new_category_entry; +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = gtk_entry_get_text (_tmp0_); +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = string_strip (_tmp1_); +#line 1299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category_name = _tmp2_; +#line 1300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->within_existing_combo; +#line 1300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1300 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + a = _tmp4_; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = a; +#line 1302 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp5_ <= 0) { +#line 8800 "PiwigoPublishing.c" + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = category_name; +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strconcat ("/ ", _tmp6_, NULL); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (search_name); +#line 1303 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + search_name = _tmp7_; +#line 8811 "PiwigoPublishing.c" + } else { + gint _tmp8_ = 0; + PublishingPiwigoCategory** _tmp9_ = NULL; + gint _tmp9__length1 = 0; + gint _tmp10_ = 0; + PublishingPiwigoCategory* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = a; +#line 1305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + a = _tmp8_ - 1; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->existing_categories; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9__length1 = self->priv->existing_categories_length1; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = a; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _tmp9_[_tmp10_]; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = _tmp11_->display_name; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = g_strconcat (_tmp12_, "/ ", NULL); +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _tmp13_; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = category_name; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = g_strconcat (_tmp14_, _tmp15_, NULL); +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (search_name); +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + search_name = _tmp16_; +#line 1306 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp14_); +#line 8851 "PiwigoPublishing.c" + } +#line 1310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = self->priv->create_new_radio; +#line 1310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp19_) { +#line 8859 "PiwigoPublishing.c" + gboolean _tmp20_ = FALSE; + const gchar* _tmp21_ = NULL; +#line 1312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = category_name; +#line 1312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp21_, "") != 0) { +#line 1312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = TRUE; +#line 8868 "PiwigoPublishing.c" + } else { + const gchar* _tmp22_ = NULL; + gboolean _tmp23_ = FALSE; +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = search_name; +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = publishing_piwigo_publishing_options_pane_category_already_exists (self, _tmp22_); +#line 1313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = _tmp23_; +#line 8878 "PiwigoPublishing.c" + } +#line 1312 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = _tmp20_; +#line 8882 "PiwigoPublishing.c" + } else { +#line 1310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = FALSE; +#line 8886 "PiwigoPublishing.c" + } +#line 1308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = self->priv->publish_button; +#line 1308 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget), !_tmp17_); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (search_name); +#line 1298 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (category_name); +#line 8896 "PiwigoPublishing.c" +} + + +static GtkWidget* publishing_piwigo_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingPiwigoPublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 1319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane); +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)); +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1320 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 8915 "PiwigoPublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_piwigo_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingPiwigoPublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 1323 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane); +#line 1324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 1324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 8928 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingPiwigoPublishingOptionsPane * self; + GtkButton* _tmp0_ = NULL; +#line 1327 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane); +#line 1328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_create_categories_combo (self); +#line 1329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_create_within_categories_combo (self); +#line 1330 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_create_permissions_combo (self); +#line 1331 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_create_size_combo (self); +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->publish_button; +#line 1333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1334 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_update_publish_button_sensitivity (self); +#line 8951 "PiwigoPublishing.c" +} + + +static gchar* publishing_piwigo_publishing_options_pane_get_common_comment_if_possible (PublishingPiwigoPublishingOptionsPane* self, PublishingPiwigoPiwigoPublisher* publisher) { + gchar* result = NULL; + SpitPublishingPublishable** publishables = NULL; + PublishingPiwigoPiwigoPublisher* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + gint _tmp3_ = 0; + SpitPublishingPublishable** _tmp4_ = NULL; + SpitPublishingPublishable** _tmp5_ = NULL; + gint _tmp5__length1 = 0; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + gchar* common = NULL; + gchar* _tmp6_ = NULL; + gboolean isfirst = FALSE; + SpitPublishingPublishable** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp18_ = NULL; +#line 1337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 1337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PIWIGO_PUBLISHER (publisher), NULL); +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = publisher; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_piwigo_piwigo_publisher_get_host (_tmp0_); +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _tmp1_; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = spit_publishing_plugin_host_get_publishables (_tmp2_, &_tmp3_); +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp4_; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5__length1 = _tmp3_; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp2_); +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables = _tmp5_; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables_length1 = _tmp5__length1; +#line 1340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishables_size_ = publishables_length1; +#line 1341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_strdup (""); +#line 1341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + common = _tmp6_; +#line 1342 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + isfirst = TRUE; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = publishables; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7__length1 = publishables_length1; +#line 1343 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ != NULL) { +#line 9009 "PiwigoPublishing.c" + SpitPublishingPublishable** _tmp8_ = NULL; + gint _tmp8__length1 = 0; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = publishables; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8__length1 = publishables_length1; +#line 9016 "PiwigoPublishing.c" + { + SpitPublishingPublishable** pub_collection = NULL; + gint pub_collection_length1 = 0; + gint _pub_collection_size_ = 0; + gint pub_it = 0; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pub_collection = _tmp8_; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pub_collection_length1 = _tmp8__length1; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (pub_it = 0; pub_it < _tmp8__length1; pub_it = pub_it + 1) { +#line 9028 "PiwigoPublishing.c" + SpitPublishingPublishable* _tmp9_ = NULL; + SpitPublishingPublishable* pub = NULL; +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = _g_object_ref0 (pub_collection[pub_it]); +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + pub = _tmp9_; +#line 9035 "PiwigoPublishing.c" + { + gchar* cur = NULL; + SpitPublishingPublishable* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = pub; +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = spit_publishing_publishable_get_param_string (_tmp10_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_EVENTCOMMENT); +#line 1345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cur = _tmp11_; +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = isfirst; +#line 1347 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp12_) { +#line 9051 "PiwigoPublishing.c" + const gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; +#line 1348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = cur; +#line 1348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = g_strdup (_tmp13_); +#line 1348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (common); +#line 1348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + common = _tmp14_; +#line 1349 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + isfirst = FALSE; +#line 9064 "PiwigoPublishing.c" + } else { + const gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = cur; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = common; +#line 1351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp15_, _tmp16_) != 0) { +#line 9074 "PiwigoPublishing.c" + gchar* _tmp17_ = NULL; +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = g_strdup (""); +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (common); +#line 1352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + common = _tmp17_; +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (cur); +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (pub); +#line 1353 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9088 "PiwigoPublishing.c" + } + } +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (cur); +#line 1344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (pub); +#line 9095 "PiwigoPublishing.c" + } + } + } + } +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = common; +#line 1358 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:1358: PiwigoConnector: found common event commen" \ +"t %s\n", _tmp18_); +#line 1359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = common; +#line 1359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 1359 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 9110 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_create_categories_combo (PublishingPiwigoPublishingOptionsPane* self) { + PublishingPiwigoCategory** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + PublishingPiwigoCategory** _tmp5_ = NULL; + gint _tmp5__length1 = 0; + const gchar* _tmp21_ = NULL; + gboolean _tmp22_ = FALSE; +#line 1362 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->existing_categories; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0__length1 = self->priv->existing_categories_length1; +#line 9127 "PiwigoPublishing.c" + { + PublishingPiwigoCategory** cat_collection = NULL; + gint cat_collection_length1 = 0; + gint _cat_collection_size_ = 0; + gint cat_it = 0; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat_collection = _tmp0_; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat_collection_length1 = _tmp0__length1; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (cat_it = 0; cat_it < _tmp0__length1; cat_it = cat_it + 1) { +#line 9139 "PiwigoPublishing.c" + PublishingPiwigoCategory* _tmp1_ = NULL; + PublishingPiwigoCategory* cat = NULL; +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _publishing_piwigo_category_ref0 (cat_collection[cat_it]); +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat = _tmp1_; +#line 9146 "PiwigoPublishing.c" + { + GtkComboBoxText* _tmp2_ = NULL; + PublishingPiwigoCategory* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->existing_categories_combo; +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = cat; +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_->display_name; +#line 1364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_text_append_text (_tmp2_, _tmp4_); +#line 1363 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (cat); +#line 9161 "PiwigoPublishing.c" + } + } + } +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->existing_categories; +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5__length1 = self->priv->existing_categories_length1; +#line 1366 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp5__length1 == 0) { +#line 9171 "PiwigoPublishing.c" + GtkComboBoxText* _tmp6_ = NULL; + GtkRadioButton* _tmp7_ = NULL; + GtkRadioButton* _tmp8_ = NULL; + GtkTextView* _tmp9_ = NULL; + GtkLabel* _tmp10_ = NULL; + GtkEntry* _tmp11_ = NULL; +#line 1368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->existing_categories_combo; +#line 1368 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->use_existing_radio; +#line 1369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->create_new_radio; +#line 1370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->album_comment; +#line 1371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = self->priv->album_comment_label; +#line 1372 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = self->priv->new_category_entry; +#line 1373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget)); +#line 9202 "PiwigoPublishing.c" + } else { + gint last_category_index = 0; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + GtkEntry* _tmp18_ = NULL; + GtkTextView* _tmp19_ = NULL; + GtkLabel* _tmp20_ = NULL; +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = self->priv->last_category; +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = publishing_piwigo_publishing_options_pane_find_category_index (self, _tmp12_); +#line 1375 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + last_category_index = _tmp13_; +#line 1376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = last_category_index; +#line 1376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp14_ < 0) { +#line 9221 "PiwigoPublishing.c" + GtkComboBoxText* _tmp15_ = NULL; +#line 1377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = self->priv->existing_categories_combo; +#line 1377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 9227 "PiwigoPublishing.c" + } else { + GtkComboBoxText* _tmp16_ = NULL; + gint _tmp17_ = 0; +#line 1379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = self->priv->existing_categories_combo; +#line 1379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = last_category_index; +#line 1379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_combo_box_get_type (), GtkComboBox), _tmp17_); +#line 9237 "PiwigoPublishing.c" + } +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = self->priv->new_category_entry; +#line 1381 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = self->priv->album_comment; +#line 1382 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = self->priv->album_comment_label; +#line 1383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 9251 "PiwigoPublishing.c" + } +#line 1385 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = publishing_piwigo_publishing_options_pane_DEFAULT_CATEGORY_NAME; +#line 1385 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = publishing_piwigo_publishing_options_pane_category_already_exists (self, _tmp21_); +#line 1385 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp22_) { +#line 9259 "PiwigoPublishing.c" + GtkEntry* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; +#line 1386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = self->priv->new_category_entry; +#line 1386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = publishing_piwigo_publishing_options_pane_DEFAULT_CATEGORY_NAME; +#line 1386 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_entry_set_text (_tmp23_, _tmp24_); +#line 9268 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_publishing_options_pane_create_within_categories_combo (PublishingPiwigoPublishingOptionsPane* self) { + GtkComboBoxText* _tmp0_ = NULL; + PublishingPiwigoCategory** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + GtkLabel* _tmp6_ = NULL; + GtkComboBoxText* _tmp7_ = NULL; + GtkComboBoxText* _tmp8_ = NULL; +#line 1389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->within_existing_combo; +#line 1391 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_text_append_text (_tmp0_, "/ "); +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = self->priv->existing_categories; +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1__length1 = self->priv->existing_categories_length1; +#line 9290 "PiwigoPublishing.c" + { + PublishingPiwigoCategory** cat_collection = NULL; + gint cat_collection_length1 = 0; + gint _cat_collection_size_ = 0; + gint cat_it = 0; +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat_collection = _tmp1_; +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat_collection_length1 = _tmp1__length1; +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (cat_it = 0; cat_it < _tmp1__length1; cat_it = cat_it + 1) { +#line 9302 "PiwigoPublishing.c" + PublishingPiwigoCategory* _tmp2_ = NULL; + PublishingPiwigoCategory* cat = NULL; +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _publishing_piwigo_category_ref0 (cat_collection[cat_it]); +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + cat = _tmp2_; +#line 9309 "PiwigoPublishing.c" + { + GtkComboBoxText* _tmp3_ = NULL; + PublishingPiwigoCategory* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; +#line 1393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->within_existing_combo; +#line 1393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = cat; +#line 1393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp4_->display_name; +#line 1393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_text_append_text (_tmp3_, _tmp5_); +#line 1392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (cat); +#line 9324 "PiwigoPublishing.c" + } + } + } +#line 1396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = self->priv->within_existing_label; +#line 1396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = self->priv->within_existing_combo; +#line 1397 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->within_existing_combo; +#line 1398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 9340 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_create_permissions_combo (PublishingPiwigoPublishingOptionsPane* self) { + PublishingPiwigoPermissionLevel** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + gint last_permission_level_index = 0; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 1401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->perm_levels; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0__length1 = self->priv->perm_levels_length1; +#line 9357 "PiwigoPublishing.c" + { + PublishingPiwigoPermissionLevel** perm_collection = NULL; + gint perm_collection_length1 = 0; + gint _perm_collection_size_ = 0; + gint perm_it = 0; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + perm_collection = _tmp0_; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + perm_collection_length1 = _tmp0__length1; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (perm_it = 0; perm_it < _tmp0__length1; perm_it = perm_it + 1) { +#line 9369 "PiwigoPublishing.c" + PublishingPiwigoPermissionLevel* _tmp1_ = NULL; + PublishingPiwigoPermissionLevel* perm = NULL; +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _publishing_piwigo_permission_level_ref0 (perm_collection[perm_it]); +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + perm = _tmp1_; +#line 9376 "PiwigoPublishing.c" + { + GtkComboBoxText* _tmp2_ = NULL; + PublishingPiwigoPermissionLevel* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 1403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->perms_combo; +#line 1403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = perm; +#line 1403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_->name; +#line 1403 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_text_append_text (_tmp2_, _tmp4_); +#line 1402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_permission_level_unref0 (perm); +#line 9391 "PiwigoPublishing.c" + } + } + } +#line 1405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->last_permission_level; +#line 1405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_piwigo_publishing_options_pane_find_permission_level_index (self, _tmp5_); +#line 1405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + last_permission_level_index = _tmp6_; +#line 1406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = last_permission_level_index; +#line 1406 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ < 0) { +#line 9405 "PiwigoPublishing.c" + GtkComboBoxText* _tmp8_ = NULL; +#line 1407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->perms_combo; +#line 1407 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), 0); +#line 9411 "PiwigoPublishing.c" + } else { + GtkComboBoxText* _tmp9_ = NULL; + gint _tmp10_ = 0; +#line 1409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = self->priv->perms_combo; +#line 1409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = last_permission_level_index; +#line 1409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_combo_box_get_type (), GtkComboBox), _tmp10_); +#line 9421 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_publishing_options_pane_create_size_combo (PublishingPiwigoPublishingOptionsPane* self) { + PublishingPiwigoSizeEntry** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + gint last_size_index = 0; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 1413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->photo_sizes; +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0__length1 = self->priv->photo_sizes_length1; +#line 9439 "PiwigoPublishing.c" + { + PublishingPiwigoSizeEntry** size_collection = NULL; + gint size_collection_length1 = 0; + gint _size_collection_size_ = 0; + gint size_it = 0; +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + size_collection = _tmp0_; +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + size_collection_length1 = _tmp0__length1; +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (size_it = 0; size_it < _tmp0__length1; size_it = size_it + 1) { +#line 9451 "PiwigoPublishing.c" + PublishingPiwigoSizeEntry* _tmp1_ = NULL; + PublishingPiwigoSizeEntry* size = NULL; +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _publishing_piwigo_size_entry_ref0 (size_collection[size_it]); +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + size = _tmp1_; +#line 9458 "PiwigoPublishing.c" + { + GtkComboBoxText* _tmp2_ = NULL; + PublishingPiwigoSizeEntry* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->size_combo; +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = size; +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_->name; +#line 1415 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_text_append_text (_tmp2_, _tmp4_); +#line 1414 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_size_entry_unref0 (size); +#line 9473 "PiwigoPublishing.c" + } + } + } +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = self->priv->last_photo_size; +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_piwigo_publishing_options_pane_find_size_index (self, _tmp5_); +#line 1417 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + last_size_index = _tmp6_; +#line 1418 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = last_size_index; +#line 1418 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ < 0) { +#line 9487 "PiwigoPublishing.c" + GtkComboBoxText* _tmp8_ = NULL; + gint _tmp9_ = 0; +#line 1419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = self->priv->size_combo; +#line 1419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = publishing_piwigo_publishing_options_pane_find_size_index (self, PUBLISHING_PIWIGO_ORIGINAL_SIZE); +#line 1419 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), _tmp9_); +#line 9496 "PiwigoPublishing.c" + } else { + GtkComboBoxText* _tmp10_ = NULL; + gint _tmp11_ = 0; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = self->priv->size_combo; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = last_size_index; +#line 1421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_combo_box_get_type (), GtkComboBox), _tmp11_); +#line 9506 "PiwigoPublishing.c" + } +} + + +static void publishing_piwigo_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingPiwigoPublishingOptionsPane * self; +#line 1425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane); +#line 9515 "PiwigoPublishing.c" +} + + +static gint publishing_piwigo_publishing_options_pane_find_category_index (PublishingPiwigoPublishingOptionsPane* self, gint category_id) { + gint result = 0; + gint _result_ = 0; +#line 1428 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), 0); +#line 1429 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = -1; +#line 9526 "PiwigoPublishing.c" + { + gint i = 0; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = 0; +#line 9531 "PiwigoPublishing.c" + { + gboolean _tmp0_ = FALSE; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = TRUE; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 9538 "PiwigoPublishing.c" + gint _tmp2_ = 0; + PublishingPiwigoCategory** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + PublishingPiwigoCategory** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + gint _tmp5_ = 0; + PublishingPiwigoCategory* _tmp6_ = NULL; + gint _tmp7_ = 0; + gint _tmp8_ = 0; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp0_) { +#line 9550 "PiwigoPublishing.c" + gint _tmp1_ = 0; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = i; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = _tmp1_ + 1; +#line 9556 "PiwigoPublishing.c" + } +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = FALSE; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = i; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->existing_categories; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3__length1 = self->priv->existing_categories_length1; +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp2_ < _tmp3__length1)) { +#line 1430 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9570 "PiwigoPublishing.c" + } +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->existing_categories; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4__length1 = self->priv->existing_categories_length1; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = i; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp4_[_tmp5_]; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_->id; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = category_id; +#line 1431 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ == _tmp8_) { +#line 9586 "PiwigoPublishing.c" + gint _tmp9_ = 0; +#line 1432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = i; +#line 1432 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = _tmp9_; +#line 1433 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9594 "PiwigoPublishing.c" + } + } + } + } +#line 1436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _result_; +#line 1436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 9603 "PiwigoPublishing.c" +} + + +static gint publishing_piwigo_publishing_options_pane_find_permission_level_index (PublishingPiwigoPublishingOptionsPane* self, gint permission_level_id) { + gint result = 0; + gint _result_ = 0; +#line 1439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), 0); +#line 1440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = -1; +#line 9614 "PiwigoPublishing.c" + { + gint i = 0; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = 0; +#line 9619 "PiwigoPublishing.c" + { + gboolean _tmp0_ = FALSE; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = TRUE; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 9626 "PiwigoPublishing.c" + gint _tmp2_ = 0; + PublishingPiwigoPermissionLevel** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + PublishingPiwigoPermissionLevel** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + gint _tmp5_ = 0; + PublishingPiwigoPermissionLevel* _tmp6_ = NULL; + gint _tmp7_ = 0; + gint _tmp8_ = 0; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp0_) { +#line 9638 "PiwigoPublishing.c" + gint _tmp1_ = 0; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = i; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = _tmp1_ + 1; +#line 9644 "PiwigoPublishing.c" + } +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = FALSE; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = i; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->perm_levels; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3__length1 = self->priv->perm_levels_length1; +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp2_ < _tmp3__length1)) { +#line 1441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9658 "PiwigoPublishing.c" + } +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->perm_levels; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4__length1 = self->priv->perm_levels_length1; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = i; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp4_[_tmp5_]; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_->id; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = permission_level_id; +#line 1442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ == _tmp8_) { +#line 9674 "PiwigoPublishing.c" + gint _tmp9_ = 0; +#line 1443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = i; +#line 1443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = _tmp9_; +#line 1444 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9682 "PiwigoPublishing.c" + } + } + } + } +#line 1447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _result_; +#line 1447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 9691 "PiwigoPublishing.c" +} + + +static gint publishing_piwigo_publishing_options_pane_find_size_index (PublishingPiwigoPublishingOptionsPane* self, gint size_id) { + gint result = 0; + gint _result_ = 0; +#line 1450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), 0); +#line 1451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = -1; +#line 9702 "PiwigoPublishing.c" + { + gint i = 0; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = 0; +#line 9707 "PiwigoPublishing.c" + { + gboolean _tmp0_ = FALSE; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = TRUE; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + while (TRUE) { +#line 9714 "PiwigoPublishing.c" + gint _tmp2_ = 0; + PublishingPiwigoSizeEntry** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + PublishingPiwigoSizeEntry** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + gint _tmp5_ = 0; + PublishingPiwigoSizeEntry* _tmp6_ = NULL; + gint _tmp7_ = 0; + gint _tmp8_ = 0; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp0_) { +#line 9726 "PiwigoPublishing.c" + gint _tmp1_ = 0; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = i; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + i = _tmp1_ + 1; +#line 9732 "PiwigoPublishing.c" + } +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = FALSE; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = i; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->photo_sizes; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3__length1 = self->priv->photo_sizes_length1; +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!(_tmp2_ < _tmp3__length1)) { +#line 1452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9746 "PiwigoPublishing.c" + } +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->photo_sizes; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4__length1 = self->priv->photo_sizes_length1; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = i; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp4_[_tmp5_]; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_->id; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = size_id; +#line 1453 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_ == _tmp8_) { +#line 9762 "PiwigoPublishing.c" + gint _tmp9_ = 0; +#line 1454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = i; +#line 1454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = _tmp9_; +#line 1455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9770 "PiwigoPublishing.c" + } + } + } + } +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _result_; +#line 1458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 9779 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_publishing_options_pane_category_already_exists (PublishingPiwigoPublishingOptionsPane* self, const gchar* category_name) { + gboolean result = FALSE; + gboolean _result_ = FALSE; + PublishingPiwigoCategory** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 1461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_OPTIONS_PANE (self), FALSE); +#line 1461 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (category_name != NULL, FALSE); +#line 1462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = FALSE; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->existing_categories; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0__length1 = self->priv->existing_categories_length1; +#line 9798 "PiwigoPublishing.c" + { + PublishingPiwigoCategory** category_collection = NULL; + gint category_collection_length1 = 0; + gint _category_collection_size_ = 0; + gint category_it = 0; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category_collection = _tmp0_; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category_collection_length1 = _tmp0__length1; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + for (category_it = 0; category_it < _tmp0__length1; category_it = category_it + 1) { +#line 9810 "PiwigoPublishing.c" + PublishingPiwigoCategory* _tmp1_ = NULL; + PublishingPiwigoCategory* category = NULL; +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _publishing_piwigo_category_ref0 (category_collection[category_it]); +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + category = _tmp1_; +#line 9817 "PiwigoPublishing.c" + { + PublishingPiwigoCategory* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = category; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _tmp2_->display_name; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = string_strip (_tmp3_); +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp4_; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = category_name; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strcmp0 (_tmp5_, _tmp6_) == 0; +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp5_); +#line 1464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp7_) { +#line 1465 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _result_ = TRUE; +#line 1466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (category); +#line 1466 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + break; +#line 9847 "PiwigoPublishing.c" + } +#line 1463 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_category_unref0 (category); +#line 9851 "PiwigoPublishing.c" + } + } + } +#line 1469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _result_; +#line 1469 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 9859 "PiwigoPublishing.c" +} + + +static void g_cclosure_user_marshal_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN) (gpointer data1, gpointer arg_1, gboolean arg_2, gpointer data2); + register GMarshalFunc_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (n_param_values == 3); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data1 = closure->data; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data2 = param_values->data[0].v_pointer; +#line 9878 "PiwigoPublishing.c" + } else { +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data1 = param_values->data[0].v_pointer; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + data2 = closure->data; +#line 9884 "PiwigoPublishing.c" + } +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + callback = (GMarshalFunc_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN) (marshal_data ? marshal_data : cc->callback); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + callback (data1, publishing_piwigo_value_get_publishing_parameters (param_values + 1), g_value_get_boolean (param_values + 2), data2); +#line 9890 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_class_init (PublishingPiwigoPublishingOptionsPaneClass * klass) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoPublishingOptionsPanePrivate)); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_piwigo_publishing_options_pane_finalize; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_new ("publish", PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PUBLISHING_PIWIGO_PUBLISHING_PARAMETERS_BOOLEAN, G_TYPE_NONE, 2, PUBLISHING_PIWIGO_TYPE_PUBLISHING_PARAMETERS, G_TYPE_BOOLEAN); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_signal_new ("logout", PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _ ("Shotwell Connect"); +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_DEFAULT_CATEGORY_NAME = _tmp1_; +#line 9913 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_piwigo_publishing_options_pane_real_get_widget; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_piwigo_publishing_options_pane_real_get_preferred_geometry; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_piwigo_publishing_options_pane_real_on_pane_installed; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_piwigo_publishing_options_pane_real_on_pane_uninstalled; +#line 9928 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_instance_init (PublishingPiwigoPublishingOptionsPane * self) { +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pane_widget = NULL; +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->strip_metadata_check = NULL; +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->title_as_comment_check = NULL; +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->no_upload_tags_check = NULL; +#line 9943 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_publishing_options_pane_finalize (GObject* obj) { + PublishingPiwigoPublishingOptionsPane * self; +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_PUBLISHING_OPTIONS_PANE, PublishingPiwigoPublishingOptionsPane); +#line 1116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 1117 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 1118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->use_existing_radio); +#line 1119 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->create_new_radio); +#line 1120 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->existing_categories_combo); +#line 1121 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->new_category_entry); +#line 1122 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->within_existing_label); +#line 1123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->within_existing_combo); +#line 1124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->perms_combo); +#line 1125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->size_combo); +#line 1126 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->strip_metadata_check); +#line 1127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->title_as_comment_check); +#line 1128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->no_upload_tags_check); +#line 1129 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 1130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 1131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->album_comment); +#line 1132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (self->priv->album_comment_label); +#line 1134 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->existing_categories = (_vala_array_free (self->priv->existing_categories, self->priv->existing_categories_length1, (GDestroyNotify) publishing_piwigo_category_unref), NULL); +#line 1135 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->perm_levels = (_vala_array_free (self->priv->perm_levels, self->priv->perm_levels_length1, (GDestroyNotify) publishing_piwigo_permission_level_unref), NULL); +#line 1136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->photo_sizes = (_vala_array_free (self->priv->photo_sizes, self->priv->photo_sizes_length1, (GDestroyNotify) publishing_piwigo_size_entry_unref), NULL); +#line 1112 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + G_OBJECT_CLASS (publishing_piwigo_publishing_options_pane_parent_class)->finalize (obj); +#line 9993 "PiwigoPublishing.c" +} + + +/** + * The publishing options pane. + */ +GType publishing_piwigo_publishing_options_pane_get_type (void) { + static volatile gsize publishing_piwigo_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoPublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoPublishingOptionsPane), 0, (GInstanceInitFunc) publishing_piwigo_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_piwigo_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_piwigo_publishing_options_pane_type_id; + publishing_piwigo_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingPiwigoPublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_piwigo_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_piwigo_publishing_options_pane_type_id__volatile, publishing_piwigo_publishing_options_pane_type_id); + } + return publishing_piwigo_publishing_options_pane_type_id__volatile; +} + + +PublishingPiwigoSession* publishing_piwigo_session_construct (GType object_type) { + PublishingPiwigoSession* self = NULL; +#line 1485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSession*) publishing_rest_support_session_construct (object_type, ""); +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10020 "PiwigoPublishing.c" +} + + +PublishingPiwigoSession* publishing_piwigo_session_new (void) { +#line 1484 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_session_construct (PUBLISHING_PIWIGO_TYPE_SESSION); +#line 10027 "PiwigoPublishing.c" +} + + +static gboolean publishing_piwigo_session_real_is_authenticated (PublishingRESTSupportSession* base) { + PublishingPiwigoSession * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + const gchar* _tmp2_ = NULL; +#line 1488 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSession); +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = self->priv->pwg_id; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp2_ != NULL) { +#line 10043 "PiwigoPublishing.c" + const gchar* _tmp3_ = NULL; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = self->priv->pwg_url; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = _tmp3_ != NULL; +#line 10049 "PiwigoPublishing.c" + } else { +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = FALSE; +#line 10053 "PiwigoPublishing.c" + } +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp1_) { +#line 10057 "PiwigoPublishing.c" + const gchar* _tmp4_ = NULL; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = self->priv->username; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = _tmp4_ != NULL; +#line 10063 "PiwigoPublishing.c" + } else { +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = FALSE; +#line 10067 "PiwigoPublishing.c" + } +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp0_; +#line 1489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10073 "PiwigoPublishing.c" +} + + +void publishing_piwigo_session_authenticate (PublishingPiwigoSession* self, const gchar* url, const gchar* username, const gchar* id) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 1492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self)); +#line 1492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (url != NULL); +#line 1492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (username != NULL); +#line 1492 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (id != NULL); +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = url; +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_url); +#line 1493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_url = _tmp1_; +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = username; +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = g_strdup (_tmp2_); +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->username); +#line 1494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->username = _tmp3_; +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = id; +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_id); +#line 1495 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_id = _tmp5_; +#line 10116 "PiwigoPublishing.c" +} + + +void publishing_piwigo_session_deauthenticate (PublishingPiwigoSession* self) { +#line 1498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self)); +#line 1499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_url); +#line 1499 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_url = NULL; +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_id); +#line 1500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_id = NULL; +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->username); +#line 1501 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->username = NULL; +#line 10135 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_session_get_username (PublishingPiwigoSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self), NULL); +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->username; +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10153 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_session_get_pwg_url (PublishingPiwigoSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self), NULL); +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->pwg_url; +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10171 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_session_get_pwg_id (PublishingPiwigoSession* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self), NULL); +#line 1513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = self->priv->pwg_id; +#line 1513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp1_; +#line 1513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10189 "PiwigoPublishing.c" +} + + +void publishing_piwigo_session_set_pwg_id (PublishingPiwigoSession* self, const gchar* id) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (PUBLISHING_PIWIGO_IS_SESSION (self)); +#line 1516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_if_fail (id != NULL); +#line 1517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = id; +#line 1517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 1517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_id); +#line 1517 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_id = _tmp1_; +#line 10208 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_class_init (PublishingPiwigoSessionClass * klass) { +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_parent_class = g_type_class_peek_parent (klass); +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingRESTSupportSessionClass *) klass)->finalize = publishing_piwigo_session_finalize; +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoSessionPrivate)); +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingRESTSupportSessionClass *) klass)->is_authenticated = publishing_piwigo_session_real_is_authenticated; +#line 10221 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_instance_init (PublishingPiwigoSession * self) { +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_SESSION_GET_PRIVATE (self); +#line 1480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_url = NULL; +#line 1481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->pwg_id = NULL; +#line 1482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->username = NULL; +#line 10234 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_finalize (PublishingRESTSupportSession* obj) { + PublishingPiwigoSession * self; +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_SESSION, PublishingPiwigoSession); +#line 1480 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_url); +#line 1481 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->pwg_id); +#line 1482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (self->priv->username); +#line 1479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_REST_SUPPORT_SESSION_CLASS (publishing_piwigo_session_parent_class)->finalize (obj); +#line 10250 "PiwigoPublishing.c" +} + + +/** + * Session class that keeps track of the authentication status and of the + * user token pwg_id. + */ +GType publishing_piwigo_session_get_type (void) { + static volatile gsize publishing_piwigo_session_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_session_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoSessionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_session_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoSession), 0, (GInstanceInitFunc) publishing_piwigo_session_instance_init, NULL }; + GType publishing_piwigo_session_type_id; + publishing_piwigo_session_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_SESSION, "PublishingPiwigoSession", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_session_type_id__volatile, publishing_piwigo_session_type_id); + } + return publishing_piwigo_session_type_id__volatile; +} + + +PublishingPiwigoTransaction* publishing_piwigo_transaction_construct (GType object_type, PublishingPiwigoSession* session) { + PublishingPiwigoTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + PublishingPiwigoSession* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 1530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1531 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoTransaction*) publishing_rest_support_transaction_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = session; +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 1532 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp2_) { +#line 10287 "PiwigoPublishing.c" + PublishingPiwigoSession* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = session; +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = publishing_piwigo_session_get_pwg_id (_tmp3_); +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp4_; +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_strconcat ("pwg_id=", _tmp5_, NULL); +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp6_; +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Cookie", _tmp7_); +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp7_); +#line 1533 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp5_); +#line 10309 "PiwigoPublishing.c" + } +#line 1530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10313 "PiwigoPublishing.c" +} + + +PublishingPiwigoTransaction* publishing_piwigo_transaction_new (PublishingPiwigoSession* session) { +#line 1530 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_transaction_construct (PUBLISHING_PIWIGO_TYPE_TRANSACTION, session); +#line 10320 "PiwigoPublishing.c" +} + + +PublishingPiwigoTransaction* publishing_piwigo_transaction_construct_authenticated (GType object_type, PublishingPiwigoSession* session) { + PublishingPiwigoTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + PublishingPiwigoSession* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingPiwigoSession* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 1537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = session; +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = publishing_piwigo_session_get_pwg_url (_tmp1_); +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = _tmp2_; +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp3_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 1538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp3_); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = session; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_piwigo_session_get_pwg_id (_tmp4_); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = g_strconcat ("pwg_id=", _tmp6_, NULL); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = _tmp7_; +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Cookie", _tmp8_); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp8_); +#line 1539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp6_); +#line 1537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10367 "PiwigoPublishing.c" +} + + +PublishingPiwigoTransaction* publishing_piwigo_transaction_new_authenticated (PublishingPiwigoSession* session) { +#line 1537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_transaction_construct_authenticated (PUBLISHING_PIWIGO_TYPE_TRANSACTION, session); +#line 10374 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc) { + gchar* result = NULL; + xmlNode* root = NULL; + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + xmlNode* _tmp1_ = NULL; + gchar* status = NULL; + xmlNode* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + const gchar* _tmp6_ = NULL; + xmlNode* errcode = NULL; + xmlNode* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + xmlNode* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + GError * _inner_error_ = NULL; +#line 1542 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); +#line 1543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = doc; +#line 1543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); +#line 1543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + root = _tmp1_; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = root; +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = (gchar*) xmlGetProp (_tmp2_, (xmlChar*) "stat"); +#line 1544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + status = _tmp3_; +#line 1547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = status; +#line 1547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp4_ == NULL) { +#line 10416 "PiwigoPublishing.c" + gchar* _tmp5_ = NULL; +#line 1548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strdup ("No status property in root node"); +#line 1548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp5_; +#line 1548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1548 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10426 "PiwigoPublishing.c" + } +#line 1550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = status; +#line 1550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp6_, "ok") == 0) { +#line 1551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = NULL; +#line 1551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1551 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10438 "PiwigoPublishing.c" + } + { + xmlNode* _tmp7_ = NULL; + PublishingRESTSupportXmlDocument* _tmp8_ = NULL; + xmlNode* _tmp9_ = NULL; + xmlNode* _tmp10_ = NULL; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = doc; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = root; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = publishing_rest_support_xml_document_get_named_child (_tmp8_, _tmp9_, "err", &_inner_error_); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = _tmp10_; +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 10457 "PiwigoPublishing.c" + goto __catch46_spit_publishing_publishing_error; + } +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 10468 "PiwigoPublishing.c" + } +#line 1555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + errcode = _tmp7_; +#line 10472 "PiwigoPublishing.c" + } + goto __finally46; + __catch46_spit_publishing_publishing_error: + { + GError* err = NULL; + gchar* _tmp11_ = NULL; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 1557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = g_strdup ("No error code specified"); +#line 1557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp11_; +#line 1557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 1557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10493 "PiwigoPublishing.c" + } + __finally46: +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 10506 "PiwigoPublishing.c" + } +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = errcode; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = (gchar*) xmlGetProp (_tmp12_, (xmlChar*) "msg"); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = _tmp13_; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp15_ = errcode; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = (gchar*) xmlGetProp (_tmp15_, (xmlChar*) "code"); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = _tmp16_; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = g_strdup_printf ("%s (error code %s)", _tmp14_, _tmp17_); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = _tmp18_; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp17_); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp14_); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp19_; +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (status); +#line 1560 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10534 "PiwigoPublishing.c" +} + + +gchar* publishing_piwigo_transaction_get_error_code (PublishingRESTSupportXmlDocument* doc) { + gchar* result = NULL; + xmlNode* root = NULL; + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + xmlNode* _tmp1_ = NULL; + xmlNode* errcode = NULL; + xmlNode* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + GError * _inner_error_ = NULL; +#line 1563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); +#line 1564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = doc; +#line 1564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); +#line 1564 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + root = _tmp1_; +#line 10555 "PiwigoPublishing.c" + { + xmlNode* _tmp2_ = NULL; + PublishingRESTSupportXmlDocument* _tmp3_ = NULL; + xmlNode* _tmp4_ = NULL; + xmlNode* _tmp5_ = NULL; +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = doc; +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = root; +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = publishing_rest_support_xml_document_get_named_child (_tmp3_, _tmp4_, "err", &_inner_error_); +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = _tmp5_; +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 10573 "PiwigoPublishing.c" + goto __catch47_spit_publishing_publishing_error; + } +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 10582 "PiwigoPublishing.c" + } +#line 1567 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + errcode = _tmp2_; +#line 10586 "PiwigoPublishing.c" + } + goto __finally47; + __catch47_spit_publishing_publishing_error: + { + GError* err = NULL; + gchar* _tmp6_ = NULL; +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + err = _inner_error_; +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _inner_error_ = NULL; +#line 1569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = g_strdup ("0"); +#line 1569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp6_; +#line 1569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_error_free0 (err); +#line 1569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10605 "PiwigoPublishing.c" + } + __finally47: +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.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 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_clear_error (&_inner_error_); +#line 1566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return NULL; +#line 10616 "PiwigoPublishing.c" + } +#line 1571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = errcode; +#line 1571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = (gchar*) xmlGetProp (_tmp7_, (xmlChar*) "code"); +#line 1571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + result = _tmp8_; +#line 1571 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return result; +#line 10626 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_transaction_class_init (PublishingPiwigoTransactionClass * klass) { +#line 1529 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10633 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_transaction_instance_init (PublishingPiwigoTransaction * self) { +} + + +/** + * Generic REST transaction class. + * + * This class implements the generic logic for all REST transactions used + * by the Piwigo publishing plugin. In particular, it ensures that if the + * session has been authenticated, the pwg_id token is included in the + * transaction header. + */ +GType publishing_piwigo_transaction_get_type (void) { + static volatile gsize publishing_piwigo_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoTransaction), 0, (GInstanceInitFunc) publishing_piwigo_transaction_instance_init, NULL }; + GType publishing_piwigo_transaction_type_id; + publishing_piwigo_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, "PublishingPiwigoTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_transaction_type_id__volatile, publishing_piwigo_transaction_type_id); + } + return publishing_piwigo_transaction_type_id__volatile; +} + + +PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_construct (GType object_type, PublishingPiwigoSession* session, const gchar* url, const gchar* username, const gchar* password) { + PublishingPiwigoSessionLoginTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (url != NULL, NULL); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (username != NULL, NULL); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (password != NULL, NULL); +#line 1580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = url; +#line 1580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSessionLoginTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 1582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.login"); +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = username; +#line 1583 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "username", _tmp2_); +#line 1584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = password; +#line 1584 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "password", _tmp3_); +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10693 "PiwigoPublishing.c" +} + + +PublishingPiwigoSessionLoginTransaction* publishing_piwigo_session_login_transaction_new (PublishingPiwigoSession* session, const gchar* url, const gchar* username, const gchar* password) { +#line 1579 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_session_login_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_LOGIN_TRANSACTION, session, url, username, password); +#line 10700 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_login_transaction_class_init (PublishingPiwigoSessionLoginTransactionClass * klass) { +#line 1578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_login_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10707 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_login_transaction_instance_init (PublishingPiwigoSessionLoginTransaction * self) { +} + + +/** + * Transaction used to implement the network login interaction. + */ +GType publishing_piwigo_session_login_transaction_get_type (void) { + static volatile gsize publishing_piwigo_session_login_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_session_login_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoSessionLoginTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_session_login_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoSessionLoginTransaction), 0, (GInstanceInitFunc) publishing_piwigo_session_login_transaction_instance_init, NULL }; + GType publishing_piwigo_session_login_transaction_type_id; + publishing_piwigo_session_login_transaction_type_id = g_type_register_static (PUBLISHING_PIWIGO_TYPE_TRANSACTION, "PublishingPiwigoSessionLoginTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_session_login_transaction_type_id__volatile, publishing_piwigo_session_login_transaction_type_id); + } + return publishing_piwigo_session_login_transaction_type_id__volatile; +} + + +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_construct_unauthenticated (GType object_type, PublishingPiwigoSession* session, const gchar* url, const gchar* pwg_id) { + PublishingPiwigoSessionGetStatusTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingPiwigoSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (url != NULL, NULL); +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (pwg_id != NULL, NULL); +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = url; +#line 1593 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSessionGetStatusTransaction*) publishing_rest_support_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = session; +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_session_get_pwg_id (_tmp2_); +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_; +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = g_strconcat ("pwg_id=", _tmp4_, NULL); +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = _tmp5_; +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Cookie", _tmp6_); +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp6_); +#line 1594 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp4_); +#line 1596 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.getStatus"); +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10771 "PiwigoPublishing.c" +} + + +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new_unauthenticated (PublishingPiwigoSession* session, const gchar* url, const gchar* pwg_id) { +#line 1592 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_session_get_status_transaction_construct_unauthenticated (PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, session, url, pwg_id); +#line 10778 "PiwigoPublishing.c" +} + + +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_construct (GType object_type, PublishingPiwigoSession* session) { + PublishingPiwigoSessionGetStatusTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSessionGetStatusTransaction*) publishing_piwigo_transaction_construct_authenticated (object_type, _tmp0_); +#line 1602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.getStatus"); +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10795 "PiwigoPublishing.c" +} + + +PublishingPiwigoSessionGetStatusTransaction* publishing_piwigo_session_get_status_transaction_new (PublishingPiwigoSession* session) { +#line 1599 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_session_get_status_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_GET_STATUS_TRANSACTION, session); +#line 10802 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_get_status_transaction_class_init (PublishingPiwigoSessionGetStatusTransactionClass * klass) { +#line 1591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_get_status_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10809 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_get_status_transaction_instance_init (PublishingPiwigoSessionGetStatusTransaction * self) { +} + + +/** + * Transaction used to implement the get status interaction. + */ +GType publishing_piwigo_session_get_status_transaction_get_type (void) { + static volatile gsize publishing_piwigo_session_get_status_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_session_get_status_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoSessionGetStatusTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_session_get_status_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoSessionGetStatusTransaction), 0, (GInstanceInitFunc) publishing_piwigo_session_get_status_transaction_instance_init, NULL }; + GType publishing_piwigo_session_get_status_transaction_type_id; + publishing_piwigo_session_get_status_transaction_type_id = g_type_register_static (PUBLISHING_PIWIGO_TYPE_TRANSACTION, "PublishingPiwigoSessionGetStatusTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_session_get_status_transaction_type_id__volatile, publishing_piwigo_session_get_status_transaction_type_id); + } + return publishing_piwigo_session_get_status_transaction_type_id__volatile; +} + + +PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_list_transaction_construct (GType object_type, PublishingPiwigoSession* session) { + PublishingPiwigoCategoriesGetListTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; +#line 1610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoCategoriesGetListTransaction*) publishing_piwigo_transaction_construct_authenticated (object_type, _tmp0_); +#line 1613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.categories.getList"); +#line 1614 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "recursive", "true"); +#line 1610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10847 "PiwigoPublishing.c" +} + + +PublishingPiwigoCategoriesGetListTransaction* publishing_piwigo_categories_get_list_transaction_new (PublishingPiwigoSession* session) { +#line 1610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_categories_get_list_transaction_construct (PUBLISHING_PIWIGO_TYPE_CATEGORIES_GET_LIST_TRANSACTION, session); +#line 10854 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_categories_get_list_transaction_class_init (PublishingPiwigoCategoriesGetListTransactionClass * klass) { +#line 1609 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_categories_get_list_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10861 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_categories_get_list_transaction_instance_init (PublishingPiwigoCategoriesGetListTransaction * self) { +} + + +/** + * Transaction used to implement the fetch categories interaction. + */ +GType publishing_piwigo_categories_get_list_transaction_get_type (void) { + static volatile gsize publishing_piwigo_categories_get_list_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_categories_get_list_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoCategoriesGetListTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_categories_get_list_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoCategoriesGetListTransaction), 0, (GInstanceInitFunc) publishing_piwigo_categories_get_list_transaction_instance_init, NULL }; + GType publishing_piwigo_categories_get_list_transaction_type_id; + publishing_piwigo_categories_get_list_transaction_type_id = g_type_register_static (PUBLISHING_PIWIGO_TYPE_TRANSACTION, "PublishingPiwigoCategoriesGetListTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_categories_get_list_transaction_type_id__volatile, publishing_piwigo_categories_get_list_transaction_type_id); + } + return publishing_piwigo_categories_get_list_transaction_type_id__volatile; +} + + +PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_transaction_construct (GType object_type, PublishingPiwigoSession* session) { + PublishingPiwigoSessionLogoutTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; +#line 1619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoSessionLogoutTransaction*) publishing_piwigo_transaction_construct_authenticated (object_type, _tmp0_); +#line 1622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.session.logout"); +#line 1619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10897 "PiwigoPublishing.c" +} + + +PublishingPiwigoSessionLogoutTransaction* publishing_piwigo_session_logout_transaction_new (PublishingPiwigoSession* session) { +#line 1619 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_session_logout_transaction_construct (PUBLISHING_PIWIGO_TYPE_SESSION_LOGOUT_TRANSACTION, session); +#line 10904 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_logout_transaction_class_init (PublishingPiwigoSessionLogoutTransactionClass * klass) { +#line 1618 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_session_logout_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10911 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_session_logout_transaction_instance_init (PublishingPiwigoSessionLogoutTransaction * self) { +} + + +GType publishing_piwigo_session_logout_transaction_get_type (void) { + static volatile gsize publishing_piwigo_session_logout_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_session_logout_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoSessionLogoutTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_session_logout_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoSessionLogoutTransaction), 0, (GInstanceInitFunc) publishing_piwigo_session_logout_transaction_instance_init, NULL }; + GType publishing_piwigo_session_logout_transaction_type_id; + publishing_piwigo_session_logout_transaction_type_id = g_type_register_static (PUBLISHING_PIWIGO_TYPE_TRANSACTION, "PublishingPiwigoSessionLogoutTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_session_logout_transaction_type_id__volatile, publishing_piwigo_session_logout_transaction_type_id); + } + return publishing_piwigo_session_logout_transaction_type_id__volatile; +} + + +PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_transaction_construct (GType object_type, PublishingPiwigoSession* session, const gchar* category, gint parent_id, const gchar* comment) { + PublishingPiwigoCategoriesAddTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + const gchar* _tmp6_ = NULL; +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (category != NULL, NULL); +#line 1628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1628 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoCategoriesAddTransaction*) publishing_piwigo_transaction_construct_authenticated (object_type, _tmp0_); +#line 1630 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.categories.add"); +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = category; +#line 1631 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "name", _tmp1_); +#line 1633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = parent_id; +#line 1633 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp2_ != 0) { +#line 10955 "PiwigoPublishing.c" + gint _tmp3_ = 0; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 1634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = parent_id; +#line 1634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = g_strdup_printf ("%i", _tmp3_); +#line 1634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = _tmp4_; +#line 1634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "parent", _tmp5_); +#line 1634 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp5_); +#line 10969 "PiwigoPublishing.c" + } +#line 1637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = comment; +#line 1637 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp6_, "") != 0) { +#line 10975 "PiwigoPublishing.c" + const gchar* _tmp7_ = NULL; +#line 1638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = comment; +#line 1638 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp7_); +#line 10981 "PiwigoPublishing.c" + } +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 10985 "PiwigoPublishing.c" +} + + +PublishingPiwigoCategoriesAddTransaction* publishing_piwigo_categories_add_transaction_new (PublishingPiwigoSession* session, const gchar* category, gint parent_id, const gchar* comment) { +#line 1627 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_categories_add_transaction_construct (PUBLISHING_PIWIGO_TYPE_CATEGORIES_ADD_TRANSACTION, session, category, parent_id, comment); +#line 10992 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_categories_add_transaction_class_init (PublishingPiwigoCategoriesAddTransactionClass * klass) { +#line 1626 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_categories_add_transaction_parent_class = g_type_class_peek_parent (klass); +#line 10999 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_categories_add_transaction_instance_init (PublishingPiwigoCategoriesAddTransaction * self) { +} + + +GType publishing_piwigo_categories_add_transaction_get_type (void) { + static volatile gsize publishing_piwigo_categories_add_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_categories_add_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoCategoriesAddTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_categories_add_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoCategoriesAddTransaction), 0, (GInstanceInitFunc) publishing_piwigo_categories_add_transaction_instance_init, NULL }; + GType publishing_piwigo_categories_add_transaction_type_id; + publishing_piwigo_categories_add_transaction_type_id = g_type_register_static (PUBLISHING_PIWIGO_TYPE_TRANSACTION, "PublishingPiwigoCategoriesAddTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_categories_add_transaction_type_id__volatile, publishing_piwigo_categories_add_transaction_type_id); + } + return publishing_piwigo_categories_add_transaction_type_id__volatile; +} + + +static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gchar** _tmp3_ = NULL; + gint _tmp3__length1 = 0; +#line 1054 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = separator; +#line 1054 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp0_ == NULL) { +#line 1055 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + separator = ""; +#line 11032 "PiwigoPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ != NULL) { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = TRUE; +#line 11042 "PiwigoPublishing.c" + } else { + gchar** _tmp4_ = NULL; + gint _tmp4__length1 = 0; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp4__length1 > 0; +#line 11052 "PiwigoPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp2_) { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = TRUE; +#line 11058 "PiwigoPublishing.c" + } else { + gboolean _tmp5_ = FALSE; + gchar** _tmp6_ = NULL; + gint _tmp6__length1 = 0; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp6__length1 == -1) { +#line 11069 "PiwigoPublishing.c" + gchar** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = str_array; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7__length1 = str_array_length1; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = _tmp7_[0]; +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_ != NULL; +#line 11081 "PiwigoPublishing.c" + } else { +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = FALSE; +#line 11085 "PiwigoPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp5_; +#line 11089 "PiwigoPublishing.c" + } +#line 1057 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_) { +#line 11093 "PiwigoPublishing.c" + gint i = 0; + gsize len = 0UL; + gint _tmp31_ = 0; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + gsize _tmp35_ = 0UL; + const gchar* _tmp36_ = NULL; + gint _tmp37_ = 0; + gint _tmp38_ = 0; + gint _tmp39_ = 0; + const gchar* res = NULL; + gsize _tmp40_ = 0UL; + void* _tmp41_ = NULL; + void* ptr = NULL; + const gchar* _tmp42_ = NULL; + gchar** _tmp43_ = NULL; + gint _tmp43__length1 = 0; + const gchar* _tmp44_ = NULL; + void* _tmp45_ = NULL; + const gchar* _tmp62_ = NULL; +#line 1059 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = (gsize) 1; +#line 11116 "PiwigoPublishing.c" + { + gboolean _tmp9_ = FALSE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = TRUE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + while (TRUE) { +#line 11125 "PiwigoPublishing.c" + gboolean _tmp11_ = FALSE; + gboolean _tmp12_ = FALSE; + gchar** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + gint _tmp21_ = 0; + gchar** _tmp22_ = NULL; + gint _tmp22__length1 = 0; + gint _tmp23_ = 0; + const gchar* _tmp24_ = NULL; + gsize _tmp30_ = 0UL; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp9_) { +#line 11138 "PiwigoPublishing.c" + gint _tmp10_ = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = _tmp10_ + 1; +#line 11144 "PiwigoPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = FALSE; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp13__length1 != -1) { +#line 11154 "PiwigoPublishing.c" + gint _tmp14_ = 0; + gchar** _tmp15_ = NULL; + gint _tmp15__length1 = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ < _tmp15__length1; +#line 11166 "PiwigoPublishing.c" + } else { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 11170 "PiwigoPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp12_) { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = TRUE; +#line 11176 "PiwigoPublishing.c" + } else { + gboolean _tmp16_ = FALSE; + gchar** _tmp17_ = NULL; + gint _tmp17__length1 = 0; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp17__length1 == -1) { +#line 11187 "PiwigoPublishing.c" + gchar** _tmp18_ = NULL; + gint _tmp18__length1 = 0; + gint _tmp19_ = 0; + const gchar* _tmp20_ = NULL; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = str_array; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18__length1 = str_array_length1; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = i; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = _tmp18_[_tmp19_]; +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = _tmp20_ != NULL; +#line 11202 "PiwigoPublishing.c" + } else { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = FALSE; +#line 11206 "PiwigoPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = _tmp16_; +#line 11210 "PiwigoPublishing.c" + } +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp11_) { +#line 1060 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + break; +#line 11216 "PiwigoPublishing.c" + } +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = str_array; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22__length1 = str_array_length1; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp23_ = i; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp24_ = _tmp22_[_tmp23_]; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp24_ != NULL) { +#line 11228 "PiwigoPublishing.c" + gchar** _tmp25_ = NULL; + gint _tmp25__length1 = 0; + gint _tmp26_ = 0; + const gchar* _tmp27_ = NULL; + gint _tmp28_ = 0; + gint _tmp29_ = 0; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp25_ = str_array; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp25__length1 = str_array_length1; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp26_ = i; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp27_ = _tmp25_[_tmp26_]; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp28_ = strlen ((const gchar*) _tmp27_); +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp29_ = _tmp28_; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = _tmp29_; +#line 11249 "PiwigoPublishing.c" + } else { +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = 0; +#line 11253 "PiwigoPublishing.c" + } +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp30_ = len; +#line 1061 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp30_ + _tmp21_; +#line 11259 "PiwigoPublishing.c" + } + } +#line 1063 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp31_ = i; +#line 1063 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp31_ == 0) { +#line 11266 "PiwigoPublishing.c" + gchar* _tmp32_ = NULL; +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp32_ = g_strdup (""); +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp32_; +#line 1064 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 11274 "PiwigoPublishing.c" + } +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp33_ = i; +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + str_array_length1 = _tmp33_; +#line 1066 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp34_ = str_array_length1; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp35_ = len; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp36_ = separator; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp37_ = strlen ((const gchar*) _tmp36_); +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp38_ = _tmp37_; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp39_ = i; +#line 1067 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp40_ = len; +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp41_ = g_malloc (_tmp40_); +#line 1069 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = _tmp41_; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp42_ = res; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp43_ = str_array; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp43__length1 = str_array_length1; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp44_ = _tmp43_[0]; +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); +#line 1070 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp45_; +#line 11312 "PiwigoPublishing.c" + { + gboolean _tmp46_ = FALSE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = 1; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp46_ = TRUE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + while (TRUE) { +#line 11321 "PiwigoPublishing.c" + gint _tmp48_ = 0; + gchar** _tmp49_ = NULL; + gint _tmp49__length1 = 0; + void* _tmp50_ = NULL; + const gchar* _tmp51_ = NULL; + void* _tmp52_ = NULL; + const gchar* _tmp53_ = NULL; + gchar** _tmp54_ = NULL; + gint _tmp54__length1 = 0; + gint _tmp55_ = 0; + const gchar* _tmp56_ = NULL; + void* _tmp60_ = NULL; + void* _tmp61_ = NULL; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!_tmp46_) { +#line 11337 "PiwigoPublishing.c" + gint _tmp47_ = 0; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp47_ = i; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + i = _tmp47_ + 1; +#line 11343 "PiwigoPublishing.c" + } +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp46_ = FALSE; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp48_ = i; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp49_ = str_array; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp49__length1 = str_array_length1; +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (!(_tmp48_ < _tmp49__length1)) { +#line 1071 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + break; +#line 11357 "PiwigoPublishing.c" + } +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp50_ = ptr; +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp51_ = separator; +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); +#line 1072 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp52_; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp54_ = str_array; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp54__length1 = str_array_length1; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp55_ = i; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp56_ = _tmp54_[_tmp55_]; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp56_ != NULL) { +#line 11377 "PiwigoPublishing.c" + gchar** _tmp57_ = NULL; + gint _tmp57__length1 = 0; + gint _tmp58_ = 0; + const gchar* _tmp59_ = NULL; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp57_ = str_array; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp57__length1 = str_array_length1; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp58_ = i; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp59_ = _tmp57_[_tmp58_]; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp53_ = (const gchar*) _tmp59_; +#line 11392 "PiwigoPublishing.c" + } else { +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp53_ = ""; +#line 11396 "PiwigoPublishing.c" + } +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp60_ = ptr; +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); +#line 1073 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + ptr = _tmp61_; +#line 11404 "PiwigoPublishing.c" + } + } +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp62_ = res; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = NULL; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (gchar*) _tmp62_; +#line 1076 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 11415 "PiwigoPublishing.c" + } else { + gchar* _tmp63_ = NULL; +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp63_ = g_strdup (""); +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp63_; +#line 1078 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 11424 "PiwigoPublishing.c" + } +} + + +static void _g_free0_ (gpointer var) { +#line 1703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + var = (g_free (var), NULL); +#line 11432 "PiwigoPublishing.c" +} + + +PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_construct (GType object_type, PublishingPiwigoSession* session, PublishingPiwigoPublishingParameters* parameters, SpitPublishingPublishable* publishable) { + PublishingPiwigoImagesAddTransaction* self = NULL; + PublishingPiwigoSession* _tmp0_ = NULL; + SpitPublishingPublishable* _tmp1_ = NULL; + PublishingPiwigoSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + PublishingPiwigoSession* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + PublishingPiwigoPublishingParameters* _tmp12_ = NULL; + PublishingPiwigoPublishingParameters* _tmp13_ = NULL; + gchar** keywords = NULL; + SpitPublishingPublishable* _tmp14_ = NULL; + gint _tmp15_ = 0; + gchar** _tmp16_ = NULL; + gint keywords_length1 = 0; + gint _keywords_size_ = 0; + gchar* tags = NULL; + gchar* _tmp17_ = NULL; + gchar** _tmp18_ = NULL; + gint _tmp18__length1 = 0; + SpitPublishingPublishable* _tmp21_ = NULL; + GFile* _tmp22_ = NULL; + GFile* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + PublishingPiwigoPublishingParameters* _tmp26_ = NULL; + PublishingPiwigoCategory* _tmp27_ = NULL; + gint _tmp28_ = 0; + PublishingPiwigoPublishingParameters* _tmp29_ = NULL; + PublishingPiwigoPermissionLevel* _tmp30_ = NULL; + gint _tmp31_ = 0; + gchar* name = NULL; + SpitPublishingPublishable* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* comment = NULL; + SpitPublishingPublishable* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + const gchar* _tmp36_ = NULL; + PublishingPiwigoPublishingParameters* _tmp53_ = NULL; + PublishingPiwigoCategory* _tmp54_ = NULL; + gint _tmp55_ = 0; + gchar* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; + PublishingPiwigoPublishingParameters* _tmp58_ = NULL; + PublishingPiwigoPermissionLevel* _tmp59_ = NULL; + gint _tmp60_ = 0; + gchar* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + PublishingPiwigoPublishingParameters* _tmp63_ = NULL; + gboolean _tmp64_ = FALSE; + GHashTable* disposition_table = NULL; + GHashFunc _tmp67_ = NULL; + GEqualFunc _tmp68_ = NULL; + GHashTable* _tmp69_ = NULL; + gchar* _tmp70_ = NULL; + SpitPublishingPublishable* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; + gchar* _tmp73_ = NULL; + gchar* _tmp74_ = NULL; + gchar* _tmp75_ = NULL; + gchar* _tmp76_ = NULL; +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_SESSION (session), NULL); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (PUBLISHING_PIWIGO_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp0_ = session; +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp1_ = publishable; +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp2_ = session; +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp3_ = publishing_piwigo_session_get_pwg_url (_tmp2_); +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp4_ = _tmp3_; +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = (PublishingPiwigoImagesAddTransaction*) publishing_rest_support_upload_transaction_construct_with_endpoint_url (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp4_); +#line 1647 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp4_); +#line 1648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp5_ = session; +#line 1648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp6_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 1648 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp6_) { +#line 11524 "PiwigoPublishing.c" + PublishingPiwigoSession* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp7_ = session; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp8_ = publishing_piwigo_session_get_pwg_id (_tmp7_); +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp9_ = _tmp8_; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp10_ = g_strconcat ("pwg_id=", _tmp9_, NULL); +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp11_ = _tmp10_; +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_header (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "Cookie", _tmp11_); +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp11_); +#line 1649 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp9_); +#line 11546 "PiwigoPublishing.c" + } +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp12_ = parameters; +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp13_ = _publishing_piwigo_publishing_parameters_ref0 (_tmp12_); +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 1651 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->parameters = _tmp13_; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp14_ = publishable; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp16_ = spit_publishing_publishable_get_publishing_keywords (_tmp14_, &_tmp15_); +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + keywords = _tmp16_; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + keywords_length1 = _tmp15_; +#line 1653 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _keywords_size_ = keywords_length1; +#line 1654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp17_ = g_strdup (""); +#line 1654 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + tags = _tmp17_; +#line 1655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18_ = keywords; +#line 1655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp18__length1 = keywords_length1; +#line 1655 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp18_ != NULL) { +#line 11576 "PiwigoPublishing.c" + gchar** _tmp19_ = NULL; + gint _tmp19__length1 = 0; + gchar* _tmp20_ = NULL; +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19_ = keywords; +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp19__length1 = keywords_length1; +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp20_ = _vala_g_strjoinv (",", _tmp19_, _tmp19__length1); +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (tags); +#line 1656 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + tags = _tmp20_; +#line 11590 "PiwigoPublishing.c" + } +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp21_ = publishable; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp22_ = spit_publishing_publishable_get_serialized_file (_tmp21_); +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp23_ = _tmp22_; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp24_ = g_file_get_basename (_tmp23_); +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp25_ = _tmp24_; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp26_ = parameters; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp27_ = _tmp26_->category; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp28_ = _tmp27_->id; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp29_ = parameters; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp30_ = _tmp29_->perm_level; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp31_ = _tmp30_->id; +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_debug ("PiwigoPublishing.vala:1659: PiwigoConnector: Uploading photo %s to cat" \ +"egory id %d with perm level %d", _tmp25_, _tmp28_, _tmp31_); +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp25_); +#line 1659 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_object_unref0 (_tmp23_); +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp32_ = publishable; +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp33_ = spit_publishing_publishable_get_publishing_name (_tmp32_); +#line 1662 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + name = _tmp33_; +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp34_ = publishable; +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp35_ = spit_publishing_publishable_get_param_string (_tmp34_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_COMMENT); +#line 1663 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + comment = _tmp35_; +#line 1665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp36_ = name; +#line 1665 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp36_, "") != 0) { +#line 11636 "PiwigoPublishing.c" + SpitPublishingPublishable* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + const gchar* _tmp39_ = NULL; + gboolean _tmp40_ = FALSE; + const gchar* _tmp41_ = NULL; +#line 1666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp37_ = publishable; +#line 1666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp38_ = spit_publishing_publishable_get_param_string (_tmp37_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 1666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 1666 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + name = _tmp38_; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp39_ = name; +#line 1668 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "name", _tmp39_); +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp41_ = comment; +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp41_ != NULL) { +#line 11658 "PiwigoPublishing.c" + const gchar* _tmp42_ = NULL; +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp42_ = comment; +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = g_strcmp0 (_tmp42_, "") != 0; +#line 11664 "PiwigoPublishing.c" + } else { +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp40_ = FALSE; +#line 11668 "PiwigoPublishing.c" + } +#line 1669 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp40_) { +#line 11672 "PiwigoPublishing.c" + const gchar* _tmp43_ = NULL; +#line 1670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp43_ = comment; +#line 1670 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp43_); +#line 11678 "PiwigoPublishing.c" + } + } else { + gboolean _tmp44_ = FALSE; + const gchar* _tmp45_ = NULL; +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp45_ = comment; +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp45_ != NULL) { +#line 11687 "PiwigoPublishing.c" + const gchar* _tmp46_ = NULL; +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp46_ = comment; +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = g_strcmp0 (_tmp46_, "") != 0; +#line 11693 "PiwigoPublishing.c" + } else { +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp44_ = FALSE; +#line 11697 "PiwigoPublishing.c" + } +#line 1674 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp44_) { +#line 11701 "PiwigoPublishing.c" + const gchar* _tmp47_ = NULL; + const gchar* _tmp48_ = NULL; +#line 1675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp47_ = name; +#line 1675 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "name", _tmp47_); +#line 1676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp48_ = comment; +#line 1676 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp48_); +#line 11712 "PiwigoPublishing.c" + } else { + PublishingPiwigoPublishingParameters* _tmp49_ = NULL; + gboolean _tmp50_ = FALSE; +#line 1681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp49_ = parameters; +#line 1681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp50_ = _tmp49_->title_as_comment; +#line 1681 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (_tmp50_) { +#line 11722 "PiwigoPublishing.c" + const gchar* _tmp51_ = NULL; +#line 1682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp51_ = name; +#line 1682 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "comment", _tmp51_); +#line 11728 "PiwigoPublishing.c" + } else { + const gchar* _tmp52_ = NULL; +#line 1684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp52_ = name; +#line 1684 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "name", _tmp52_); +#line 11735 "PiwigoPublishing.c" + } + } + } +#line 1688 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "method", "pwg.images.addSimple"); +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp53_ = parameters; +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp54_ = _tmp53_->category; +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp55_ = _tmp54_->id; +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp56_ = g_strdup_printf ("%i", _tmp55_); +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp57_ = _tmp56_; +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "category", _tmp57_); +#line 1689 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp57_); +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp58_ = parameters; +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp59_ = _tmp58_->perm_level; +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp60_ = _tmp59_->id; +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp61_ = g_strdup_printf ("%i", _tmp60_); +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp62_ = _tmp61_; +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "level", _tmp62_); +#line 1690 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp62_); +#line 1691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp63_ = parameters; +#line 1691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp64_ = _tmp63_->no_upload_tags; +#line 1691 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (!_tmp64_) { +#line 11775 "PiwigoPublishing.c" + const gchar* _tmp65_ = NULL; +#line 1692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp65_ = tags; +#line 1692 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + if (g_strcmp0 (_tmp65_, "") != 0) { +#line 11781 "PiwigoPublishing.c" + const gchar* _tmp66_ = NULL; +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp66_ = tags; +#line 1693 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_transaction_add_argument (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "tags", _tmp66_); +#line 11787 "PiwigoPublishing.c" + } + } +#line 1703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp67_ = g_str_hash; +#line 1703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp68_ = g_str_equal; +#line 1703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp69_ = g_hash_table_new_full (_tmp67_, _tmp68_, _g_free0_, _g_free0_); +#line 1703 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + disposition_table = _tmp69_; +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp70_ = g_strdup ("filename"); +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp71_ = publishable; +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp72_ = spit_publishing_publishable_get_param_string (_tmp71_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp73_ = _tmp72_; +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp74_ = soup_uri_encode (_tmp73_, NULL); +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_hash_table_insert (disposition_table, _tmp70_, _tmp74_); +#line 1705 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (_tmp73_); +#line 1708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp75_ = g_strdup ("name"); +#line 1708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _tmp76_ = g_strdup ("image"); +#line 1708 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_hash_table_insert (disposition_table, _tmp75_, _tmp76_); +#line 1710 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_rest_support_upload_transaction_set_binary_disposition_table (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, PublishingRESTSupportUploadTransaction), disposition_table); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_hash_table_unref0 (disposition_table); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (comment); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (name); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _g_free0 (tags); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL); +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return self; +#line 11832 "PiwigoPublishing.c" +} + + +PublishingPiwigoImagesAddTransaction* publishing_piwigo_images_add_transaction_new (PublishingPiwigoSession* session, PublishingPiwigoPublishingParameters* parameters, SpitPublishingPublishable* publishable) { +#line 1646 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + return publishing_piwigo_images_add_transaction_construct (PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, session, parameters, publishable); +#line 11839 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_images_add_transaction_class_init (PublishingPiwigoImagesAddTransactionClass * klass) { +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + publishing_piwigo_images_add_transaction_parent_class = g_type_class_peek_parent (klass); +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_piwigo_images_add_transaction_finalize; +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingPiwigoImagesAddTransactionPrivate)); +#line 11850 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_images_add_transaction_instance_init (PublishingPiwigoImagesAddTransaction * self) { +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv = PUBLISHING_PIWIGO_IMAGES_ADD_TRANSACTION_GET_PRIVATE (self); +#line 1644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self->priv->parameters = NULL; +#line 11859 "PiwigoPublishing.c" +} + + +static void publishing_piwigo_images_add_transaction_finalize (PublishingRESTSupportTransaction* obj) { + PublishingPiwigoImagesAddTransaction * self; +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_PIWIGO_TYPE_IMAGES_ADD_TRANSACTION, PublishingPiwigoImagesAddTransaction); +#line 1644 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + _publishing_piwigo_publishing_parameters_unref0 (self->priv->parameters); +#line 1643 "/home/jens/Source/shotwell/plugins/shotwell-publishing/PiwigoPublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_piwigo_images_add_transaction_parent_class)->finalize (obj); +#line 11871 "PiwigoPublishing.c" +} + + +GType publishing_piwigo_images_add_transaction_get_type (void) { + static volatile gsize publishing_piwigo_images_add_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_piwigo_images_add_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingPiwigoImagesAddTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_piwigo_images_add_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingPiwigoImagesAddTransaction), 0, (GInstanceInitFunc) publishing_piwigo_images_add_transaction_instance_init, NULL }; + GType publishing_piwigo_images_add_transaction_type_id; + publishing_piwigo_images_add_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_UPLOAD_TRANSACTION, "PublishingPiwigoImagesAddTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_piwigo_images_add_transaction_type_id__volatile, publishing_piwigo_images_add_transaction_type_id); + } + return publishing_piwigo_images_add_transaction_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + +static gint _vala_array_length (gpointer array) { + int length; + length = 0; + if (array) { + while (((gpointer*) array)[length]) { + length++; + } + } + return length; +} + + + diff --git a/plugins/shotwell-publishing/PiwigoPublishing.vala b/plugins/shotwell-publishing/PiwigoPublishing.vala index 7dd9090..c3a1bd0 100644 --- a/plugins/shotwell-publishing/PiwigoPublishing.vala +++ b/plugins/shotwell-publishing/PiwigoPublishing.vala @@ -11,7 +11,8 @@ public class PiwigoService : Object, Spit.Pluggable, Spit.Publishing.Service { public PiwigoService(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = Resources.load_from_resource + (Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { @@ -63,7 +64,7 @@ internal class Category { public string comment; public string display_name; public string uppercats; - public static const int NO_ID = -1; + public const int NO_ID = -1; public Category(int id, string name, string uppercats, string? comment = "") { this.id = id; @@ -911,6 +912,8 @@ public class PiwigoPublisher : Spit.Publishing.Publisher, GLib.Object { error_type = "LOCAL_FILE_ERROR"; } else if(e is Spit.Publishing.PublishingError.EXPIRED_SESSION) { error_type = "EXPIRED_SESSION"; + } else if (e is Spit.Publishing.PublishingError.SSL_FAILED) { + error_type = "SECURE_CONNECTION_FAILED"; } debug("Unhandled error: type=%s; message='%s'".printf(error_type, e.message)); @@ -1001,12 +1004,9 @@ internal class AuthenticationPane : Spit.Publishing.DialogPane, Object { public AuthenticationPane(PiwigoPublisher publisher, Mode mode = Mode.INTRO) { this.pane_widget = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - File ui_file = publisher.get_host().get_module_file().get_parent(). - get_child("piwigo_authentication_pane.glade"); - try { builder = new Gtk.Builder(); - builder.add_from_file(ui_file.get_path()); + builder.add_from_resource (Resources.RESOURCE_PATH + "/piwigo_authentication_pane.ui"); builder.connect_signals(null); Gtk.Alignment align = builder.get_object("alignment") as Gtk.Alignment; @@ -1156,12 +1156,9 @@ internal class PublishingOptionsPane : Spit.Publishing.DialogPane, Object { this.last_title_as_comment = last_title_as_comment; this.last_no_upload_tags = last_no_upload_tags; - File ui_file = publisher.get_host().get_module_file().get_parent(). - get_child("piwigo_publishing_options_pane.glade"); - try { builder = new Gtk.Builder(); - builder.add_from_file(ui_file.get_path()); + builder.add_from_resource (Resources.RESOURCE_PATH + "/piwigo_publishing_options_pane.ui"); builder.connect_signals(null); Gtk.Alignment align = builder.get_object("alignment") as Gtk.Alignment; diff --git a/plugins/shotwell-publishing/YouTubePublishing.c b/plugins/shotwell-publishing/YouTubePublishing.c new file mode 100644 index 0000000..cc7cd07 --- /dev/null +++ b/plugins/shotwell-publishing/YouTubePublishing.c @@ -0,0 +1,4475 @@ +/* YouTubePublishing.c generated by valac 0.32.1, the Vala compiler + * generated from YouTubePublishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <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 <libxml/tree.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_YOU_TUBE_SERVICE (you_tube_service_get_type ()) +#define YOU_TUBE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_YOU_TUBE_SERVICE, YouTubeService)) +#define YOU_TUBE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_YOU_TUBE_SERVICE, YouTubeServiceClass)) +#define IS_YOU_TUBE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_YOU_TUBE_SERVICE)) +#define IS_YOU_TUBE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_YOU_TUBE_SERVICE)) +#define YOU_TUBE_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_YOU_TUBE_SERVICE, YouTubeServiceClass)) + +typedef struct _YouTubeService YouTubeService; +typedef struct _YouTubeServiceClass YouTubeServiceClass; +typedef struct _YouTubeServicePrivate YouTubeServicePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER (publishing_you_tube_you_tube_publisher_get_type ()) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisherClass)) +#define PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER)) +#define PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisherClass)) + +typedef struct _PublishingYouTubeYouTubePublisher PublishingYouTubeYouTubePublisher; +typedef struct _PublishingYouTubeYouTubePublisherClass PublishingYouTubeYouTubePublisherClass; + +#define PUBLISHING_YOU_TUBE_TYPE_PRIVACY_SETTING (publishing_you_tube_privacy_setting_get_type ()) + +#define PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS (publishing_you_tube_publishing_parameters_get_type ()) +#define PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS, PublishingYouTubePublishingParameters)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS, PublishingYouTubePublishingParametersClass)) +#define PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS, PublishingYouTubePublishingParametersClass)) + +typedef struct _PublishingYouTubePublishingParameters PublishingYouTubePublishingParameters; +typedef struct _PublishingYouTubePublishingParametersClass PublishingYouTubePublishingParametersClass; +typedef struct _PublishingYouTubePublishingParametersPrivate PublishingYouTubePublishingParametersPrivate; +typedef struct _PublishingYouTubeParamSpecPublishingParameters PublishingYouTubeParamSpecPublishingParameters; +typedef struct _PublishingYouTubeYouTubePublisherPrivate PublishingYouTubeYouTubePublisherPrivate; +#define _publishing_you_tube_publishing_parameters_unref0(var) ((var == NULL) ? NULL : (var = (publishing_you_tube_publishing_parameters_unref (var), NULL))) +#define _publishing_rest_support_session_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_session_unref (var), NULL))) + +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION (publishing_you_tube_you_tube_publisher_channel_directory_transaction_get_type ()) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION, PublishingYouTubeYouTubePublisherChannelDirectoryTransaction)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION, PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_IS_CHANNEL_DIRECTORY_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_IS_CHANNEL_DIRECTORY_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION)) +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION, PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass)) + +typedef struct _PublishingYouTubeYouTubePublisherChannelDirectoryTransaction PublishingYouTubeYouTubePublisherChannelDirectoryTransaction; +typedef struct _PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass; +#define _publishing_rest_support_transaction_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_transaction_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _publishing_rest_support_xml_document_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_xml_document_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE (publishing_you_tube_publishing_options_pane_get_type ()) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPaneClass)) +#define PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPaneClass)) + +typedef struct _PublishingYouTubePublishingOptionsPane PublishingYouTubePublishingOptionsPane; +typedef struct _PublishingYouTubePublishingOptionsPaneClass PublishingYouTubePublishingOptionsPaneClass; + +#define PUBLISHING_YOU_TUBE_TYPE_UPLOADER (publishing_you_tube_uploader_get_type ()) +#define PUBLISHING_YOU_TUBE_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploader)) +#define PUBLISHING_YOU_TUBE_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploaderClass)) +#define PUBLISHING_YOU_TUBE_IS_UPLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOADER)) +#define PUBLISHING_YOU_TUBE_IS_UPLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_TYPE_UPLOADER)) +#define PUBLISHING_YOU_TUBE_UPLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploaderClass)) + +typedef struct _PublishingYouTubeUploader PublishingYouTubeUploader; +typedef struct _PublishingYouTubeUploaderClass PublishingYouTubeUploaderClass; +#define _publishing_rest_support_batch_uploader_unref0(var) ((var == NULL) ? NULL : (var = (publishing_rest_support_batch_uploader_unref (var), NULL))) +typedef struct _PublishingYouTubeYouTubePublisherChannelDirectoryTransactionPrivate PublishingYouTubeYouTubePublisherChannelDirectoryTransactionPrivate; +typedef struct _PublishingYouTubePublishingOptionsPanePrivate PublishingYouTubePublishingOptionsPanePrivate; + +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION (publishing_you_tube_publishing_options_pane_privacy_description_get_type ()) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingYouTubePublishingOptionsPanePrivacyDescription)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_IS_PRIVACY_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_IS_PRIVACY_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)) +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass)) + +typedef struct _PublishingYouTubePublishingOptionsPanePrivacyDescription PublishingYouTubePublishingOptionsPanePrivacyDescription; +typedef struct _PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass; +#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL))) +typedef struct _PublishingYouTubePublishingOptionsPanePrivacyDescriptionPrivate PublishingYouTubePublishingOptionsPanePrivacyDescriptionPrivate; +#define _publishing_you_tube_publishing_options_pane_privacy_description_unref0(var) ((var == NULL) ? NULL : (var = (publishing_you_tube_publishing_options_pane_privacy_description_unref (var), NULL))) +typedef struct _PublishingYouTubePublishingOptionsPaneParamSpecPrivacyDescription PublishingYouTubePublishingOptionsPaneParamSpecPrivacyDescription; + +#define PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION (publishing_you_tube_upload_transaction_get_type ()) +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransaction)) +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransactionClass)) +#define PUBLISHING_YOU_TUBE_IS_UPLOAD_TRANSACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_YOU_TUBE_IS_UPLOAD_TRANSACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION)) +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransactionClass)) + +typedef struct _PublishingYouTubeUploadTransaction PublishingYouTubeUploadTransaction; +typedef struct _PublishingYouTubeUploadTransactionClass PublishingYouTubeUploadTransactionClass; +typedef struct _PublishingYouTubeUploadTransactionPrivate PublishingYouTubeUploadTransactionPrivate; +#define __vala_SoupBuffer_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupBuffer_free (var), NULL))) +#define __vala_SoupMultipart_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupMultipart_free (var), NULL))) +typedef struct _PublishingYouTubeUploaderPrivate PublishingYouTubeUploaderPrivate; +#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 _YouTubeService { + GObject parent_instance; + YouTubeServicePrivate * priv; +}; + +struct _YouTubeServiceClass { + GObjectClass parent_class; +}; + +typedef enum { + PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC, + PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED, + PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE +} PublishingYouTubePrivacySetting; + +struct _PublishingYouTubePublishingParameters { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingYouTubePublishingParametersPrivate * priv; +}; + +struct _PublishingYouTubePublishingParametersClass { + GTypeClass parent_class; + void (*finalize) (PublishingYouTubePublishingParameters *self); +}; + +struct _PublishingYouTubePublishingParametersPrivate { + PublishingYouTubePrivacySetting privacy; + gchar* channel_name; + gchar* user_name; +}; + +struct _PublishingYouTubeParamSpecPublishingParameters { + GParamSpec parent_instance; +}; + +struct _PublishingYouTubeYouTubePublisher { + PublishingRESTSupportGooglePublisher parent_instance; + PublishingYouTubeYouTubePublisherPrivate * priv; +}; + +struct _PublishingYouTubeYouTubePublisherClass { + PublishingRESTSupportGooglePublisherClass parent_class; +}; + +struct _PublishingYouTubeYouTubePublisherPrivate { + gboolean running; + gchar* refresh_token; + PublishingYouTubePublishingParameters* publishing_parameters; + SpitPublishingProgressCallback progress_reporter; + gpointer progress_reporter_target; + GDestroyNotify progress_reporter_target_destroy_notify; +}; + +struct _PublishingYouTubeYouTubePublisherChannelDirectoryTransaction { + PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance; + PublishingYouTubeYouTubePublisherChannelDirectoryTransactionPrivate * priv; +}; + +struct _PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass { + PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass parent_class; +}; + +struct _PublishingYouTubePublishingOptionsPane { + GObject parent_instance; + PublishingYouTubePublishingOptionsPanePrivate * priv; +}; + +struct _PublishingYouTubePublishingOptionsPaneClass { + GObjectClass parent_class; +}; + +struct _PublishingYouTubePublishingOptionsPanePrivate { + GtkBox* pane_widget; + GtkComboBoxText* privacy_combo; + GtkLabel* publish_to_label; + GtkLabel* login_identity_label; + GtkButton* publish_button; + GtkButton* logout_button; + GtkBuilder* builder; + GtkLabel* privacy_label; + PublishingYouTubePublishingOptionsPanePrivacyDescription** privacy_descriptions; + gint privacy_descriptions_length1; + gint _privacy_descriptions_size_; + PublishingYouTubePublishingParameters* publishing_parameters; +}; + +struct _PublishingYouTubePublishingOptionsPanePrivacyDescription { + GTypeInstance parent_instance; + volatile int ref_count; + PublishingYouTubePublishingOptionsPanePrivacyDescriptionPrivate * priv; + gchar* description; + PublishingYouTubePrivacySetting privacy_setting; +}; + +struct _PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass { + GTypeClass parent_class; + void (*finalize) (PublishingYouTubePublishingOptionsPanePrivacyDescription *self); +}; + +struct _PublishingYouTubePublishingOptionsPaneParamSpecPrivacyDescription { + GParamSpec parent_instance; +}; + +struct _PublishingYouTubeUploadTransaction { + PublishingRESTSupportGooglePublisherAuthenticatedTransaction parent_instance; + PublishingYouTubeUploadTransactionPrivate * priv; +}; + +struct _PublishingYouTubeUploadTransactionClass { + PublishingRESTSupportGooglePublisherAuthenticatedTransactionClass parent_class; +}; + +struct _PublishingYouTubeUploadTransactionPrivate { + PublishingYouTubePublishingParameters* parameters; + PublishingRESTSupportGoogleSession* session; + SpitPublishingPublishable* publishable; +}; + +struct _PublishingYouTubeUploader { + PublishingRESTSupportBatchUploader parent_instance; + PublishingYouTubeUploaderPrivate * priv; +}; + +struct _PublishingYouTubeUploaderClass { + PublishingRESTSupportBatchUploaderClass parent_class; +}; + +struct _PublishingYouTubeUploaderPrivate { + PublishingYouTubePublishingParameters* parameters; +}; + + +static gpointer you_tube_service_parent_class = NULL; +static GdkPixbuf** you_tube_service_icon_pixbuf_set; +static gint you_tube_service_icon_pixbuf_set_length1; +static GdkPixbuf** you_tube_service_icon_pixbuf_set = NULL; +static gint you_tube_service_icon_pixbuf_set_length1 = 0; +static gint _you_tube_service_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* you_tube_service_spit_pluggable_parent_iface = NULL; +static SpitPublishingServiceIface* you_tube_service_spit_publishing_service_parent_iface = NULL; +static gpointer publishing_you_tube_publishing_parameters_parent_class = NULL; +static gpointer publishing_you_tube_you_tube_publisher_parent_class = NULL; +static gpointer publishing_you_tube_you_tube_publisher_channel_directory_transaction_parent_class = NULL; +static gpointer publishing_you_tube_publishing_options_pane_parent_class = NULL; +static gpointer publishing_you_tube_publishing_options_pane_privacy_description_parent_class = NULL; +static SpitPublishingDialogPaneIface* publishing_you_tube_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = NULL; +static gpointer publishing_you_tube_upload_transaction_parent_class = NULL; +static gpointer publishing_you_tube_uploader_parent_class = NULL; + +GType you_tube_service_get_type (void) G_GNUC_CONST; +enum { + YOU_TUBE_SERVICE_DUMMY_PROPERTY +}; +#define YOU_TUBE_SERVICE_ICON_FILENAME "youtube.png" +YouTubeService* you_tube_service_new (GFile* resource_directory); +YouTubeService* you_tube_service_construct (GType object_type, GFile* resource_directory); +static gint you_tube_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +static const gchar* you_tube_service_real_get_id (SpitPluggable* base); +static const gchar* you_tube_service_real_get_pluggable_name (SpitPluggable* base); +static void you_tube_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup9 (GdkPixbuf** self, int length); +static SpitPublishingPublisher* you_tube_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host); +PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host); +PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host); +GType publishing_you_tube_you_tube_publisher_get_type (void) G_GNUC_CONST; +static SpitPublishingPublisherMediaType you_tube_service_real_get_supported_media (SpitPublishingService* base); +static void you_tube_service_real_activation (SpitPluggable* base, gboolean enabled); +static void you_tube_service_finalize (GObject* obj); +#define PUBLISHING_YOU_TUBE_SERVICE_WELCOME_MESSAGE _ ("You are not currently logged into YouTube.\n" \ +"\n" \ +"You must have already signed up for a Google account and set it up for" \ +" use with YouTube to continue. You can set up most accounts by using y" \ +"our browser to log into the YouTube site at least once.") +#define PUBLISHING_YOU_TUBE_DEVELOPER_KEY "AI39si5VEpzWK0z-pzo4fonEj9E4driCpEs9lK8y3HJsbbebIIRWqW3bIyGr42bjQv-N3s" \ +"iAfqVoM8XNmtbbp5x2gpbjiSAMTQ" +GType publishing_you_tube_privacy_setting_get_type (void) G_GNUC_CONST; +gpointer publishing_you_tube_publishing_parameters_ref (gpointer instance); +void publishing_you_tube_publishing_parameters_unref (gpointer instance); +GParamSpec* publishing_you_tube_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void publishing_you_tube_value_set_publishing_parameters (GValue* value, gpointer v_object); +void publishing_you_tube_value_take_publishing_parameters (GValue* value, gpointer v_object); +gpointer publishing_you_tube_value_get_publishing_parameters (const GValue* value); +GType publishing_you_tube_publishing_parameters_get_type (void) G_GNUC_CONST; +#define PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS, PublishingYouTubePublishingParametersPrivate)) +enum { + PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_DUMMY_PROPERTY +}; +PublishingYouTubePublishingParameters* publishing_you_tube_publishing_parameters_new (void); +PublishingYouTubePublishingParameters* publishing_you_tube_publishing_parameters_construct (GType object_type); +PublishingYouTubePrivacySetting publishing_you_tube_publishing_parameters_get_privacy (PublishingYouTubePublishingParameters* self); +void publishing_you_tube_publishing_parameters_set_privacy (PublishingYouTubePublishingParameters* self, PublishingYouTubePrivacySetting privacy); +gchar* publishing_you_tube_publishing_parameters_get_channel_name (PublishingYouTubePublishingParameters* self); +void publishing_you_tube_publishing_parameters_set_channel_name (PublishingYouTubePublishingParameters* self, const gchar* channel_name); +gchar* publishing_you_tube_publishing_parameters_get_user_name (PublishingYouTubePublishingParameters* self); +void publishing_you_tube_publishing_parameters_set_user_name (PublishingYouTubePublishingParameters* self, const gchar* user_name); +static void publishing_you_tube_publishing_parameters_finalize (PublishingYouTubePublishingParameters* obj); +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisherPrivate)) +enum { + PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_DUMMY_PROPERTY +}; +static gboolean publishing_you_tube_you_tube_publisher_real_is_running (PublishingRESTSupportGooglePublisher* base); +static void publishing_you_tube_you_tube_publisher_real_start (PublishingRESTSupportGooglePublisher* base); +static void publishing_you_tube_you_tube_publisher_do_show_service_welcome_pane (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_real_stop (PublishingRESTSupportGooglePublisher* base); +static gchar* publishing_you_tube_you_tube_publisher_extract_channel_name_helper (PublishingYouTubeYouTubePublisher* self, xmlNode* document_root, GError** error); +static void publishing_you_tube_you_tube_publisher_on_service_welcome_login (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* base); +static void publishing_you_tube_you_tube_publisher_do_fetch_account_information (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportTransaction* txn); +static void _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self); +static void publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err); +static void _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self); +static GType publishing_you_tube_you_tube_publisher_channel_directory_transaction_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static void publishing_you_tube_you_tube_publisher_do_parse_and_display_account_information (PublishingYouTubeYouTubePublisher* self, PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* transaction); +static void publishing_you_tube_you_tube_publisher_on_publishing_options_logout (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_on_publishing_options_publish (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_do_upload (PublishingYouTubeYouTubePublisher* self); +static void publishing_you_tube_you_tube_publisher_on_upload_status_updated (PublishingYouTubeYouTubePublisher* self, gint file_number, gdouble completed_fraction); +static void publishing_you_tube_you_tube_publisher_on_upload_complete (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published); +static void _publishing_you_tube_you_tube_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self); +static void publishing_you_tube_you_tube_publisher_on_upload_error (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err); +static void _publishing_you_tube_you_tube_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self); +static void publishing_you_tube_you_tube_publisher_do_show_success_pane (PublishingYouTubeYouTubePublisher* self); +static void _publishing_you_tube_you_tube_publisher_on_service_welcome_login_spit_publishing_login_callback (gpointer self); +static PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* publishing_you_tube_you_tube_publisher_channel_directory_transaction_new (PublishingRESTSupportGoogleSession* session); +static PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* publishing_you_tube_you_tube_publisher_channel_directory_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session); +static gchar* publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc); +static gchar* _publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self); +static void publishing_you_tube_you_tube_publisher_do_show_publishing_options_pane (PublishingYouTubeYouTubePublisher* self); +GType publishing_you_tube_publishing_options_pane_get_type (void) G_GNUC_CONST; +PublishingYouTubePublishingOptionsPane* publishing_you_tube_publishing_options_pane_new (SpitPublishingPluginHost* host, GtkBuilder* builder, PublishingYouTubePublishingParameters* publishing_parameters); +PublishingYouTubePublishingOptionsPane* publishing_you_tube_publishing_options_pane_construct (GType object_type, SpitPublishingPluginHost* host, GtkBuilder* builder, PublishingYouTubePublishingParameters* publishing_parameters); +static void _publishing_you_tube_you_tube_publisher_on_publishing_options_publish_publishing_you_tube_publishing_options_pane_publish (PublishingYouTubePublishingOptionsPane* _sender, gpointer self); +static void _publishing_you_tube_you_tube_publisher_on_publishing_options_logout_publishing_you_tube_publishing_options_pane_logout (PublishingYouTubePublishingOptionsPane* _sender, gpointer self); +GType publishing_you_tube_uploader_get_type (void) G_GNUC_CONST; +PublishingYouTubeUploader* publishing_you_tube_uploader_new (PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingYouTubePublishingParameters* parameters); +PublishingYouTubeUploader* publishing_you_tube_uploader_construct (GType object_type, PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingYouTubePublishingParameters* parameters); +static void _publishing_you_tube_you_tube_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self); +static void publishing_you_tube_you_tube_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* base); +enum { + PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION_ENDPOINT_URL "http://gdata.youtube.com/feeds/users/default" +static void publishing_you_tube_you_tube_publisher_finalize (GObject* obj); +static gpointer publishing_you_tube_publishing_options_pane_privacy_description_ref (gpointer instance); +static void publishing_you_tube_publishing_options_pane_privacy_description_unref (gpointer instance); +static GParamSpec* publishing_you_tube_publishing_options_pane_param_spec_privacy_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void publishing_you_tube_publishing_options_pane_value_set_privacy_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void publishing_you_tube_publishing_options_pane_value_take_privacy_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer publishing_you_tube_publishing_options_pane_value_get_privacy_description (const GValue* value) G_GNUC_UNUSED; +static GType publishing_you_tube_publishing_options_pane_privacy_description_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPanePrivate)) +enum { + PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_DUMMY_PROPERTY +}; +static PublishingYouTubePublishingOptionsPanePrivacyDescription** publishing_you_tube_publishing_options_pane_create_privacy_descriptions (PublishingYouTubePublishingOptionsPane* self, int* result_length1); +static void publishing_you_tube_publishing_options_pane_on_logout_clicked (PublishingYouTubePublishingOptionsPane* self); +static void _publishing_you_tube_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_you_tube_publishing_options_pane_on_publish_clicked (PublishingYouTubePublishingOptionsPane* self); +static void _publishing_you_tube_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void publishing_you_tube_publishing_options_pane_update_publish_button_sensitivity (PublishingYouTubePublishingOptionsPane* self); +static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_new (const gchar* description, PublishingYouTubePrivacySetting privacy_setting); +static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, PublishingYouTubePrivacySetting privacy_setting); +static void _vala_array_add31 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add32 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static void _vala_array_add33 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value); +static GtkWidget* publishing_you_tube_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base); +static SpitPublishingDialogPaneGeometryOptions publishing_you_tube_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base); +static void publishing_you_tube_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base); +static void publishing_you_tube_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base); +enum { + PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_DUMMY_PROPERTY +}; +static void publishing_you_tube_publishing_options_pane_privacy_description_finalize (PublishingYouTubePublishingOptionsPanePrivacyDescription* obj); +static void publishing_you_tube_publishing_options_pane_finalize (GObject* obj); +GType publishing_you_tube_upload_transaction_get_type (void) G_GNUC_CONST; +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransactionPrivate)) +enum { + PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_DUMMY_PROPERTY +}; +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_ENDPOINT_URL "http://uploads.gdata.youtube.com/feeds/api/users/default/uploads" +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_UNLISTED_XML "<yt:accessControl action='list' permission='denied'/>" +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_PRIVATE_XML "<yt:private/>" +#define PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_METADATA_TEMPLATE "<?xml version='1.0'?>\n" \ +" <entry xmlns='http://w" \ +"ww.w3.org/2005/Atom'\n" \ +" xmlns:media='http://se" \ +"arch.yahoo.com/mrss/'\n" \ +" xmlns:yt='http://gdata" \ +".youtube.com/schemas/2007'>\n" \ +" <media:group>\n" \ +" <media:title type=" \ +"'plain'>%s</media:title>\n" \ +" <media:category\n" \ +" scheme='http://gda" \ +"ta.youtube.com/schemas/2007/categories.cat'>People\n" \ +" </media:category>\n" \ +" %s\n" \ +" </media:group>\n" \ +" %s\n" \ +" </entry>" +PublishingYouTubeUploadTransaction* publishing_you_tube_upload_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingYouTubePublishingParameters* parameters, SpitPublishingPublishable* publishable); +PublishingYouTubeUploadTransaction* publishing_you_tube_upload_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingYouTubePublishingParameters* parameters, SpitPublishingPublishable* publishable); +static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error); +static void _vala_SoupBuffer_free (SoupBuffer* self); +static void _vala_SoupMultipart_free (SoupMultipart* self); +static void publishing_you_tube_upload_transaction_finalize (PublishingRESTSupportTransaction* obj); +#define PUBLISHING_YOU_TUBE_UPLOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploaderPrivate)) +enum { + PUBLISHING_YOU_TUBE_UPLOADER_DUMMY_PROPERTY +}; +static PublishingRESTSupportTransaction* publishing_you_tube_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable); +static void publishing_you_tube_uploader_finalize (PublishingRESTSupportBatchUploader* 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); + + +YouTubeService* you_tube_service_construct (GType object_type, GFile* resource_directory) { + YouTubeService * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (YouTubeService*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = you_tube_service_icon_pixbuf_set; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0__length1 = you_tube_service_icon_pixbuf_set_length1; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp0_ == NULL) { +#line 447 "YouTubePublishing.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" YOU_TUBE_SERVICE_ICON_FILENAME, &_tmp1_); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_icon_pixbuf_set = (_vala_array_free (you_tube_service_icon_pixbuf_set, you_tube_service_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_icon_pixbuf_set = _tmp2_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_icon_pixbuf_set_length1 = _tmp1_; +#line 14 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _you_tube_service_icon_pixbuf_set_size_ = you_tube_service_icon_pixbuf_set_length1; +#line 460 "YouTubePublishing.c" + } +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 464 "YouTubePublishing.c" +} + + +YouTubeService* you_tube_service_new (GFile* resource_directory) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return you_tube_service_construct (TYPE_YOU_TUBE_SERVICE, resource_directory); +#line 471 "YouTubePublishing.c" +} + + +static gint you_tube_service_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + YouTubeService * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = min_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = max_host_interface; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_PUBLISHING_CURRENT_INTERFACE); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp2_; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 493 "YouTubePublishing.c" +} + + +static const gchar* you_tube_service_real_get_id (SpitPluggable* base) { + YouTubeService * self; + const gchar* result = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = "org.yorba.shotwell.publishing.youtube"; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 506 "YouTubePublishing.c" +} + + +static const gchar* you_tube_service_real_get_pluggable_name (SpitPluggable* base) { + YouTubeService * self; + const gchar* result = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = "YouTube"; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 519 "YouTubePublishing.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self ? g_object_ref (self) : NULL; +#line 526 "YouTubePublishing.c" +} + + +static GdkPixbuf** _vala_array_dup9 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + for (i = 0; i < length; i++) { +#line 537 "YouTubePublishing.c" + GdkPixbuf* _tmp0_ = NULL; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result[i] = _tmp0_; +#line 543 "YouTubePublishing.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 547 "YouTubePublishing.c" +} + + +static void you_tube_service_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + YouTubeService * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (info != NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = g_strdup ("Jani Monoses, Lucas Beeler"); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).authors); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).authors = _tmp0_; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = _ ("Copyright 2016 Software Freedom Conservancy Inc."); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).copyright); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).copyright = _tmp2_; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).translators); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).translators = _tmp3_; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = g_strdup (_VERSION); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).version); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).version = _tmp4_; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).website_name); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).website_name = _tmp5_; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).website_url); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).website_url = _tmp6_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).is_license_wordwrapped = FALSE; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 ((*info).license); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).license = _tmp7_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = you_tube_service_icon_pixbuf_set; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8__length1 = you_tube_service_icon_pixbuf_set_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup9 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9__length1 = _tmp8__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).icons = _tmp9_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*info).icons_length1 = _tmp9__length1; +#line 629 "YouTubePublishing.c" +} + + +static SpitPublishingPublisher* you_tube_service_real_create_publisher (SpitPublishingService* base, SpitPublishingPluginHost* host) { + YouTubeService * self; + SpitPublishingPublisher* result = NULL; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingYouTubeYouTubePublisher* _tmp1_ = NULL; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = host; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_you_tube_you_tube_publisher_new (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_PUBLISHING_TYPE_SERVICE, SpitPublishingService), _tmp0_); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_PUBLISHING_TYPE_PUBLISHER, SpitPublishingPublisher); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 650 "YouTubePublishing.c" +} + + +static SpitPublishingPublisherMediaType you_tube_service_real_get_supported_media (SpitPublishingService* base) { + YouTubeService * self; + SpitPublishingPublisherMediaType result = 0; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = SPIT_PUBLISHING_PUBLISHER_MEDIA_TYPE_VIDEO; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 663 "YouTubePublishing.c" +} + + +static void you_tube_service_real_activation (SpitPluggable* base, gboolean enabled) { + YouTubeService * self; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 671 "YouTubePublishing.c" +} + + +static void you_tube_service_class_init (YouTubeServiceClass * klass) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (klass)->finalize = you_tube_service_finalize; +#line 680 "YouTubePublishing.c" +} + + +static void you_tube_service_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) you_tube_service_real_get_pluggable_interface; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) you_tube_service_real_get_id; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) you_tube_service_real_get_pluggable_name; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) you_tube_service_real_get_info; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) you_tube_service_real_activation; +#line 697 "YouTubePublishing.c" +} + + +static void you_tube_service_spit_publishing_service_interface_init (SpitPublishingServiceIface * iface) { +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + you_tube_service_spit_publishing_service_parent_iface = g_type_interface_peek_parent (iface); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->create_publisher = (SpitPublishingPublisher* (*)(SpitPublishingService*, SpitPublishingPluginHost*)) you_tube_service_real_create_publisher; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_supported_media = (SpitPublishingPublisherMediaType (*)(SpitPublishingService*)) you_tube_service_real_get_supported_media; +#line 708 "YouTubePublishing.c" +} + + +static void you_tube_service_instance_init (YouTubeService * self) { +} + + +static void you_tube_service_finalize (GObject* obj) { + YouTubeService * self; +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_YOU_TUBE_SERVICE, YouTubeService); +#line 7 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (you_tube_service_parent_class)->finalize (obj); +#line 722 "YouTubePublishing.c" +} + + +GType you_tube_service_get_type (void) { + static volatile gsize you_tube_service_type_id__volatile = 0; + if (g_once_init_enter (&you_tube_service_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (YouTubeServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) you_tube_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (YouTubeService), 0, (GInstanceInitFunc) you_tube_service_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) you_tube_service_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_publishing_service_info = { (GInterfaceInitFunc) you_tube_service_spit_publishing_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType you_tube_service_type_id; + you_tube_service_type_id = g_type_register_static (G_TYPE_OBJECT, "YouTubeService", &g_define_type_info, 0); + g_type_add_interface_static (you_tube_service_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (you_tube_service_type_id, SPIT_PUBLISHING_TYPE_SERVICE, &spit_publishing_service_info); + g_once_init_leave (&you_tube_service_type_id__volatile, you_tube_service_type_id); + } + return you_tube_service_type_id__volatile; +} + + +GType publishing_you_tube_privacy_setting_get_type (void) { + static volatile gsize publishing_you_tube_privacy_setting_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_privacy_setting_type_id__volatile)) { + static const GEnumValue values[] = {{PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC, "PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC", "public"}, {PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED, "PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED", "unlisted"}, {PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE, "PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE", "private"}, {0, NULL, NULL}}; + GType publishing_you_tube_privacy_setting_type_id; + publishing_you_tube_privacy_setting_type_id = g_enum_register_static ("PublishingYouTubePrivacySetting", values); + g_once_init_leave (&publishing_you_tube_privacy_setting_type_id__volatile, publishing_you_tube_privacy_setting_type_id); + } + return publishing_you_tube_privacy_setting_type_id__volatile; +} + + +PublishingYouTubePublishingParameters* publishing_you_tube_publishing_parameters_construct (GType object_type) { + PublishingYouTubePublishingParameters* self = NULL; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubePublishingParameters*) g_type_create_instance (object_type); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy = PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->channel_name); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->channel_name = NULL; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->user_name); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->user_name = NULL; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 770 "YouTubePublishing.c" +} + + +PublishingYouTubePublishingParameters* publishing_you_tube_publishing_parameters_new (void) { +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_publishing_parameters_construct (PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS); +#line 777 "YouTubePublishing.c" +} + + +PublishingYouTubePrivacySetting publishing_you_tube_publishing_parameters_get_privacy (PublishingYouTubePublishingParameters* self) { + PublishingYouTubePrivacySetting result = 0; + PublishingYouTubePrivacySetting _tmp0_ = 0; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self), 0); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->privacy; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp0_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 792 "YouTubePublishing.c" +} + + +void publishing_you_tube_publishing_parameters_set_privacy (PublishingYouTubePublishingParameters* self, PublishingYouTubePrivacySetting privacy) { + PublishingYouTubePrivacySetting _tmp0_ = 0; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self)); +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = privacy; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy = _tmp0_; +#line 804 "YouTubePublishing.c" +} + + +gchar* publishing_you_tube_publishing_parameters_get_channel_name (PublishingYouTubePublishingParameters* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->channel_name; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp1_; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 822 "YouTubePublishing.c" +} + + +void publishing_you_tube_publishing_parameters_set_channel_name (PublishingYouTubePublishingParameters* self, const gchar* channel_name) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self)); +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = channel_name; +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->channel_name); +#line 92 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->channel_name = _tmp1_; +#line 839 "YouTubePublishing.c" +} + + +gchar* publishing_you_tube_publishing_parameters_get_user_name (PublishingYouTubePublishingParameters* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 95 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self), NULL); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->user_name; +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp1_; +#line 96 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 857 "YouTubePublishing.c" +} + + +void publishing_you_tube_publishing_parameters_set_user_name (PublishingYouTubePublishingParameters* self, const gchar* user_name) { + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 99 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (self)); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = user_name; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->user_name); +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->user_name = _tmp1_; +#line 874 "YouTubePublishing.c" +} + + +static void publishing_you_tube_value_publishing_parameters_init (GValue* value) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 881 "YouTubePublishing.c" +} + + +static void publishing_you_tube_value_publishing_parameters_free_value (GValue* value) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (value->data[0].v_pointer) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_unref (value->data[0].v_pointer); +#line 890 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_value_publishing_parameters_copy_value (const GValue* src_value, GValue* dest_value) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (src_value->data[0].v_pointer) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + dest_value->data[0].v_pointer = publishing_you_tube_publishing_parameters_ref (src_value->data[0].v_pointer); +#line 900 "YouTubePublishing.c" + } else { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 904 "YouTubePublishing.c" + } +} + + +static gpointer publishing_you_tube_value_publishing_parameters_peek_pointer (const GValue* value) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return value->data[0].v_pointer; +#line 912 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_value_publishing_parameters_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (collect_values[0].v_pointer) { +#line 919 "YouTubePublishing.c" + PublishingYouTubePublishingParameters* object; + object = collect_values[0].v_pointer; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 926 "YouTubePublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 930 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = publishing_you_tube_publishing_parameters_ref (object); +#line 934 "YouTubePublishing.c" + } else { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 938 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 942 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_value_publishing_parameters_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingYouTubePublishingParameters** object_p; + object_p = collect_values[0].v_pointer; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!object_p) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 953 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!value->data[0].v_pointer) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = NULL; +#line 959 "YouTubePublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = value->data[0].v_pointer; +#line 963 "YouTubePublishing.c" + } else { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = publishing_you_tube_publishing_parameters_ref (value->data[0].v_pointer); +#line 967 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 971 "YouTubePublishing.c" +} + + +GParamSpec* publishing_you_tube_param_spec_publishing_parameters (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingYouTubeParamSpecPublishingParameters* spec; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return G_PARAM_SPEC (spec); +#line 985 "YouTubePublishing.c" +} + + +gpointer publishing_you_tube_value_get_publishing_parameters (const GValue* value) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS), NULL); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return value->data[0].v_pointer; +#line 994 "YouTubePublishing.c" +} + + +void publishing_you_tube_value_set_publishing_parameters (GValue* value, gpointer v_object) { + PublishingYouTubePublishingParameters* old; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + old = value->data[0].v_pointer; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (v_object) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = v_object; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_ref (value->data[0].v_pointer); +#line 1014 "YouTubePublishing.c" + } else { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 1018 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (old) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_unref (old); +#line 1024 "YouTubePublishing.c" + } +} + + +void publishing_you_tube_value_take_publishing_parameters (GValue* value, gpointer v_object) { + PublishingYouTubePublishingParameters* old; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + old = value->data[0].v_pointer; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (v_object) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = v_object; +#line 1043 "YouTubePublishing.c" + } else { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 1047 "YouTubePublishing.c" + } +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (old) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_unref (old); +#line 1053 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_publishing_parameters_class_init (PublishingYouTubePublishingParametersClass * klass) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_parent_class = g_type_class_peek_parent (klass); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingYouTubePublishingParametersClass *) klass)->finalize = publishing_you_tube_publishing_parameters_finalize; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingYouTubePublishingParametersPrivate)); +#line 1065 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_parameters_instance_init (PublishingYouTubePublishingParameters * self) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv = PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_GET_PRIVATE (self); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->ref_count = 1; +#line 1074 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_parameters_finalize (PublishingYouTubePublishingParameters* obj) { + PublishingYouTubePublishingParameters * self; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_PARAMETERS, PublishingYouTubePublishingParameters); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_destroy (self); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->channel_name); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->user_name); +#line 1088 "YouTubePublishing.c" +} + + +GType publishing_you_tube_publishing_parameters_get_type (void) { + static volatile gsize publishing_you_tube_publishing_parameters_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_publishing_parameters_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_you_tube_value_publishing_parameters_init, publishing_you_tube_value_publishing_parameters_free_value, publishing_you_tube_value_publishing_parameters_copy_value, publishing_you_tube_value_publishing_parameters_peek_pointer, "p", publishing_you_tube_value_publishing_parameters_collect_value, "p", publishing_you_tube_value_publishing_parameters_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubePublishingParametersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_publishing_parameters_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubePublishingParameters), 0, (GInstanceInitFunc) publishing_you_tube_publishing_parameters_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_you_tube_publishing_parameters_type_id; + publishing_you_tube_publishing_parameters_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingYouTubePublishingParameters", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_you_tube_publishing_parameters_type_id__volatile, publishing_you_tube_publishing_parameters_type_id); + } + return publishing_you_tube_publishing_parameters_type_id__volatile; +} + + +gpointer publishing_you_tube_publishing_parameters_ref (gpointer instance) { + PublishingYouTubePublishingParameters* self; + self = instance; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return instance; +#line 1113 "YouTubePublishing.c" +} + + +void publishing_you_tube_publishing_parameters_unref (gpointer instance) { + PublishingYouTubePublishingParameters* self; + self = instance; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + PUBLISHING_YOU_TUBE_PUBLISHING_PARAMETERS_GET_CLASS (self)->finalize (self); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1126 "YouTubePublishing.c" + } +} + + +PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_construct (GType object_type, SpitPublishingService* service, SpitPublishingPluginHost* host) { + PublishingYouTubeYouTubePublisher * self = NULL; + SpitPublishingService* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingYouTubePublishingParameters* _tmp4_ = NULL; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_SERVICE (service), NULL); +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = service; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = host; +#line 128 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubeYouTubePublisher*) publishing_rest_support_google_publisher_construct (object_type, _tmp0_, _tmp1_, "https://gdata.youtube.com/"); +#line 130 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->running = FALSE; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = host; +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = spit_host_interface_get_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", NULL); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 131 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->refresh_token = _tmp3_; +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_you_tube_publishing_parameters_new (); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 132 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publishing_parameters = _tmp4_; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 133 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 1180 "YouTubePublishing.c" +} + + +PublishingYouTubeYouTubePublisher* publishing_you_tube_you_tube_publisher_new (SpitPublishingService* service, SpitPublishingPluginHost* host) { +#line 127 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_you_tube_publisher_construct (PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, service, host); +#line 1187 "YouTubePublishing.c" +} + + +static gboolean publishing_you_tube_you_tube_publisher_real_is_running (PublishingRESTSupportGooglePublisher* base) { + PublishingYouTubeYouTubePublisher * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 136 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->running; +#line 137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp0_; +#line 137 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 1203 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_real_start (PublishingRESTSupportGooglePublisher* base) { + PublishingYouTubeYouTubePublisher * self; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; +#line 140 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 141 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:141: YouTubePublisher: started."); +#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 143 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp0_) { +#line 144 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1221 "YouTubePublishing.c" + } +#line 146 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->running = TRUE; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = self->priv->refresh_token; +#line 148 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp1_ == NULL) { +#line 149 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_show_service_welcome_pane (self); +#line 1231 "YouTubePublishing.c" + } else { + const gchar* _tmp2_ = NULL; +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = self->priv->refresh_token; +#line 151 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_google_publisher_start_oauth_flow (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher), _tmp2_); +#line 1238 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_you_tube_publisher_real_stop (PublishingRESTSupportGooglePublisher* base) { + PublishingYouTubeYouTubePublisher * self; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; +#line 154 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 155 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:155: YouTubePublisher: stopped."); +#line 157 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->running = FALSE; +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = _tmp0_; +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_session_stop_transactions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 159 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 1261 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_you_tube_publisher_extract_channel_name_helper (PublishingYouTubeYouTubePublisher* self, xmlNode* document_root, GError** error) { + gchar* result = NULL; + gchar* _result_ = NULL; + gchar* _tmp0_ = NULL; + xmlNode* doc_node_iter = NULL; + xmlNode* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp34_ = NULL; + GError * _inner_error_ = NULL; +#line 162 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self), NULL); +#line 164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = g_strdup (""); +#line 164 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _result_ = _tmp0_; +#line 166 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + doc_node_iter = NULL; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = document_root; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = _tmp1_->name; +#line 167 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp2_, "feed") == 0) { +#line 1288 "YouTubePublishing.c" + xmlNode* _tmp3_ = NULL; + xmlNode* _tmp4_ = NULL; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = document_root; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _tmp3_->children; +#line 168 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + doc_node_iter = _tmp4_; +#line 1297 "YouTubePublishing.c" + } else { + xmlNode* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = document_root; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _tmp5_->name; +#line 169 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp6_, "entry") == 0) { +#line 1307 "YouTubePublishing.c" + xmlNode* _tmp7_ = NULL; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = document_root; +#line 170 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + doc_node_iter = _tmp7_; +#line 1313 "YouTubePublishing.c" + } else { + GError* _tmp8_ = NULL; +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_MALFORMED_RESPONSE, "response root node isn't a <feed> or <entry>"); +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = _tmp8_; +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_propagate_error (error, _inner_error_); +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_result_); +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 1328 "YouTubePublishing.c" + } else { +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_result_); +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 172 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 1338 "YouTubePublishing.c" + } + } + } + { + gboolean _tmp9_ = FALSE; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = TRUE; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + while (TRUE) { +#line 1348 "YouTubePublishing.c" + xmlNode* _tmp12_ = NULL; + xmlNode* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + gchar* name_val = NULL; + gchar* url_val = NULL; + xmlNode* channel_node_iter = NULL; + xmlNode* _tmp15_ = NULL; + xmlNode* _tmp16_ = NULL; + const gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp9_) { +#line 1361 "YouTubePublishing.c" + xmlNode* _tmp10_ = NULL; + xmlNode* _tmp11_ = NULL; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = doc_node_iter; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = _tmp10_->next; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + doc_node_iter = _tmp11_; +#line 1370 "YouTubePublishing.c" + } +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = FALSE; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = doc_node_iter; +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!(_tmp12_ != NULL)) { +#line 175 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + break; +#line 1380 "YouTubePublishing.c" + } +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = doc_node_iter; +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = _tmp13_->name; +#line 176 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp14_, "entry") != 0) { +#line 177 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + continue; +#line 1390 "YouTubePublishing.c" + } +#line 179 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + name_val = NULL; +#line 180 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + url_val = NULL; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = doc_node_iter; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp16_ = _tmp15_->children; +#line 181 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + channel_node_iter = _tmp16_; +#line 1402 "YouTubePublishing.c" + { + gboolean _tmp17_ = FALSE; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp17_ = TRUE; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + while (TRUE) { +#line 1409 "YouTubePublishing.c" + xmlNode* _tmp20_ = NULL; + xmlNode* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp17_) { +#line 1415 "YouTubePublishing.c" + xmlNode* _tmp18_ = NULL; + xmlNode* _tmp19_ = NULL; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp18_ = channel_node_iter; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp19_ = _tmp18_->next; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + channel_node_iter = _tmp19_; +#line 1424 "YouTubePublishing.c" + } +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp17_ = FALSE; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp20_ = channel_node_iter; +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!(_tmp20_ != NULL)) { +#line 182 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + break; +#line 1434 "YouTubePublishing.c" + } +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp21_ = channel_node_iter; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp22_ = _tmp21_->name; +#line 183 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp22_, "title") == 0) { +#line 1442 "YouTubePublishing.c" + xmlNode* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp23_ = channel_node_iter; +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp24_ = (gchar*) xmlNodeGetContent (_tmp23_); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (name_val); +#line 184 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + name_val = _tmp24_; +#line 1453 "YouTubePublishing.c" + } else { + xmlNode* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp25_ = channel_node_iter; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp26_ = _tmp25_->name; +#line 185 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp26_, "id") == 0) { +#line 1463 "YouTubePublishing.c" + xmlNode* _tmp27_ = NULL; + xmlNs* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + xmlNode* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp27_ = channel_node_iter; +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp28_ = _tmp27_->ns; +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp29_ = _tmp28_->prefix; +#line 189 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp29_ != NULL) { +#line 190 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + continue; +#line 1479 "YouTubePublishing.c" + } +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp30_ = channel_node_iter; +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp31_ = (gchar*) xmlNodeGetContent (_tmp30_); +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (url_val); +#line 191 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + url_val = _tmp31_; +#line 1489 "YouTubePublishing.c" + } + } + } + } +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp32_ = name_val; +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp33_ = g_strdup (_tmp32_); +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_result_); +#line 195 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _result_ = _tmp33_; +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (url_val); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (name_val); +#line 196 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + break; +#line 1508 "YouTubePublishing.c" + } + } +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp34_ = _result_; +#line 199 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:199: YouTubePublisher: extracted channel name '" \ +"%s' from response XML.", _tmp34_); +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _result_; +#line 201 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 1519 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_service_welcome_login (PublishingYouTubeYouTubePublisher* self) { + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; +#line 204 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 205 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:205: EVENT: user clicked 'Login' in welcome pan" \ +"e."); +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 207 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp0_) { +#line 208 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1536 "YouTubePublishing.c" + } +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = self->priv->refresh_token; +#line 210 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_google_publisher_start_oauth_flow (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher), _tmp1_); +#line 1542 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_real_on_login_flow_complete (PublishingRESTSupportGooglePublisher* base) { + PublishingYouTubeYouTubePublisher * self; + SpitPublishingPluginHost* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + PublishingRESTSupportGoogleSession* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + PublishingYouTubePublishingParameters* _tmp5_ = NULL; + PublishingRESTSupportGoogleSession* _tmp6_ = NULL; + PublishingRESTSupportGoogleSession* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 213 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 214 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:214: EVENT: OAuth login flow complete."); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = _tmp1_; +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = publishing_rest_support_google_session_get_refresh_token (_tmp2_); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _tmp3_; +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_host_interface_set_config_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token", _tmp4_); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp4_); +#line 216 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp2_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = self->priv->publishing_parameters; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = _tmp6_; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = publishing_rest_support_google_session_get_user_name (_tmp7_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = _tmp8_; +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_set_user_name (_tmp5_, _tmp9_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp9_); +#line 218 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp7_); +#line 220 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_fetch_account_information (self); +#line 1596 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete_publishing_rest_support_transaction_completed (PublishingRESTSupportTransaction* _sender, gpointer self) { +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete ((PublishingYouTubeYouTubePublisher*) self, _sender); +#line 1603 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error_publishing_rest_support_transaction_network_error (PublishingRESTSupportTransaction* _sender, GError* err, gpointer self) { +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error ((PublishingYouTubeYouTubePublisher*) self, _sender, err); +#line 1610 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportTransaction* txn) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + PublishingRESTSupportTransaction* _tmp5_ = NULL; +#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 223 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (txn)); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = txn; +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 224 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = txn; +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 225 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 227 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:227: EVENT: finished fetching account and chann" \ +"el information."); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 229 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp4_) { +#line 230 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1645 "YouTubePublishing.c" + } +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = txn; +#line 232 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_parse_and_display_account_information (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION, PublishingYouTubeYouTubePublisherChannelDirectoryTransaction)); +#line 1651 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportTransaction* bad_txn, GError* err) { + PublishingRESTSupportTransaction* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportTransaction* _tmp2_ = NULL; + guint _tmp3_ = 0U; + PublishingRESTSupportTransaction* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + SpitPublishingPluginHost* _tmp8_ = NULL; + GError* _tmp9_ = NULL; +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 235 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_TRANSACTION (bad_txn)); +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = bad_txn; +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("completed", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp1_, NULL, FALSE); +#line 237 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete_publishing_rest_support_transaction_completed, self); +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = bad_txn; +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("network-error", PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, &_tmp3_, NULL, FALSE); +#line 238 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error_publishing_rest_support_transaction_network_error, self); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = bad_txn; +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = publishing_rest_support_transaction_get_response (_tmp4_); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _tmp5_; +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:240: EVENT: fetching account and channel inform" \ +"ation failed; response = '%s'.", _tmp6_); +#line 240 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp6_); +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 243 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp7_) { +#line 244 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1698 "YouTubePublishing.c" + } +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = err; +#line 246 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_post_error (_tmp8_, _tmp9_); +#line 1706 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_publishing_options_logout (PublishingYouTubeYouTubePublisher* self) { + gboolean _tmp0_ = FALSE; +#line 249 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 250 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:250: EVENT: user clicked 'Logout' in the publis" \ +"hing options pane."); +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 252 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp0_) { +#line 253 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1722 "YouTubePublishing.c" + } +#line 255 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_google_publisher_do_logout (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 1726 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_publishing_options_publish (PublishingYouTubeYouTubePublisher* self) { + gboolean _tmp0_ = FALSE; +#line 258 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 259 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:259: EVENT: user clicked 'Publish' in the publi" \ +"shing options pane."); +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 261 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp0_) { +#line 262 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1742 "YouTubePublishing.c" + } +#line 264 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_upload (self); +#line 1746 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_upload_status_updated (PublishingYouTubeYouTubePublisher* self, gint file_number, gdouble completed_fraction) { + gdouble _tmp0_ = 0.0; + SpitPublishingProgressCallback _tmp1_ = NULL; + void* _tmp1__target = NULL; + gboolean _tmp2_ = FALSE; + SpitPublishingProgressCallback _tmp3_ = NULL; + void* _tmp3__target = NULL; + gint _tmp4_ = 0; + gdouble _tmp5_ = 0.0; +#line 267 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = completed_fraction; +#line 268 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:268: EVENT: uploader reports upload %.2f percen" \ +"t complete.", 100.0 * _tmp0_); +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = self->priv->progress_reporter; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1__target = self->priv->progress_reporter_target; +#line 270 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_assert (_tmp1_ != NULL, "progress_reporter != null"); +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 272 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp2_) { +#line 273 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1777 "YouTubePublishing.c" + } +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = self->priv->progress_reporter; +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3__target = self->priv->progress_reporter_target; +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = file_number; +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = completed_fraction; +#line 275 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ (_tmp4_, _tmp5_, _tmp3__target); +#line 1789 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete (PublishingRESTSupportBatchUploader* _sender, gint num_photos_published, gpointer self) { +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_upload_complete ((PublishingYouTubeYouTubePublisher*) self, _sender, num_photos_published); +#line 1796 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error (PublishingRESTSupportBatchUploader* _sender, GError* err, gpointer self) { +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_upload_error ((PublishingYouTubeYouTubePublisher*) self, _sender, err); +#line 1803 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_upload_complete (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportBatchUploader* uploader, gint num_published) { + PublishingRESTSupportBatchUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gint _tmp4_ = 0; + gboolean _tmp5_ = FALSE; +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 278 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = uploader; +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); +#line 280 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = uploader; +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 281 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = num_published; +#line 283 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:283: EVENT: uploader reports upload complete; %" \ +"d items published.", _tmp4_); +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 285 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp5_) { +#line 286 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1840 "YouTubePublishing.c" + } +#line 288 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_show_success_pane (self); +#line 1844 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_on_upload_error (PublishingYouTubeYouTubePublisher* self, PublishingRESTSupportBatchUploader* uploader, GError* err) { + PublishingRESTSupportBatchUploader* _tmp0_ = NULL; + guint _tmp1_ = 0U; + PublishingRESTSupportBatchUploader* _tmp2_ = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GError* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 291 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_REST_SUPPORT_IS_BATCH_UPLOADER (uploader)); +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = uploader; +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("upload-complete", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp1_, NULL, FALSE); +#line 293 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self); +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = uploader; +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_parse_name ("upload-error", PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, &_tmp3_, NULL, FALSE); +#line 294 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 296 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp4_) { +#line 297 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1880 "YouTubePublishing.c" + } +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = err; +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _tmp5_->message; +#line 299 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:299: EVENT: uploader reports upload error = '%s" \ +"'.", _tmp6_); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = err; +#line 301 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 1894 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_service_welcome_login_spit_publishing_login_callback (gpointer self) { +#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_service_welcome_login ((PublishingYouTubeYouTubePublisher*) self); +#line 1901 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_show_service_welcome_pane (PublishingYouTubeYouTubePublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; +#line 304 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 305 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:305: ACTION: showing service welcome pane."); +#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 307 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_install_welcome_pane (_tmp0_, PUBLISHING_YOU_TUBE_SERVICE_WELCOME_MESSAGE, _publishing_you_tube_you_tube_publisher_on_service_welcome_login_spit_publishing_login_callback, self); +#line 1915 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_fetch_account_information (PublishingYouTubeYouTubePublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* directory_trans = NULL; + PublishingRESTSupportGoogleSession* _tmp2_ = NULL; + PublishingRESTSupportGoogleSession* _tmp3_ = NULL; + PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* _tmp4_ = NULL; + PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* _tmp5_ = NULL; + GError * _inner_error_ = NULL; +#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 311 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:311: ACTION: fetching channel information."); +#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 313 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp0_); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 314 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp1_, TRUE); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = _tmp2_; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_you_tube_you_tube_publisher_channel_directory_transaction_new (_tmp3_); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _tmp4_; +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp3_); +#line 316 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + directory_trans = _tmp5_; +#line 318 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "network-error", (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error_publishing_rest_support_transaction_network_error, self, 0); +#line 319 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), "completed", (GCallback) _publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_complete_publishing_rest_support_transaction_completed, self, 0); +#line 1956 "YouTubePublishing.c" + { +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_transaction_execute (G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 1964 "YouTubePublishing.c" + goto __catch27_spit_publishing_publishing_error; + } +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 322 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 1975 "YouTubePublishing.c" + } + } + goto __finally27; + __catch27_spit_publishing_publishing_error: + { + GError* err = NULL; + GError* _tmp6_ = NULL; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + err = _inner_error_; +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = NULL; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = err; +#line 324 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_initial_channel_fetch_error (self, G_TYPE_CHECK_INSTANCE_CAST (directory_trans, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), _tmp6_); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (err); +#line 1993 "YouTubePublishing.c" + } + __finally27: +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 321 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2006 "YouTubePublishing.c" + } +#line 310 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_transaction_unref0 (directory_trans); +#line 2010 "YouTubePublishing.c" +} + + +static gchar* _publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response (PublishingRESTSupportXmlDocument* doc, gpointer self) { + gchar* result; + result = publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml (doc); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 2019 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_parse_and_display_account_information (PublishingYouTubeYouTubePublisher* self, PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* transaction) { + PublishingRESTSupportXmlDocument* response_doc = NULL; + GError * _inner_error_ = NULL; +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_IS_CHANNEL_DIRECTORY_TRANSACTION (transaction)); +#line 329 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:329: ACTION: extracting account and channel inf" \ +"ormation from body of server response"); +#line 2032 "YouTubePublishing.c" + { + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + PublishingRESTSupportXmlDocument* _tmp4_ = NULL; + PublishingRESTSupportXmlDocument* _tmp5_ = NULL; + PublishingRESTSupportXmlDocument* _tmp6_ = NULL; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = transaction; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_transaction_get_response (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = _tmp2_; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_rest_support_xml_document_parse_string (_tmp3_, _publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml_publishing_rest_support_xml_document_check_for_error_response, NULL, &_inner_error_); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _tmp4_; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp3_); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = _tmp5_; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2059 "YouTubePublishing.c" + goto __catch28_spit_publishing_publishing_error; + } +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2070 "YouTubePublishing.c" + } +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _tmp0_; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = NULL; +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 333 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + response_doc = _tmp6_; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (_tmp0_); +#line 2082 "YouTubePublishing.c" + } + goto __finally28; + __catch28_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + GError* _tmp8_ = NULL; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + err = _inner_error_; +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = NULL; +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = err; +#line 336 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_post_error (_tmp7_, _tmp8_); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (err); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 337 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2106 "YouTubePublishing.c" + } + __finally28: +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 332 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2119 "YouTubePublishing.c" + } + { + gchar* _tmp9_ = NULL; + PublishingRESTSupportXmlDocument* _tmp10_ = NULL; + xmlNode* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + PublishingYouTubePublishingParameters* _tmp13_ = NULL; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = response_doc; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = publishing_rest_support_xml_document_get_root_node (_tmp10_); +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = publishing_you_tube_you_tube_publisher_extract_channel_name_helper (self, _tmp11_, &_inner_error_); +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = _tmp12_; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 2139 "YouTubePublishing.c" + goto __catch29_spit_publishing_publishing_error; + } +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2150 "YouTubePublishing.c" + } +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = self->priv->publishing_parameters; +#line 341 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_set_channel_name (_tmp13_, _tmp9_); +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp9_); +#line 2158 "YouTubePublishing.c" + } + goto __finally29; + __catch29_spit_publishing_publishing_error: + { + GError* err = NULL; + SpitPublishingPluginHost* _tmp14_ = NULL; + GError* _tmp15_ = NULL; +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + err = _inner_error_; +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = NULL; +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = err; +#line 344 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_post_error (_tmp14_, _tmp15_); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (err); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 345 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2182 "YouTubePublishing.c" + } + __finally29: +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 340 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2195 "YouTubePublishing.c" + } +#line 348 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_show_publishing_options_pane (self); +#line 328 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_xml_document_unref0 (response_doc); +#line 2201 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_publishing_options_publish_publishing_you_tube_publishing_options_pane_publish (PublishingYouTubePublishingOptionsPane* _sender, gpointer self) { +#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_publishing_options_publish ((PublishingYouTubeYouTubePublisher*) self); +#line 2208 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_publishing_options_logout_publishing_you_tube_publishing_options_pane_logout (PublishingYouTubePublishingOptionsPane* _sender, gpointer self) { +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_publishing_options_logout ((PublishingYouTubeYouTubePublisher*) self); +#line 2215 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_show_publishing_options_pane (PublishingYouTubeYouTubePublisher* self) { + GtkBuilder* builder = NULL; + GtkBuilder* _tmp0_ = NULL; + PublishingYouTubePublishingOptionsPane* opts_pane = NULL; + SpitPublishingPluginHost* _tmp8_ = NULL; + GtkBuilder* _tmp9_ = NULL; + PublishingYouTubePublishingParameters* _tmp10_ = NULL; + PublishingYouTubePublishingOptionsPane* _tmp11_ = NULL; + PublishingYouTubePublishingOptionsPane* _tmp12_ = NULL; + PublishingYouTubePublishingOptionsPane* _tmp13_ = NULL; + SpitPublishingPluginHost* _tmp14_ = NULL; + PublishingYouTubePublishingOptionsPane* _tmp15_ = NULL; + SpitPublishingPluginHost* _tmp16_ = NULL; + GError * _inner_error_ = NULL; +#line 351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 352 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:352: ACTION: showing publishing options pane."); +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = gtk_builder_new (); +#line 354 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + builder = _tmp0_; +#line 2241 "YouTubePublishing.c" + { + GtkBuilder* _tmp1_ = NULL; +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = builder; +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_builder_add_from_resource (_tmp1_, PLUGIN_RESOURCE_PATH "/youtube_publishing_options_pane.ui", &_inner_error_); +#line 357 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2250 "YouTubePublishing.c" + goto __catch30_g_error; + } + } + goto __finally30; + __catch30_g_error: + { + GError* e = NULL; + GError* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + SpitPublishingPluginHost* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; + GError* _tmp7_ = NULL; +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + e = _inner_error_; +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = NULL; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = e; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = _tmp2_->message; +#line 360 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_warning ("YouTubePublishing.vala:360: Could not parse UI file! Error: %s.", _tmp3_); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _ ("A file required for publishing is unavailable. Publishing to Youtube c" \ +"an't continue."); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp5_); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = _tmp6_; +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_post_error (_tmp4_, _tmp7_); +#line 361 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (_tmp7_); +#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (e); +#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (builder); +#line 364 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2292 "YouTubePublishing.c" + } + __finally30: +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (builder); +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 356 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2305 "YouTubePublishing.c" + } +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = builder; +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = self->priv->publishing_parameters; +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = publishing_you_tube_publishing_options_pane_new (_tmp8_, _tmp9_, _tmp10_); +#line 367 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + opts_pane = _tmp11_; +#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = opts_pane; +#line 369 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (_tmp12_, "publish", (GCallback) _publishing_you_tube_you_tube_publisher_on_publishing_options_publish_publishing_you_tube_publishing_options_pane_publish, self, 0); +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = opts_pane; +#line 370 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (_tmp13_, "logout", (GCallback) _publishing_you_tube_you_tube_publisher_on_publishing_options_logout_publishing_you_tube_publishing_options_pane_logout, self, 0); +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = opts_pane; +#line 371 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_install_dialog_pane (_tmp14_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SPIT_PUBLISHING_TYPE_DIALOG_PANE, SpitPublishingDialogPane), SPIT_PUBLISHING_PLUGIN_HOST_BUTTON_MODE_CANCEL); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp16_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 373 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp16_, FALSE); +#line 351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (opts_pane); +#line 351 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (builder); +#line 2339 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_you_tube_publisher_on_upload_status_updated_spit_publishing_progress_callback (gint file_number, gdouble fraction_complete, gpointer self) { +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_on_upload_status_updated ((PublishingYouTubeYouTubePublisher*) self, file_number, fraction_complete); +#line 2346 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_upload (PublishingYouTubeYouTubePublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; + void* _tmp3_ = NULL; + GDestroyNotify _tmp4_ = NULL; + SpitPublishingProgressCallback _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + SpitPublishingPublishable** publishables = NULL; + SpitPublishingPluginHost* _tmp7_ = NULL; + gint _tmp8_ = 0; + SpitPublishingPublishable** _tmp9_ = NULL; + gint publishables_length1 = 0; + gint _publishables_size_ = 0; + PublishingYouTubeUploader* uploader = NULL; + PublishingRESTSupportGoogleSession* _tmp10_ = NULL; + PublishingRESTSupportGoogleSession* _tmp11_ = NULL; + SpitPublishingPublishable** _tmp12_ = NULL; + gint _tmp12__length1 = 0; + PublishingYouTubePublishingParameters* _tmp13_ = NULL; + PublishingYouTubeUploader* _tmp14_ = NULL; + PublishingYouTubeUploader* _tmp15_ = NULL; + PublishingYouTubeUploader* _tmp16_ = NULL; + PublishingYouTubeUploader* _tmp17_ = NULL; + PublishingYouTubeUploader* _tmp18_ = NULL; +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 377 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:377: ACTION: uploading media items to remote se" \ +"rver."); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 379 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, TRUE); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 380 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_install_account_fetch_wait_pane (_tmp1_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = spit_publishing_plugin_host_serialize_publishables (_tmp2_, -1, FALSE, &_tmp3_, &_tmp4_); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter = NULL; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter = _tmp5_; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target = _tmp3_; +#line 383 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target_destroy_notify = _tmp4_; +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = publishing_rest_support_google_publisher_is_running (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 389 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!_tmp6_) { +#line 390 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 2411 "YouTubePublishing.c" + } +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = spit_publishing_plugin_host_get_publishables (_tmp7_, &_tmp8_); +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishables = _tmp9_; +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishables_length1 = _tmp8_; +#line 392 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishables_size_ = publishables_length1; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = _tmp10_; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = publishables; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12__length1 = publishables_length1; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = self->priv->publishing_parameters; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = publishing_you_tube_uploader_new (_tmp11_, _tmp12_, _tmp12__length1, _tmp13_); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = _tmp14_; +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp11_); +#line 393 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + uploader = _tmp15_; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp16_ = uploader; +#line 395 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-complete", (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_complete_publishing_rest_support_batch_uploader_upload_complete, self, 0); +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp17_ = uploader; +#line 396 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), "upload-error", (GCallback) _publishing_you_tube_you_tube_publisher_on_upload_error_publishing_rest_support_batch_uploader_upload_error, self, 0); +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp18_ = uploader; +#line 398 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_batch_uploader_upload (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader), _publishing_you_tube_you_tube_publisher_on_upload_status_updated_spit_publishing_progress_callback, self); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_batch_uploader_unref0 (uploader); +#line 376 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishables = (_vala_array_free (publishables, publishables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 2457 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_do_show_success_pane (PublishingYouTubeYouTubePublisher* self) { + SpitPublishingPluginHost* _tmp0_ = NULL; + SpitPublishingPluginHost* _tmp1_ = NULL; +#line 401 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_YOU_TUBE_PUBLISHER (self)); +#line 402 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:402: ACTION: showing success pane."); +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 404 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_set_service_locked (_tmp0_, FALSE); +#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 405 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_publishing_plugin_host_install_success_pane (_tmp1_); +#line 2476 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_real_do_logout (PublishingRESTSupportGooglePublisher* base) { + PublishingYouTubeYouTubePublisher * self; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + SpitPublishingPluginHost* _tmp2_ = NULL; +#line 408 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 409 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_debug ("YouTubePublishing.vala:409: ACTION: logging out user."); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_google_publisher_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = _tmp0_; +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_google_session_deauthenticate (_tmp1_); +#line 411 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 412 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->refresh_token = NULL; +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_google_publisher_get_host (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, PublishingRESTSupportGooglePublisher)); +#line 413 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spit_host_interface_unset_config_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SPIT_TYPE_HOST_INTERFACE, SpitHostInterface), "refresh_token"); +#line 416 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_do_show_service_welcome_pane (self); +#line 2507 "YouTubePublishing.c" +} + + +static PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* publishing_you_tube_you_tube_publisher_channel_directory_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session) { + PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = session; +#line 110 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubeYouTubePublisherChannelDirectoryTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_CHANNEL_DIRECTORY_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_GET); +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 2522 "YouTubePublishing.c" +} + + +static PublishingYouTubeYouTubePublisherChannelDirectoryTransaction* publishing_you_tube_you_tube_publisher_channel_directory_transaction_new (PublishingRESTSupportGoogleSession* session) { +#line 109 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_you_tube_publisher_channel_directory_transaction_construct (PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_TYPE_CHANNEL_DIRECTORY_TRANSACTION, session); +#line 2529 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_you_tube_publisher_channel_directory_transaction_validate_xml (PublishingRESTSupportXmlDocument* doc) { + gchar* result = NULL; + xmlNode* document_root = NULL; + PublishingRESTSupportXmlDocument* _tmp0_ = NULL; + xmlNode* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + xmlNode* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 113 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_XML_DOCUMENT (doc), NULL); +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = doc; +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_rest_support_xml_document_get_root_node (_tmp0_); +#line 114 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + document_root = _tmp1_; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = document_root; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _tmp3_->name; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp4_, "feed") == 0) { +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = TRUE; +#line 2557 "YouTubePublishing.c" + } else { + xmlNode* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = document_root; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _tmp5_->name; +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = g_strcmp0 (_tmp6_, "entry") == 0; +#line 2567 "YouTubePublishing.c" + } +#line 115 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp2_) { +#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = NULL; +#line 116 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 2575 "YouTubePublishing.c" + } else { + gchar* _tmp7_ = NULL; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = g_strdup ("response root node isn't a <feed> or <entry>"); +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp7_; +#line 118 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 2584 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_you_tube_publisher_channel_directory_transaction_class_init (PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass * klass) { +#line 105 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_channel_directory_transaction_parent_class = g_type_class_peek_parent (klass); +#line 2592 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_channel_directory_transaction_instance_init (PublishingYouTubeYouTubePublisherChannelDirectoryTransaction * self) { +} + + +static GType publishing_you_tube_you_tube_publisher_channel_directory_transaction_get_type (void) { + static volatile gsize publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubeYouTubePublisherChannelDirectoryTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_you_tube_publisher_channel_directory_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubeYouTubePublisherChannelDirectoryTransaction), 0, (GInstanceInitFunc) publishing_you_tube_you_tube_publisher_channel_directory_transaction_instance_init, NULL }; + GType publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id; + publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingYouTubeYouTubePublisherChannelDirectoryTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id__volatile, publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id); + } + return publishing_you_tube_you_tube_publisher_channel_directory_transaction_type_id__volatile; +} + + +static void publishing_you_tube_you_tube_publisher_class_init (PublishingYouTubeYouTubePublisherClass * klass) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_you_tube_publisher_parent_class = g_type_class_peek_parent (klass); +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingYouTubeYouTubePublisherPrivate)); +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->is_running = publishing_you_tube_you_tube_publisher_real_is_running; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->start = publishing_you_tube_you_tube_publisher_real_start; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->stop = publishing_you_tube_you_tube_publisher_real_stop; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->on_login_flow_complete = publishing_you_tube_you_tube_publisher_real_on_login_flow_complete; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportGooglePublisherClass *) klass)->do_logout = publishing_you_tube_you_tube_publisher_real_do_logout; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_you_tube_you_tube_publisher_finalize; +#line 2629 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_instance_init (PublishingYouTubeYouTubePublisher * self) { +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv = PUBLISHING_YOU_TUBE_YOU_TUBE_PUBLISHER_GET_PRIVATE (self); +#line 2636 "YouTubePublishing.c" +} + + +static void publishing_you_tube_you_tube_publisher_finalize (GObject* obj) { + PublishingYouTubeYouTubePublisher * self; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_TYPE_YOU_TUBE_PUBLISHER, PublishingYouTubeYouTubePublisher); +#line 123 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->priv->refresh_token); +#line 124 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (self->priv->progress_reporter_target_destroy_notify == NULL) ? NULL : (self->priv->progress_reporter_target_destroy_notify (self->priv->progress_reporter_target), NULL); +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter = NULL; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target = NULL; +#line 125 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->progress_reporter_target_destroy_notify = NULL; +#line 104 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (publishing_you_tube_you_tube_publisher_parent_class)->finalize (obj); +#line 2658 "YouTubePublishing.c" +} + + +GType publishing_you_tube_you_tube_publisher_get_type (void) { + static volatile gsize publishing_you_tube_you_tube_publisher_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_you_tube_publisher_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubeYouTubePublisherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_you_tube_publisher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubeYouTubePublisher), 0, (GInstanceInitFunc) publishing_you_tube_you_tube_publisher_instance_init, NULL }; + GType publishing_you_tube_you_tube_publisher_type_id; + publishing_you_tube_you_tube_publisher_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_PUBLISHER, "PublishingYouTubeYouTubePublisher", &g_define_type_info, 0); + g_once_init_leave (&publishing_you_tube_you_tube_publisher_type_id__volatile, publishing_you_tube_you_tube_publisher_type_id); + } + return publishing_you_tube_you_tube_publisher_type_id__volatile; +} + + +static gpointer _publishing_you_tube_publishing_parameters_ref0 (gpointer self) { +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self ? publishing_you_tube_publishing_parameters_ref (self) : NULL; +#line 2677 "YouTubePublishing.c" +} + + +static gpointer _publishing_you_tube_publishing_options_pane_privacy_description_ref0 (gpointer self) { +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self ? publishing_you_tube_publishing_options_pane_privacy_description_ref (self) : NULL; +#line 2684 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_publishing_options_pane_on_logout_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_on_logout_clicked ((PublishingYouTubePublishingOptionsPane*) self); +#line 2691 "YouTubePublishing.c" +} + + +static void _publishing_you_tube_publishing_options_pane_on_publish_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_on_publish_clicked ((PublishingYouTubePublishingOptionsPane*) self); +#line 2698 "YouTubePublishing.c" +} + + +PublishingYouTubePublishingOptionsPane* publishing_you_tube_publishing_options_pane_construct (GType object_type, SpitPublishingPluginHost* host, GtkBuilder* builder, PublishingYouTubePublishingParameters* publishing_parameters) { + PublishingYouTubePublishingOptionsPane * self = NULL; + gint _tmp0_ = 0; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp1_ = NULL; + PublishingYouTubePublishingParameters* _tmp2_ = NULL; + PublishingYouTubePublishingParameters* _tmp3_ = NULL; + GtkBuilder* _tmp4_ = NULL; + GtkBuilder* _tmp5_ = NULL; + GtkBuilder* _tmp6_ = NULL; + GtkBuilder* _tmp7_ = NULL; + GSList* _tmp8_ = NULL; + GSList* _tmp9_ = NULL; + guint _tmp10_ = 0U; + GtkBuilder* _tmp11_ = NULL; + GObject* _tmp12_ = NULL; + GtkLabel* _tmp13_ = NULL; + GtkBuilder* _tmp14_ = NULL; + GObject* _tmp15_ = NULL; + GtkComboBoxText* _tmp16_ = NULL; + GtkBuilder* _tmp17_ = NULL; + GObject* _tmp18_ = NULL; + GtkLabel* _tmp19_ = NULL; + GtkBuilder* _tmp20_ = NULL; + GObject* _tmp21_ = NULL; + GtkButton* _tmp22_ = NULL; + GtkBuilder* _tmp23_ = NULL; + GObject* _tmp24_ = NULL; + GtkButton* _tmp25_ = NULL; + GtkBuilder* _tmp26_ = NULL; + GObject* _tmp27_ = NULL; + GtkBox* _tmp28_ = NULL; + GtkBuilder* _tmp29_ = NULL; + GObject* _tmp30_ = NULL; + GtkLabel* _tmp31_ = NULL; + GtkLabel* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + PublishingYouTubePublishingParameters* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + gchar* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + GtkLabel* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + PublishingYouTubePublishingParameters* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; + gchar* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp46_ = NULL; + gint _tmp46__length1 = 0; + GtkComboBoxText* _tmp51_ = NULL; + GtkLabel* _tmp52_ = NULL; + GtkComboBoxText* _tmp53_ = NULL; + GtkButton* _tmp54_ = NULL; + GtkButton* _tmp55_ = NULL; +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PLUGIN_HOST (host), NULL); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (publishing_parameters), NULL); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubePublishingOptionsPane*) g_object_new (object_type, NULL); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishing_you_tube_publishing_options_pane_create_privacy_descriptions (self, &_tmp0_); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_descriptions = (_vala_array_free (self->priv->privacy_descriptions, self->priv->privacy_descriptions_length1, (GDestroyNotify) publishing_you_tube_publishing_options_pane_privacy_description_unref), NULL); +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_descriptions = _tmp1_; +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_descriptions_length1 = _tmp0_; +#line 447 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->_privacy_descriptions_size_ = self->priv->privacy_descriptions_length1; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_parameters; +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = _publishing_you_tube_publishing_parameters_ref0 (_tmp2_); +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 448 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publishing_parameters = _tmp3_; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = builder; +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _g_object_ref0 (_tmp4_); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 450 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->builder = _tmp5_; +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = builder; +#line 451 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_assert (_tmp6_ != NULL, "builder != null"); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = builder; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = gtk_builder_get_objects (_tmp7_); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = _tmp8_; +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = g_slist_length (_tmp9_); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_assert (_tmp10_ > ((guint) 0), "builder.get_objects().length() > 0"); +#line 452 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_slist_free0 (_tmp9_); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = self->priv->builder; +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = gtk_builder_get_object (_tmp11_, "login_identity_label"); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp12_) : NULL); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->login_identity_label); +#line 454 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->login_identity_label = _tmp13_; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = self->priv->builder; +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = gtk_builder_get_object (_tmp14_, "privacy_combo"); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, gtk_combo_box_text_get_type ()) ? ((GtkComboBoxText*) _tmp15_) : NULL); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->privacy_combo); +#line 455 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_combo = _tmp16_; +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp17_ = self->priv->builder; +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp18_ = gtk_builder_get_object (_tmp17_, "publish_to_label"); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp18_) : NULL); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publish_to_label); +#line 456 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publish_to_label = _tmp19_; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp20_ = self->priv->builder; +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp21_ = gtk_builder_get_object (_tmp20_, "publish_button"); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_button_get_type ()) ? ((GtkButton*) _tmp21_) : NULL); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 457 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publish_button = _tmp22_; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp23_ = self->priv->builder; +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp24_ = gtk_builder_get_object (_tmp23_, "logout_button"); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp25_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, gtk_button_get_type ()) ? ((GtkButton*) _tmp24_) : NULL); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 458 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->logout_button = _tmp25_; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp26_ = self->priv->builder; +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp27_ = gtk_builder_get_object (_tmp26_, "youtube_pane_widget"); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, gtk_box_get_type ()) ? ((GtkBox*) _tmp27_) : NULL); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 459 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->pane_widget = _tmp28_; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp29_ = self->priv->builder; +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp30_ = gtk_builder_get_object (_tmp29_, "privacy_label"); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp30_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp30_) : NULL); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->privacy_label); +#line 460 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_label = _tmp31_; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp32_ = self->priv->login_identity_label; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp33_ = _ ("You are logged into YouTube as %s."); +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp34_ = publishing_parameters; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp35_ = publishing_you_tube_publishing_parameters_get_user_name (_tmp34_); +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp36_ = _tmp35_; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp37_ = g_strdup_printf (_tmp33_, _tmp36_); +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp38_ = _tmp37_; +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_label_set_label (_tmp32_, _tmp38_); +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp38_); +#line 462 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp36_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp39_ = self->priv->publish_to_label; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp40_ = _ ("Videos will appear in '%s'"); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp41_ = publishing_parameters; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp42_ = publishing_you_tube_publishing_parameters_get_channel_name (_tmp41_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp43_ = _tmp42_; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp44_ = g_strdup_printf (_tmp40_, _tmp43_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp45_ = _tmp44_; +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_label_set_label (_tmp39_, _tmp45_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp45_); +#line 464 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp43_); +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp46_ = self->priv->privacy_descriptions; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp46__length1 = self->priv->privacy_descriptions_length1; +#line 2921 "YouTubePublishing.c" + { + PublishingYouTubePublishingOptionsPanePrivacyDescription** desc_collection = NULL; + gint desc_collection_length1 = 0; + gint _desc_collection_size_ = 0; + gint desc_it = 0; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + desc_collection = _tmp46_; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + desc_collection_length1 = _tmp46__length1; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + for (desc_it = 0; desc_it < _tmp46__length1; desc_it = desc_it + 1) { +#line 2933 "YouTubePublishing.c" + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp47_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription* desc = NULL; +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp47_ = _publishing_you_tube_publishing_options_pane_privacy_description_ref0 (desc_collection[desc_it]); +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + desc = _tmp47_; +#line 2940 "YouTubePublishing.c" + { + GtkComboBoxText* _tmp48_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp49_ = NULL; + const gchar* _tmp50_ = NULL; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp48_ = self->priv->privacy_combo; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp49_ = desc; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp50_ = _tmp49_->description; +#line 468 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_combo_box_text_append_text (_tmp48_, _tmp50_); +#line 467 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_options_pane_privacy_description_unref0 (desc); +#line 2955 "YouTubePublishing.c" + } + } + } +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp51_ = self->priv->privacy_combo; +#line 471 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_combo_box_get_type (), GtkComboBox), (gint) PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC); +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp52_ = self->priv->privacy_label; +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp53_ = self->priv->privacy_combo; +#line 472 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_label_set_mnemonic_widget (_tmp52_, G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_widget_get_type (), GtkWidget)); +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp54_ = self->priv->logout_button; +#line 474 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (_tmp54_, "clicked", (GCallback) _publishing_you_tube_publishing_options_pane_on_logout_clicked_gtk_button_clicked, self, 0); +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp55_ = self->priv->publish_button; +#line 475 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_connect_object (_tmp55_, "clicked", (GCallback) _publishing_you_tube_publishing_options_pane_on_publish_clicked_gtk_button_clicked, self, 0); +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 2979 "YouTubePublishing.c" +} + + +PublishingYouTubePublishingOptionsPane* publishing_you_tube_publishing_options_pane_new (SpitPublishingPluginHost* host, GtkBuilder* builder, PublishingYouTubePublishingParameters* publishing_parameters) { +#line 445 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_publishing_options_pane_construct (PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, host, builder, publishing_parameters); +#line 2986 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_on_publish_clicked (PublishingYouTubePublishingOptionsPane* self) { + PublishingYouTubePublishingParameters* _tmp0_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + GtkComboBoxText* _tmp2_ = NULL; + gint _tmp3_ = 0; + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp4_ = NULL; + PublishingYouTubePrivacySetting _tmp5_ = 0; +#line 478 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->publishing_parameters; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = self->priv->privacy_descriptions; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1__length1 = self->priv->privacy_descriptions_length1; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = self->priv->privacy_combo; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_combo_box_get_type (), GtkComboBox)); +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _tmp1_[_tmp3_]; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _tmp4_->privacy_setting; +#line 479 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_parameters_set_privacy (_tmp0_, _tmp5_); +#line 482 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_emit_by_name (self, "publish"); +#line 3018 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_on_logout_clicked (PublishingYouTubePublishingOptionsPane* self) { +#line 485 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 486 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_emit_by_name (self, "logout"); +#line 3027 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_update_publish_button_sensitivity (PublishingYouTubePublishingOptionsPane* self) { + GtkButton* _tmp0_ = NULL; +#line 489 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE (self)); +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->publish_button; +#line 490 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 3039 "YouTubePublishing.c" +} + + +static void _vala_array_add31 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if ((*length) == (*size)) { +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *array = g_renew (PublishingYouTubePublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 3050 "YouTubePublishing.c" + } +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[(*length)++] = value; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[*length] = NULL; +#line 3056 "YouTubePublishing.c" +} + + +static void _vala_array_add32 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if ((*length) == (*size)) { +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *array = g_renew (PublishingYouTubePublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 3067 "YouTubePublishing.c" + } +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[(*length)++] = value; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[*length] = NULL; +#line 3073 "YouTubePublishing.c" +} + + +static void _vala_array_add33 (PublishingYouTubePublishingOptionsPanePrivacyDescription*** array, int* length, int* size, PublishingYouTubePublishingOptionsPanePrivacyDescription* value) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if ((*length) == (*size)) { +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *array = g_renew (PublishingYouTubePublishingOptionsPanePrivacyDescription*, *array, (*size) + 1); +#line 3084 "YouTubePublishing.c" + } +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[(*length)++] = value; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + (*array)[*length] = NULL; +#line 3090 "YouTubePublishing.c" +} + + +static PublishingYouTubePublishingOptionsPanePrivacyDescription** publishing_you_tube_publishing_options_pane_create_privacy_descriptions (PublishingYouTubePublishingOptionsPane* self, int* result_length1) { + PublishingYouTubePublishingOptionsPanePrivacyDescription** result = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _result_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp3_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp6_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription* _tmp9_ = NULL; + PublishingYouTubePublishingOptionsPanePrivacyDescription** _tmp10_ = NULL; + gint _tmp10__length1 = 0; +#line 493 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_OPTIONS_PANE (self), NULL); +#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = g_new0 (PublishingYouTubePublishingOptionsPanePrivacyDescription*, 0 + 1); +#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _result_ = _tmp0_; +#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _result__length1 = 0; +#line 494 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __result__size_ = _result__length1; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = _result_; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1__length1 = _result__length1; +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = _ ("Public listed"); +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_tmp2_, PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PUBLIC); +#line 496 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_array_add31 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _result_; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4__length1 = _result__length1; +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = _ ("Public unlisted"); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_tmp5_, PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED); +#line 497 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_array_add32 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = _result_; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7__length1 = _result__length1; +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = _ ("Private"); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = publishing_you_tube_publishing_options_pane_privacy_description_new (_tmp8_, PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE); +#line 498 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_array_add33 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = _result_; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10__length1 = _result__length1; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (result_length1) { +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *result_length1 = _tmp10__length1; +#line 3162 "YouTubePublishing.c" + } +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp10_; +#line 500 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 3168 "YouTubePublishing.c" +} + + +static GtkWidget* publishing_you_tube_publishing_options_pane_real_get_widget (SpitPublishingDialogPane* base) { + PublishingYouTubePublishingOptionsPane * self; + GtkWidget* result = NULL; + GtkBox* _tmp0_ = NULL; + GtkBox* _tmp1_ = NULL; + GtkWidget* _tmp2_ = NULL; +#line 503 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane); +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = self->priv->pane_widget; +#line 504 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_assert (_tmp0_ != NULL, "pane_widget != null"); +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = self->priv->pane_widget; +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget)); +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp2_; +#line 505 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 3192 "YouTubePublishing.c" +} + + +static SpitPublishingDialogPaneGeometryOptions publishing_you_tube_publishing_options_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) { + PublishingYouTubePublishingOptionsPane * self; + SpitPublishingDialogPaneGeometryOptions result = 0; +#line 508 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane); +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE; +#line 509 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 3205 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_real_on_pane_installed (SpitPublishingDialogPane* base) { + PublishingYouTubePublishingOptionsPane * self; +#line 512 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane); +#line 513 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_update_publish_button_sensitivity (self); +#line 3215 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) { + PublishingYouTubePublishingOptionsPane * self; +#line 516 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane); +#line 3223 "YouTubePublishing.c" +} + + +static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_construct (GType object_type, const gchar* description, PublishingYouTubePrivacySetting privacy_setting) { + PublishingYouTubePublishingOptionsPanePrivacyDescription* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + PublishingYouTubePrivacySetting _tmp2_ = 0; +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (description != NULL, NULL); +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubePublishingOptionsPanePrivacyDescription*) g_type_create_instance (object_type); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = description; +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->description); +#line 426 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->description = _tmp1_; +#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = privacy_setting; +#line 427 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->privacy_setting = _tmp2_; +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 3250 "YouTubePublishing.c" +} + + +static PublishingYouTubePublishingOptionsPanePrivacyDescription* publishing_you_tube_publishing_options_pane_privacy_description_new (const gchar* description, PublishingYouTubePrivacySetting privacy_setting) { +#line 425 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_publishing_options_pane_privacy_description_construct (PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, description, privacy_setting); +#line 3257 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_value_privacy_description_init (GValue* value) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 3264 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_value_privacy_description_free_value (GValue* value) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (value->data[0].v_pointer) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_privacy_description_unref (value->data[0].v_pointer); +#line 3273 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_publishing_options_pane_value_privacy_description_copy_value (const GValue* src_value, GValue* dest_value) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (src_value->data[0].v_pointer) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + dest_value->data[0].v_pointer = publishing_you_tube_publishing_options_pane_privacy_description_ref (src_value->data[0].v_pointer); +#line 3283 "YouTubePublishing.c" + } else { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + dest_value->data[0].v_pointer = NULL; +#line 3287 "YouTubePublishing.c" + } +} + + +static gpointer publishing_you_tube_publishing_options_pane_value_privacy_description_peek_pointer (const GValue* value) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return value->data[0].v_pointer; +#line 3295 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_publishing_options_pane_value_privacy_description_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (collect_values[0].v_pointer) { +#line 3302 "YouTubePublishing.c" + PublishingYouTubePublishingOptionsPanePrivacyDescription* object; + object = collect_values[0].v_pointer; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (object->parent_instance.g_class == NULL) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 3309 "YouTubePublishing.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 3313 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = publishing_you_tube_publishing_options_pane_privacy_description_ref (object); +#line 3317 "YouTubePublishing.c" + } else { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 3321 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 3325 "YouTubePublishing.c" +} + + +static gchar* publishing_you_tube_publishing_options_pane_value_privacy_description_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + PublishingYouTubePublishingOptionsPanePrivacyDescription** object_p; + object_p = collect_values[0].v_pointer; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!object_p) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 3336 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (!value->data[0].v_pointer) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = NULL; +#line 3342 "YouTubePublishing.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = value->data[0].v_pointer; +#line 3346 "YouTubePublishing.c" + } else { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + *object_p = publishing_you_tube_publishing_options_pane_privacy_description_ref (value->data[0].v_pointer); +#line 3350 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return NULL; +#line 3354 "YouTubePublishing.c" +} + + +static GParamSpec* publishing_you_tube_publishing_options_pane_param_spec_privacy_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + PublishingYouTubePublishingOptionsPaneParamSpecPrivacyDescription* spec; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (g_type_is_a (object_type, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION), NULL); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return G_PARAM_SPEC (spec); +#line 3368 "YouTubePublishing.c" +} + + +static gpointer publishing_you_tube_publishing_options_pane_value_get_privacy_description (const GValue* value) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION), NULL); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return value->data[0].v_pointer; +#line 3377 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_value_set_privacy_description (GValue* value, gpointer v_object) { + PublishingYouTubePublishingOptionsPanePrivacyDescription* old; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + old = value->data[0].v_pointer; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (v_object) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = v_object; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_privacy_description_ref (value->data[0].v_pointer); +#line 3397 "YouTubePublishing.c" + } else { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 3401 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (old) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_privacy_description_unref (old); +#line 3407 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_publishing_options_pane_value_take_privacy_description (GValue* value, gpointer v_object) { + PublishingYouTubePublishingOptionsPanePrivacyDescription* old; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + old = value->data[0].v_pointer; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (v_object) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION)); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = v_object; +#line 3426 "YouTubePublishing.c" + } else { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + value->data[0].v_pointer = NULL; +#line 3430 "YouTubePublishing.c" + } +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (old) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_privacy_description_unref (old); +#line 3436 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_publishing_options_pane_privacy_description_class_init (PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass * klass) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_privacy_description_parent_class = g_type_class_peek_parent (klass); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass *) klass)->finalize = publishing_you_tube_publishing_options_pane_privacy_description_finalize; +#line 3446 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_privacy_description_instance_init (PublishingYouTubePublishingOptionsPanePrivacyDescription * self) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->ref_count = 1; +#line 3453 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_privacy_description_finalize (PublishingYouTubePublishingOptionsPanePrivacyDescription* obj) { + PublishingYouTubePublishingOptionsPanePrivacyDescription * self; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_TYPE_PRIVACY_DESCRIPTION, PublishingYouTubePublishingOptionsPanePrivacyDescription); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_handlers_destroy (self); +#line 422 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (self->description); +#line 3465 "YouTubePublishing.c" +} + + +static GType publishing_you_tube_publishing_options_pane_privacy_description_get_type (void) { + static volatile gsize publishing_you_tube_publishing_options_pane_privacy_description_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_publishing_options_pane_privacy_description_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { publishing_you_tube_publishing_options_pane_value_privacy_description_init, publishing_you_tube_publishing_options_pane_value_privacy_description_free_value, publishing_you_tube_publishing_options_pane_value_privacy_description_copy_value, publishing_you_tube_publishing_options_pane_value_privacy_description_peek_pointer, "p", publishing_you_tube_publishing_options_pane_value_privacy_description_collect_value, "p", publishing_you_tube_publishing_options_pane_value_privacy_description_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubePublishingOptionsPanePrivacyDescriptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_publishing_options_pane_privacy_description_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubePublishingOptionsPanePrivacyDescription), 0, (GInstanceInitFunc) publishing_you_tube_publishing_options_pane_privacy_description_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_you_tube_publishing_options_pane_privacy_description_type_id; + publishing_you_tube_publishing_options_pane_privacy_description_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PublishingYouTubePublishingOptionsPanePrivacyDescription", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&publishing_you_tube_publishing_options_pane_privacy_description_type_id__volatile, publishing_you_tube_publishing_options_pane_privacy_description_type_id); + } + return publishing_you_tube_publishing_options_pane_privacy_description_type_id__volatile; +} + + +static gpointer publishing_you_tube_publishing_options_pane_privacy_description_ref (gpointer instance) { + PublishingYouTubePublishingOptionsPanePrivacyDescription* self; + self = instance; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_atomic_int_inc (&self->ref_count); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return instance; +#line 3490 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_privacy_description_unref (gpointer instance) { + PublishingYouTubePublishingOptionsPanePrivacyDescription* self; + self = instance; +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_PRIVACY_DESCRIPTION_GET_CLASS (self)->finalize (self); +#line 421 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 3503 "YouTubePublishing.c" + } +} + + +static void publishing_you_tube_publishing_options_pane_class_init (PublishingYouTubePublishingOptionsPaneClass * klass) { +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_parent_class = g_type_class_peek_parent (klass); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingYouTubePublishingOptionsPanePrivate)); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (klass)->finalize = publishing_you_tube_publishing_options_pane_finalize; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_new ("publish", PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_signal_new ("logout", PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 3519 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) { +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_publishing_options_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) publishing_you_tube_publishing_options_pane_real_get_widget; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) publishing_you_tube_publishing_options_pane_real_get_preferred_geometry; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) publishing_you_tube_publishing_options_pane_real_on_pane_installed; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) publishing_you_tube_publishing_options_pane_real_on_pane_uninstalled; +#line 3534 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_instance_init (PublishingYouTubePublishingOptionsPane * self) { +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv = PUBLISHING_YOU_TUBE_PUBLISHING_OPTIONS_PANE_GET_PRIVATE (self); +#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->pane_widget = NULL; +#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_combo = NULL; +#line 436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publish_to_label = NULL; +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->login_identity_label = NULL; +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publish_button = NULL; +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->logout_button = NULL; +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->builder = NULL; +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_label = NULL; +#line 3557 "YouTubePublishing.c" +} + + +static void publishing_you_tube_publishing_options_pane_finalize (GObject* obj) { + PublishingYouTubePublishingOptionsPane * self; +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_TYPE_PUBLISHING_OPTIONS_PANE, PublishingYouTubePublishingOptionsPane); +#line 434 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->pane_widget); +#line 435 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->privacy_combo); +#line 436 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publish_to_label); +#line 437 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->login_identity_label); +#line 438 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publish_button); +#line 439 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->logout_button); +#line 440 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->builder); +#line 441 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->privacy_label); +#line 442 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->privacy_descriptions = (_vala_array_free (self->priv->privacy_descriptions, self->priv->privacy_descriptions_length1, (GDestroyNotify) publishing_you_tube_publishing_options_pane_privacy_description_unref), NULL); +#line 443 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->publishing_parameters); +#line 420 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + G_OBJECT_CLASS (publishing_you_tube_publishing_options_pane_parent_class)->finalize (obj); +#line 3587 "YouTubePublishing.c" +} + + +GType publishing_you_tube_publishing_options_pane_get_type (void) { + static volatile gsize publishing_you_tube_publishing_options_pane_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_publishing_options_pane_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubePublishingOptionsPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_publishing_options_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubePublishingOptionsPane), 0, (GInstanceInitFunc) publishing_you_tube_publishing_options_pane_instance_init, NULL }; + static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) publishing_you_tube_publishing_options_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType publishing_you_tube_publishing_options_pane_type_id; + publishing_you_tube_publishing_options_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "PublishingYouTubePublishingOptionsPane", &g_define_type_info, 0); + g_type_add_interface_static (publishing_you_tube_publishing_options_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info); + g_once_init_leave (&publishing_you_tube_publishing_options_pane_type_id__volatile, publishing_you_tube_publishing_options_pane_type_id); + } + return publishing_you_tube_publishing_options_pane_type_id__volatile; +} + + +static gpointer _publishing_rest_support_session_ref0 (gpointer self) { +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self ? publishing_rest_support_session_ref (self) : NULL; +#line 3608 "YouTubePublishing.c" +} + + +PublishingYouTubeUploadTransaction* publishing_you_tube_upload_transaction_construct (GType object_type, PublishingRESTSupportGoogleSession* session, PublishingYouTubePublishingParameters* parameters, SpitPublishingPublishable* publishable) { + PublishingYouTubeUploadTransaction* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + PublishingRESTSupportGoogleSession* _tmp3_ = NULL; + PublishingRESTSupportGoogleSession* _tmp4_ = NULL; + PublishingYouTubePublishingParameters* _tmp5_ = NULL; + PublishingYouTubePublishingParameters* _tmp6_ = NULL; + SpitPublishingPublishable* _tmp7_ = NULL; + SpitPublishingPublishable* _tmp8_ = NULL; +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = session; +#line 543 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubeUploadTransaction*) publishing_rest_support_google_publisher_authenticated_transaction_construct (object_type, _tmp0_, PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_ENDPOINT_URL, PUBLISHING_REST_SUPPORT_HTTP_METHOD_POST); +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = session; +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = publishing_rest_support_session_is_authenticated (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession)); +#line 544 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _vala_assert (_tmp2_, "session.is_authenticated()"); +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = session; +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _publishing_rest_support_session_ref0 (_tmp3_); +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 545 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->session = _tmp4_; +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = parameters; +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = _publishing_you_tube_publishing_parameters_ref0 (_tmp5_); +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->parameters); +#line 546 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->parameters = _tmp6_; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishable; +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = _g_object_ref0 (_tmp7_); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 547 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->publishable = _tmp8_; +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 3665 "YouTubePublishing.c" +} + + +PublishingYouTubeUploadTransaction* publishing_you_tube_upload_transaction_new (PublishingRESTSupportGoogleSession* session, PublishingYouTubePublishingParameters* parameters, SpitPublishingPublishable* publishable) { +#line 541 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_upload_transaction_construct (PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, session, parameters, publishable); +#line 3672 "YouTubePublishing.c" +} + + +static guint8* string_get_data (const gchar* self, int* result_length1) { + guint8* result; + guint8* res = NULL; + gint res_length1 = 0; + gint _res_size_ = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + guint8* _tmp3_ = NULL; + gint _tmp3__length1 = 0; + guint8* _tmp4_ = NULL; + gint _tmp4__length1 = 0; +#line 1398 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res = (guint8*) self; +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res_length1 = -1; +#line 1399 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _res_size_ = res_length1; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + res_length1 = (gint) _tmp1_; +#line 1400 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = res_length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = res; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3__length1 = res_length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4__length1 = _tmp3__length1; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (result_length1) { +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + *result_length1 = _tmp4__length1; +#line 3716 "YouTubePublishing.c" + } +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1401 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 3722 "YouTubePublishing.c" +} + + +static void _vala_SoupBuffer_free (SoupBuffer* self) { +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_boxed_free (soup_buffer_get_type (), self); +#line 3729 "YouTubePublishing.c" +} + + +static void _vala_SoupMultipart_free (SoupMultipart* self) { +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_boxed_free (soup_multipart_get_type (), self); +#line 3736 "YouTubePublishing.c" +} + + +static void publishing_you_tube_upload_transaction_real_execute (PublishingRESTSupportTransaction* base, GError** error) { + PublishingYouTubeUploadTransaction * self; + SoupMultipart* message_parts = NULL; + SoupMultipart* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PublishingYouTubePublishingParameters* _tmp2_ = NULL; + PublishingYouTubePrivacySetting _tmp3_ = 0; + gchar* unlisted_video = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + PublishingYouTubePublishingParameters* _tmp6_ = NULL; + PublishingYouTubePrivacySetting _tmp7_ = 0; + gchar* private_video = NULL; + gchar* _tmp8_ = NULL; + gchar* title = NULL; + SpitPublishingPublishable* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + gchar* metadata = NULL; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + SoupBuffer* metadata_buffer = NULL; + const gchar* _tmp21_ = NULL; + guint8* _tmp22_ = NULL; + gint _tmp22__length1 = 0; + guint8* _tmp23_ = NULL; + gint _tmp23__length1 = 0; + SoupBuffer* _tmp24_ = NULL; + SoupMultipart* _tmp25_ = NULL; + SoupBuffer* _tmp26_ = NULL; + gchar* video_data = NULL; + gsize data_length = 0UL; + SoupBuffer* bindable_data = NULL; + const gchar* _tmp46_ = NULL; + guint8* _tmp47_ = NULL; + gint _tmp47__length1 = 0; + guint8* _tmp48_ = NULL; + gint _tmp48__length1 = 0; + gsize _tmp49_ = 0UL; + SoupBuffer* _tmp50_ = NULL; + SoupMultipart* _tmp51_ = NULL; + SpitPublishingPublishable* _tmp52_ = NULL; + GFile* _tmp53_ = NULL; + GFile* _tmp54_ = NULL; + gchar* _tmp55_ = NULL; + gchar* _tmp56_ = NULL; + SoupMessage* outbound_message = NULL; + gchar* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + SoupMultipart* _tmp59_ = NULL; + SoupMessage* _tmp60_ = NULL; + SoupMessage* _tmp61_ = NULL; + SoupMessageHeaders* _tmp62_ = NULL; + gchar* _tmp63_ = NULL; + gchar* _tmp64_ = NULL; + SoupMessageHeaders* _tmp65_ = NULL; + SpitPublishingPublishable* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; + gchar* _tmp68_ = NULL; + SoupMessageHeaders* _tmp69_ = NULL; + PublishingRESTSupportGoogleSession* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; + gchar* _tmp73_ = NULL; + gchar* _tmp74_ = NULL; + GError * _inner_error_ = NULL; +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransaction); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = soup_multipart_new ("multipart/related"); +#line 552 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + message_parts = _tmp0_; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = self->priv->parameters; +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = publishing_you_tube_publishing_parameters_get_privacy (_tmp2_); +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp3_ == PUBLISHING_YOU_TUBE_PRIVACY_SETTING_UNLISTED) { +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_UNLISTED_XML; +#line 3825 "YouTubePublishing.c" + } else { +#line 555 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = ""; +#line 3829 "YouTubePublishing.c" + } +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = g_strdup (_tmp1_); +#line 554 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + unlisted_video = _tmp4_; +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = self->priv->parameters; +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp7_ = publishing_you_tube_publishing_parameters_get_privacy (_tmp6_); +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_tmp7_ == PUBLISHING_YOU_TUBE_PRIVACY_SETTING_PRIVATE) { +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_PRIVATE_XML; +#line 3843 "YouTubePublishing.c" + } else { +#line 558 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = ""; +#line 3847 "YouTubePublishing.c" + } +#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp8_ = g_strdup (_tmp5_); +#line 557 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + private_video = _tmp8_; +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp9_ = self->priv->publishable; +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp10_ = spit_publishing_publishable_get_publishing_name (_tmp9_); +#line 561 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + title = _tmp10_; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp11_ = title; +#line 562 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (g_strcmp0 (_tmp11_, "") == 0) { +#line 3863 "YouTubePublishing.c" + SpitPublishingPublishable* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp12_ = self->priv->publishable; +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp13_ = spit_publishing_publishable_get_param_string (_tmp12_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 563 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + title = _tmp13_; +#line 3874 "YouTubePublishing.c" + } +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp14_ = title; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp15_ = publishing_rest_support_decimal_entity_encode (_tmp14_); +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp16_ = _tmp15_; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp17_ = private_video; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp18_ = unlisted_video; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp19_ = g_strdup_printf (PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_METADATA_TEMPLATE, _tmp16_, _tmp17_, _tmp18_); +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp20_ = _tmp19_; +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp16_); +#line 566 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + metadata = _tmp20_; +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp21_ = metadata; +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp22_ = string_get_data (_tmp21_, &_tmp22__length1); +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp23_ = _tmp22_; +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp23__length1 = _tmp22__length1; +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp24_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp23_, _tmp23__length1); +#line 568 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + metadata_buffer = _tmp24_; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp25_ = message_parts; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp26_ = metadata_buffer; +#line 569 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + soup_multipart_append_form_file (_tmp25_, "", "", "application/atom+xml", _tmp26_); +#line 3912 "YouTubePublishing.c" + { + SpitPublishingPublishable* _tmp27_ = NULL; + GFile* _tmp28_ = NULL; + GFile* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + gchar* _tmp32_ = NULL; + gsize _tmp33_ = 0UL; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp27_ = self->priv->publishable; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp28_ = spit_publishing_publishable_get_serialized_file (_tmp27_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp29_ = _tmp28_; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp30_ = g_file_get_path (_tmp29_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp31_ = _tmp30_; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_file_get_contents (_tmp31_, &_tmp32_, &_tmp33_, &_inner_error_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + video_data = _tmp32_; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + data_length = _tmp33_; +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp31_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (_tmp29_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == G_FILE_ERROR) { +#line 3947 "YouTubePublishing.c" + goto __catch31_g_file_error; + } +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 575 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 3970 "YouTubePublishing.c" + } + } + goto __finally31; + __catch31_g_file_error: + { + GError* e = NULL; + gchar* msg = NULL; + SpitPublishingPublishable* _tmp34_ = NULL; + GFile* _tmp35_ = NULL; + GFile* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + GError* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; + const gchar* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + GError* _tmp45_ = NULL; +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + e = _inner_error_; +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = NULL; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp34_ = self->priv->publishable; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp35_ = spit_publishing_publishable_get_serialized_file (_tmp34_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp36_ = _tmp35_; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp37_ = g_file_get_path (_tmp36_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp38_ = _tmp37_; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp39_ = e; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp40_ = _tmp39_->message; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp41_ = g_strdup_printf ("YouTube: couldn't read data from %s: %s", _tmp38_, _tmp40_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp42_ = _tmp41_; +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp38_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (_tmp36_); +#line 578 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + msg = _tmp42_; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp43_ = msg; +#line 580 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_warning ("YouTubePublishing.vala:580: %s", _tmp43_); +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp44_ = msg; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp45_ = g_error_new_literal (SPIT_PUBLISHING_PUBLISHING_ERROR, SPIT_PUBLISHING_PUBLISHING_ERROR_LOCAL_FILE_ERROR, _tmp44_); +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _inner_error_ = _tmp45_; +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (msg); +#line 582 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_error_free0 (e); +#line 4032 "YouTubePublishing.c" + goto __finally31; + } + __finally31: +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_propagate_error (error, _inner_error_); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 4058 "YouTubePublishing.c" + } else { +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.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 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 574 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 4080 "YouTubePublishing.c" + } + } +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp46_ = video_data; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp47_ = string_get_data (_tmp46_, &_tmp47__length1); +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp48_ = _tmp47_; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp48__length1 = _tmp47__length1; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp49_ = data_length; +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp50_ = soup_buffer_new (SOUP_MEMORY_COPY, _tmp48_ + 0, ((gint) _tmp49_) - 0); +#line 588 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + bindable_data = _tmp50_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp51_ = message_parts; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp52_ = self->priv->publishable; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp53_ = spit_publishing_publishable_get_serialized_file (_tmp52_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp54_ = _tmp53_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp55_ = g_file_get_path (_tmp54_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp56_ = _tmp55_; +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + soup_multipart_append_form_file (_tmp51_, "", _tmp56_, "video/mpeg", bindable_data); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp56_); +#line 591 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (_tmp54_); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp57_ = publishing_rest_support_transaction_get_endpoint_url (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction)); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp58_ = _tmp57_; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp59_ = message_parts; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp60_ = soup_form_request_new_from_multipart (_tmp58_, _tmp59_); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp61_ = _tmp60_; +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp58_); +#line 595 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + outbound_message = _tmp61_; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp62_ = outbound_message->request_headers; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp63_ = g_strdup_printf ("key=%s", PUBLISHING_YOU_TUBE_DEVELOPER_KEY); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp64_ = _tmp63_; +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + soup_message_headers_append (_tmp62_, "X-GData-Key", _tmp64_); +#line 597 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp64_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp65_ = outbound_message->request_headers; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp66_ = self->priv->publishable; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp67_ = spit_publishing_publishable_get_param_string (_tmp66_, SPIT_PUBLISHING_PUBLISHABLE_PARAM_STRING_BASENAME); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp68_ = _tmp67_; +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + soup_message_headers_append (_tmp65_, "Slug", _tmp68_); +#line 598 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp68_); +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp69_ = outbound_message->request_headers; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp70_ = self->priv->session; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp71_ = publishing_rest_support_google_session_get_access_token (_tmp70_); +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp72_ = _tmp71_; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp73_ = g_strconcat ("Bearer ", _tmp72_, NULL); +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp74_ = _tmp73_; +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + soup_message_headers_append (_tmp69_, "Authorization", _tmp74_); +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp74_); +#line 600 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (_tmp72_); +#line 602 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_transaction_set_message (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), outbound_message); +#line 605 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_transaction_set_is_executed (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), TRUE); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_rest_support_transaction_send (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction), &_inner_error_); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + if (_inner_error_->domain == SPIT_PUBLISHING_PUBLISHING_ERROR) { +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_propagate_error (error, _inner_error_); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (outbound_message); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 4201 "YouTubePublishing.c" + } else { +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (outbound_message); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_clear_error (&_inner_error_); +#line 606 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return; +#line 4227 "YouTubePublishing.c" + } + } +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (outbound_message); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (bindable_data); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (video_data); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupBuffer_free0 (metadata_buffer); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (metadata); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (title); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (private_video); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_free0 (unlisted_video); +#line 550 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + __vala_SoupMultipart_free0 (message_parts); +#line 4248 "YouTubePublishing.c" +} + + +static void publishing_you_tube_upload_transaction_class_init (PublishingYouTubeUploadTransactionClass * klass) { +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_upload_transaction_parent_class = g_type_class_peek_parent (klass); +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->finalize = publishing_you_tube_upload_transaction_finalize; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingYouTubeUploadTransactionPrivate)); +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportTransactionClass *) klass)->execute = publishing_you_tube_upload_transaction_real_execute; +#line 4261 "YouTubePublishing.c" +} + + +static void publishing_you_tube_upload_transaction_instance_init (PublishingYouTubeUploadTransaction * self) { +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv = PUBLISHING_YOU_TUBE_UPLOAD_TRANSACTION_GET_PRIVATE (self); +#line 4268 "YouTubePublishing.c" +} + + +static void publishing_you_tube_upload_transaction_finalize (PublishingRESTSupportTransaction* obj) { + PublishingYouTubeUploadTransaction * self; +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_TYPE_UPLOAD_TRANSACTION, PublishingYouTubeUploadTransaction); +#line 537 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->parameters); +#line 538 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (self->priv->session); +#line 539 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (self->priv->publishable); +#line 520 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + PUBLISHING_REST_SUPPORT_TRANSACTION_CLASS (publishing_you_tube_upload_transaction_parent_class)->finalize (obj); +#line 4284 "YouTubePublishing.c" +} + + +GType publishing_you_tube_upload_transaction_get_type (void) { + static volatile gsize publishing_you_tube_upload_transaction_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_upload_transaction_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubeUploadTransactionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_upload_transaction_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubeUploadTransaction), 0, (GInstanceInitFunc) publishing_you_tube_upload_transaction_instance_init, NULL }; + GType publishing_you_tube_upload_transaction_type_id; + publishing_you_tube_upload_transaction_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_GOOGLE_PUBLISHER_TYPE_AUTHENTICATED_TRANSACTION, "PublishingYouTubeUploadTransaction", &g_define_type_info, 0); + g_once_init_leave (&publishing_you_tube_upload_transaction_type_id__volatile, publishing_you_tube_upload_transaction_type_id); + } + return publishing_you_tube_upload_transaction_type_id__volatile; +} + + +PublishingYouTubeUploader* publishing_you_tube_uploader_construct (GType object_type, PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingYouTubePublishingParameters* parameters) { + PublishingYouTubeUploader* self = NULL; + PublishingRESTSupportGoogleSession* _tmp0_ = NULL; + SpitPublishingPublishable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + PublishingYouTubePublishingParameters* _tmp2_ = NULL; + PublishingYouTubePublishingParameters* _tmp3_ = NULL; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_REST_SUPPORT_IS_GOOGLE_SESSION (session), NULL); +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (PUBLISHING_YOU_TUBE_IS_PUBLISHING_PARAMETERS (parameters), NULL); +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = session; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = publishables; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1__length1 = publishables_length1; +#line 615 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = (PublishingYouTubeUploader*) publishing_rest_support_batch_uploader_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_SESSION, PublishingRESTSupportSession), _tmp1_, _tmp1__length1); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = parameters; +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = _publishing_you_tube_publishing_parameters_ref0 (_tmp2_); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->parameters); +#line 617 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv->parameters = _tmp3_; +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return self; +#line 4329 "YouTubePublishing.c" +} + + +PublishingYouTubeUploader* publishing_you_tube_uploader_new (PublishingRESTSupportGoogleSession* session, SpitPublishingPublishable** publishables, int publishables_length1, PublishingYouTubePublishingParameters* parameters) { +#line 613 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return publishing_you_tube_uploader_construct (PUBLISHING_YOU_TUBE_TYPE_UPLOADER, session, publishables, publishables_length1, parameters); +#line 4336 "YouTubePublishing.c" +} + + +static PublishingRESTSupportTransaction* publishing_you_tube_uploader_real_create_transaction (PublishingRESTSupportBatchUploader* base, SpitPublishingPublishable* publishable) { + PublishingYouTubeUploader * self; + PublishingRESTSupportTransaction* result = NULL; + PublishingRESTSupportSession* _tmp0_ = NULL; + PublishingRESTSupportGoogleSession* _tmp1_ = NULL; + PublishingYouTubePublishingParameters* _tmp2_ = NULL; + SpitPublishingPublishable* _tmp3_ = NULL; + SpitPublishingPublishable* _tmp4_ = NULL; + PublishingYouTubeUploadTransaction* _tmp5_ = NULL; + PublishingRESTSupportTransaction* _tmp6_ = NULL; +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploader); +#line 620 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_return_val_if_fail (SPIT_PUBLISHING_IS_PUBLISHABLE (publishable), NULL); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp0_ = publishing_rest_support_batch_uploader_get_session (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, PUBLISHING_REST_SUPPORT_TYPE_GOOGLE_SESSION, PublishingRESTSupportGoogleSession); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp2_ = self->priv->parameters; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp3_ = publishing_rest_support_batch_uploader_get_current_publishable (G_TYPE_CHECK_INSTANCE_CAST (self, PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, PublishingRESTSupportBatchUploader)); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp4_ = _tmp3_; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp5_ = publishing_you_tube_upload_transaction_new (_tmp1_, _tmp2_, _tmp4_); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PUBLISHING_REST_SUPPORT_TYPE_TRANSACTION, PublishingRESTSupportTransaction); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _g_object_unref0 (_tmp4_); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_rest_support_session_unref0 (_tmp1_); +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + result = _tmp6_; +#line 622 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + return result; +#line 4376 "YouTubePublishing.c" +} + + +static void publishing_you_tube_uploader_class_init (PublishingYouTubeUploaderClass * klass) { +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + publishing_you_tube_uploader_parent_class = g_type_class_peek_parent (klass); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->finalize = publishing_you_tube_uploader_finalize; +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + g_type_class_add_private (klass, sizeof (PublishingYouTubeUploaderPrivate)); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + ((PublishingRESTSupportBatchUploaderClass *) klass)->create_transaction = publishing_you_tube_uploader_real_create_transaction; +#line 4389 "YouTubePublishing.c" +} + + +static void publishing_you_tube_uploader_instance_init (PublishingYouTubeUploader * self) { +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self->priv = PUBLISHING_YOU_TUBE_UPLOADER_GET_PRIVATE (self); +#line 4396 "YouTubePublishing.c" +} + + +static void publishing_you_tube_uploader_finalize (PublishingRESTSupportBatchUploader* obj) { + PublishingYouTubeUploader * self; +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, PUBLISHING_YOU_TUBE_TYPE_UPLOADER, PublishingYouTubeUploader); +#line 611 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + _publishing_you_tube_publishing_parameters_unref0 (self->priv->parameters); +#line 610 "/home/jens/Source/shotwell/plugins/shotwell-publishing/YouTubePublishing.vala" + PUBLISHING_REST_SUPPORT_BATCH_UPLOADER_CLASS (publishing_you_tube_uploader_parent_class)->finalize (obj); +#line 4408 "YouTubePublishing.c" +} + + +GType publishing_you_tube_uploader_get_type (void) { + static volatile gsize publishing_you_tube_uploader_type_id__volatile = 0; + if (g_once_init_enter (&publishing_you_tube_uploader_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PublishingYouTubeUploaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) publishing_you_tube_uploader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PublishingYouTubeUploader), 0, (GInstanceInitFunc) publishing_you_tube_uploader_instance_init, NULL }; + GType publishing_you_tube_uploader_type_id; + publishing_you_tube_uploader_type_id = g_type_register_static (PUBLISHING_REST_SUPPORT_TYPE_BATCH_UPLOADER, "PublishingYouTubeUploader", &g_define_type_info, 0); + g_once_init_leave (&publishing_you_tube_uploader_type_id__volatile, publishing_you_tube_uploader_type_id); + } + return publishing_you_tube_uploader_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-publishing/YouTubePublishing.vala b/plugins/shotwell-publishing/YouTubePublishing.vala index 15f283f..7325c32 100644 --- a/plugins/shotwell-publishing/YouTubePublishing.vala +++ b/plugins/shotwell-publishing/YouTubePublishing.vala @@ -11,7 +11,8 @@ public class YouTubeService : Object, Spit.Pluggable, Spit.Publishing.Service { public YouTubeService(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = Resources.load_from_resource + (Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { @@ -353,8 +354,8 @@ public class YouTubePublisher : Publishing.RESTSupport.GooglePublisher { Gtk.Builder builder = new Gtk.Builder(); try { - builder.add_from_file( - get_host().get_module_file().get_parent().get_child("youtube_publishing_options_pane.glade").get_path()); + builder.add_from_resource (Resources.RESOURCE_PATH + + "/youtube_publishing_options_pane.ui"); } catch (Error e) { warning("Could not parse UI file! Error: %s.", e.message); get_host().post_error( diff --git a/plugins/shotwell-publishing/facebook_publishing_options_pane.glade b/plugins/shotwell-publishing/facebook_publishing_options_pane.ui index 7eb30f6..674b078 100644 --- a/plugins/shotwell-publishing/facebook_publishing_options_pane.glade +++ b/plugins/shotwell-publishing/facebook_publishing_options_pane.ui @@ -18,7 +18,7 @@ <property name="can_focus">False</property> <property name="xalign">0.30000001192092896</property> <property name="ypad">16</property> - <property name="label" translatable="no"> (text depends on fb username and is modified in the app - + <property name="label" translatable="no"> (text depends on fb username and is modified in the app - anything put into this field won't display)</property> </object> <packing> diff --git a/plugins/shotwell-publishing/flickr_pin_entry_pane.glade b/plugins/shotwell-publishing/flickr_pin_entry_pane.ui index e20fb38..e20fb38 100644 --- a/plugins/shotwell-publishing/flickr_pin_entry_pane.glade +++ b/plugins/shotwell-publishing/flickr_pin_entry_pane.ui diff --git a/plugins/shotwell-publishing/flickr_publishing_options_pane.glade b/plugins/shotwell-publishing/flickr_publishing_options_pane.ui index 995f2c2..7f67438 100644 --- a/plugins/shotwell-publishing/flickr_publishing_options_pane.glade +++ b/plugins/shotwell-publishing/flickr_publishing_options_pane.ui @@ -18,7 +18,7 @@ <property name="can_focus">False</property> <property name="label" translatable="no">You are logged into Flickr as (name). -(this label's string is populated and set inside the code, +(this label's string is populated and set inside the code, so changes made here will not display)</property> </object> <packing> diff --git a/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml b/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml new file mode 100644 index 0000000..53bcc43 --- /dev/null +++ b/plugins/shotwell-publishing/org.gnome.Shotwell.Publishing.gresource.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gnome/Shotwell/Publishing"> + <file>facebook.png</file> + <file>flickr.png</file> + <file>picasa.png</file> + <file>piwigo.png</file> + <file>youtube.png</file> + <file>facebook_publishing_options_pane.ui</file> + <file>flickr_pin_entry_pane.ui</file> + <file>flickr_publishing_options_pane.ui</file> + <file>picasa_publishing_options_pane.ui</file> + <file>piwigo_authentication_pane.ui</file> + <file>piwigo_publishing_options_pane.ui</file> + <file>youtube_publishing_options_pane.ui</file> + </gresource> +</gresources> diff --git a/plugins/shotwell-publishing/picasa_publishing_options_pane.glade b/plugins/shotwell-publishing/picasa_publishing_options_pane.ui index adee4d2..adee4d2 100644 --- a/plugins/shotwell-publishing/picasa_publishing_options_pane.glade +++ b/plugins/shotwell-publishing/picasa_publishing_options_pane.ui diff --git a/plugins/shotwell-publishing/piwigo_authentication_pane.glade b/plugins/shotwell-publishing/piwigo_authentication_pane.ui index 367f957..bd32141 100644 --- a/plugins/shotwell-publishing/piwigo_authentication_pane.glade +++ b/plugins/shotwell-publishing/piwigo_authentication_pane.ui @@ -24,7 +24,7 @@ <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">label</property> + <property name="label" translatable="no">label</property> <property name="wrap">True</property> </object> <packing> diff --git a/plugins/shotwell-publishing/piwigo_publishing_options_pane.glade b/plugins/shotwell-publishing/piwigo_publishing_options_pane.ui index 7197603..7197603 100644 --- a/plugins/shotwell-publishing/piwigo_publishing_options_pane.glade +++ b/plugins/shotwell-publishing/piwigo_publishing_options_pane.ui diff --git a/plugins/shotwell-publishing/shotwell-publishing.c b/plugins/shotwell-publishing/shotwell-publishing.c new file mode 100644 index 0000000..c5b6a4b --- /dev/null +++ b/plugins/shotwell-publishing/shotwell-publishing.c @@ -0,0 +1,524 @@ +/* shotwell-publishing.c generated by valac 0.32.1, the Vala compiler + * generated from shotwell-publishing.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <shotwell-plugin-dev-1.0.h> +#include <gio/gio.h> +#include <stdlib.h> +#include <string.h> +#include <glib/gi18n-lib.h> + + +#define TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES (shotwell_publishing_core_services_get_type ()) +#define SHOTWELL_PUBLISHING_CORE_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices)) +#define SHOTWELL_PUBLISHING_CORE_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServicesClass)) +#define IS_SHOTWELL_PUBLISHING_CORE_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES)) +#define IS_SHOTWELL_PUBLISHING_CORE_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES)) +#define SHOTWELL_PUBLISHING_CORE_SERVICES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServicesClass)) + +typedef struct _ShotwellPublishingCoreServices ShotwellPublishingCoreServices; +typedef struct _ShotwellPublishingCoreServicesClass ShotwellPublishingCoreServicesClass; +typedef struct _ShotwellPublishingCoreServicesPrivate ShotwellPublishingCoreServicesPrivate; + +#define TYPE_FACEBOOK_SERVICE (facebook_service_get_type ()) +#define FACEBOOK_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FACEBOOK_SERVICE, FacebookService)) +#define FACEBOOK_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FACEBOOK_SERVICE, FacebookServiceClass)) +#define IS_FACEBOOK_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FACEBOOK_SERVICE)) +#define IS_FACEBOOK_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FACEBOOK_SERVICE)) +#define FACEBOOK_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FACEBOOK_SERVICE, FacebookServiceClass)) + +typedef struct _FacebookService FacebookService; +typedef struct _FacebookServiceClass FacebookServiceClass; + +#define TYPE_PICASA_SERVICE (picasa_service_get_type ()) +#define PICASA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PICASA_SERVICE, PicasaService)) +#define PICASA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PICASA_SERVICE, PicasaServiceClass)) +#define IS_PICASA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PICASA_SERVICE)) +#define IS_PICASA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PICASA_SERVICE)) +#define PICASA_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PICASA_SERVICE, PicasaServiceClass)) + +typedef struct _PicasaService PicasaService; +typedef struct _PicasaServiceClass PicasaServiceClass; + +#define TYPE_FLICKR_SERVICE (flickr_service_get_type ()) +#define FLICKR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLICKR_SERVICE, FlickrService)) +#define FLICKR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FLICKR_SERVICE, FlickrServiceClass)) +#define IS_FLICKR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLICKR_SERVICE)) +#define IS_FLICKR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FLICKR_SERVICE)) +#define FLICKR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FLICKR_SERVICE, FlickrServiceClass)) + +typedef struct _FlickrService FlickrService; +typedef struct _FlickrServiceClass FlickrServiceClass; + +#define TYPE_YOU_TUBE_SERVICE (you_tube_service_get_type ()) +#define YOU_TUBE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_YOU_TUBE_SERVICE, YouTubeService)) +#define YOU_TUBE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_YOU_TUBE_SERVICE, YouTubeServiceClass)) +#define IS_YOU_TUBE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_YOU_TUBE_SERVICE)) +#define IS_YOU_TUBE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_YOU_TUBE_SERVICE)) +#define YOU_TUBE_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_YOU_TUBE_SERVICE, YouTubeServiceClass)) + +typedef struct _YouTubeService YouTubeService; +typedef struct _YouTubeServiceClass YouTubeServiceClass; + +#define TYPE_PIWIGO_SERVICE (piwigo_service_get_type ()) +#define PIWIGO_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIWIGO_SERVICE, PiwigoService)) +#define PIWIGO_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIWIGO_SERVICE, PiwigoServiceClass)) +#define IS_PIWIGO_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIWIGO_SERVICE)) +#define IS_PIWIGO_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIWIGO_SERVICE)) +#define PIWIGO_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIWIGO_SERVICE, PiwigoServiceClass)) + +typedef struct _PiwigoService PiwigoService; +typedef struct _PiwigoServiceClass PiwigoServiceClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +struct _ShotwellPublishingCoreServices { + GObject parent_instance; + ShotwellPublishingCoreServicesPrivate * priv; +}; + +struct _ShotwellPublishingCoreServicesClass { + GObjectClass parent_class; +}; + +struct _ShotwellPublishingCoreServicesPrivate { + SpitPluggable** pluggables; + gint pluggables_length1; + gint _pluggables_size_; +}; + + +static gpointer shotwell_publishing_core_services_parent_class = NULL; +static SpitModuleIface* shotwell_publishing_core_services_spit_module_parent_iface = NULL; + +GType shotwell_publishing_core_services_get_type (void) G_GNUC_CONST; +#define SHOTWELL_PUBLISHING_CORE_SERVICES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServicesPrivate)) +enum { + SHOTWELL_PUBLISHING_CORE_SERVICES_DUMMY_PROPERTY +}; +ShotwellPublishingCoreServices* shotwell_publishing_core_services_new (GFile* module_file); +ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GType object_type, GFile* module_file); +FacebookService* facebook_service_new (GFile* resource_directory); +FacebookService* facebook_service_construct (GType object_type, GFile* resource_directory); +GType facebook_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add1 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +PicasaService* picasa_service_new (GFile* resource_directory); +PicasaService* picasa_service_construct (GType object_type, GFile* resource_directory); +GType picasa_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add2 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +FlickrService* flickr_service_new (GFile* resource_directory); +FlickrService* flickr_service_construct (GType object_type, GFile* resource_directory); +GType flickr_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add3 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +YouTubeService* you_tube_service_new (GFile* resource_directory); +YouTubeService* you_tube_service_construct (GType object_type, GFile* resource_directory); +GType you_tube_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add4 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +PiwigoService* piwigo_service_new (GFile* resource_directory); +PiwigoService* piwigo_service_construct (GType object_type, GFile* resource_directory); +GType piwigo_service_get_type (void) G_GNUC_CONST; +static void _vala_array_add5 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +static const gchar* shotwell_publishing_core_services_real_get_module_name (SpitModule* base); +static const gchar* shotwell_publishing_core_services_real_get_version (SpitModule* base); +static const gchar* shotwell_publishing_core_services_real_get_id (SpitModule* base); +static SpitPluggable** shotwell_publishing_core_services_real_get_pluggables (SpitModule* base, int* result_length1); +static void shotwell_publishing_core_services_finalize (GObject* obj); +SpitModule* spit_entry_point (SpitEntryPointParams* params); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +static void _vala_array_add1 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 145 "shotwell-publishing.c" + } +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 151 "shotwell-publishing.c" +} + + +static void _vala_array_add2 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 162 "shotwell-publishing.c" + } +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 168 "shotwell-publishing.c" +} + + +static void _vala_array_add3 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 179 "shotwell-publishing.c" + } +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 185 "shotwell-publishing.c" +} + + +static void _vala_array_add4 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 196 "shotwell-publishing.c" + } +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 202 "shotwell-publishing.c" +} + + +static void _vala_array_add5 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if ((*length) == (*size)) { +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 213 "shotwell-publishing.c" + } +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[(*length)++] = value; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*array)[*length] = NULL; +#line 219 "shotwell-publishing.c" +} + + +ShotwellPublishingCoreServices* shotwell_publishing_core_services_construct (GType object_type, GFile* module_file) { + ShotwellPublishingCoreServices * self = NULL; + GFile* resource_directory = NULL; + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + SpitPluggable** _tmp2_ = NULL; + gint _tmp2__length1 = 0; + FacebookService* _tmp3_ = NULL; + SpitPluggable** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + PicasaService* _tmp5_ = NULL; + SpitPluggable** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + FlickrService* _tmp7_ = NULL; + SpitPluggable** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + YouTubeService* _tmp9_ = NULL; + SpitPluggable** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + PiwigoService* _tmp11_ = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + g_return_val_if_fail (G_IS_FILE (module_file), NULL); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = (ShotwellPublishingCoreServices*) g_object_new (object_type, NULL); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0_ = module_file; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp1_ = g_file_get_parent (_tmp0_); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + resource_directory = _tmp1_; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp2_ = self->priv->pluggables; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp2__length1 = self->priv->pluggables_length1; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp3_ = facebook_service_new (resource_directory); +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add1 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp4_ = self->priv->pluggables; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp4__length1 = self->priv->pluggables_length1; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp5_ = picasa_service_new (resource_directory); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add2 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp6_ = self->priv->pluggables; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp6__length1 = self->priv->pluggables_length1; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp7_ = flickr_service_new (resource_directory); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add3 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp8_ = self->priv->pluggables; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp8__length1 = self->priv->pluggables_length1; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp9_ = you_tube_service_new (resource_directory); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add4 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp10_ = self->priv->pluggables; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp10__length1 = self->priv->pluggables_length1; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp11_ = piwigo_service_new (resource_directory); +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _vala_array_add5 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _g_object_unref0 (resource_directory); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return self; +#line 297 "shotwell-publishing.c" +} + + +ShotwellPublishingCoreServices* shotwell_publishing_core_services_new (GFile* module_file) { +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return shotwell_publishing_core_services_construct (TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, module_file); +#line 304 "shotwell-publishing.c" +} + + +static const gchar* shotwell_publishing_core_services_real_get_module_name (SpitModule* base) { + ShotwellPublishingCoreServices * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 25 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0_ = _ ("Core Publishing Services"); +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + result = _tmp0_; +#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return result; +#line 320 "shotwell-publishing.c" +} + + +static const gchar* shotwell_publishing_core_services_real_get_version (SpitModule* base) { + ShotwellPublishingCoreServices * self; + const gchar* result = NULL; +#line 29 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); +#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + result = _VERSION; +#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return result; +#line 333 "shotwell-publishing.c" +} + + +static const gchar* shotwell_publishing_core_services_real_get_id (SpitModule* base) { + ShotwellPublishingCoreServices * self; + const gchar* result = NULL; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + result = "org.yorba.shotwell.publishing.core_services"; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return result; +#line 346 "shotwell-publishing.c" +} + + +static SpitPluggable** shotwell_publishing_core_services_real_get_pluggables (SpitModule* base, int* result_length1) { + ShotwellPublishingCoreServices * self; + SpitPluggable** result = NULL; + SpitPluggable** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + SpitPluggable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0_ = self->priv->pluggables; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0__length1 = self->priv->pluggables_length1; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp1_ = _tmp0_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp1__length1 = _tmp0__length1; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if (result_length1) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + *result_length1 = _tmp1__length1; +#line 371 "shotwell-publishing.c" + } +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + result = _tmp1_; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return result; +#line 377 "shotwell-publishing.c" +} + + +static void shotwell_publishing_core_services_class_init (ShotwellPublishingCoreServicesClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + shotwell_publishing_core_services_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + g_type_class_add_private (klass, sizeof (ShotwellPublishingCoreServicesPrivate)); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + G_OBJECT_CLASS (klass)->finalize = shotwell_publishing_core_services_finalize; +#line 388 "shotwell-publishing.c" +} + + +static void shotwell_publishing_core_services_spit_module_interface_init (SpitModuleIface * iface) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + shotwell_publishing_core_services_spit_module_parent_iface = g_type_interface_peek_parent (iface); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + iface->get_module_name = (const gchar* (*)(SpitModule*)) shotwell_publishing_core_services_real_get_module_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + iface->get_version = (const gchar* (*)(SpitModule*)) shotwell_publishing_core_services_real_get_version; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + iface->get_id = (const gchar* (*)(SpitModule*)) shotwell_publishing_core_services_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + iface->get_pluggables = (SpitPluggable** (*)(SpitModule*, int*)) shotwell_publishing_core_services_real_get_pluggables; +#line 403 "shotwell-publishing.c" +} + + +static void shotwell_publishing_core_services_instance_init (ShotwellPublishingCoreServices * self) { + SpitPluggable** _tmp0_ = NULL; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self->priv = SHOTWELL_PUBLISHING_CORE_SERVICES_GET_PRIVATE (self); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0_ = g_new0 (SpitPluggable*, 0 + 1); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self->priv->pluggables = _tmp0_; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self->priv->pluggables_length1 = 0; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self->priv->_pluggables_size_ = self->priv->pluggables_length1; +#line 419 "shotwell-publishing.c" +} + + +static void shotwell_publishing_core_services_finalize (GObject* obj) { + ShotwellPublishingCoreServices * self; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_PUBLISHING_CORE_SERVICES, ShotwellPublishingCoreServices); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + G_OBJECT_CLASS (shotwell_publishing_core_services_parent_class)->finalize (obj); +#line 431 "shotwell-publishing.c" +} + + +GType shotwell_publishing_core_services_get_type (void) { + static volatile gsize shotwell_publishing_core_services_type_id__volatile = 0; + if (g_once_init_enter (&shotwell_publishing_core_services_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ShotwellPublishingCoreServicesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_publishing_core_services_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellPublishingCoreServices), 0, (GInstanceInitFunc) shotwell_publishing_core_services_instance_init, NULL }; + static const GInterfaceInfo spit_module_info = { (GInterfaceInitFunc) shotwell_publishing_core_services_spit_module_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType shotwell_publishing_core_services_type_id; + shotwell_publishing_core_services_type_id = g_type_register_static (G_TYPE_OBJECT, "ShotwellPublishingCoreServices", &g_define_type_info, 0); + g_type_add_interface_static (shotwell_publishing_core_services_type_id, SPIT_TYPE_MODULE, &spit_module_info); + g_once_init_leave (&shotwell_publishing_core_services_type_id__volatile, shotwell_publishing_core_services_type_id); + } + return shotwell_publishing_core_services_type_id__volatile; +} + + +SpitModule* spit_entry_point (SpitEntryPointParams* params) { + SpitModule* result = NULL; + SpitEntryPointParams* _tmp0_ = NULL; + gint _tmp1_ = 0; + SpitEntryPointParams* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + ShotwellPublishingCoreServices* _tmp5_ = NULL; + SpitEntryPointParams* _tmp6_ = NULL; + gint _tmp7_ = 0; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp0_ = params; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp1_ = (*_tmp0_).host_min_spit_interface; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp2_ = params; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp3_ = (*_tmp2_).host_max_spit_interface; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + (*params).module_spit_interface = _tmp4_; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp6_ = params; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp7_ = (*_tmp6_).module_spit_interface; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) { +#line 477 "shotwell-publishing.c" + SpitEntryPointParams* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + ShotwellPublishingCoreServices* _tmp10_ = NULL; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp8_ = params; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp9_ = (*_tmp8_).module_file; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp10_ = shotwell_publishing_core_services_new (_tmp9_); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _g_object_unref0 (_tmp5_); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp5_ = _tmp10_; +#line 491 "shotwell-publishing.c" + } else { +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _g_object_unref0 (_tmp5_); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + _tmp5_ = NULL; +#line 497 "shotwell-publishing.c" + } +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-publishing/shotwell-publishing.vala" + return result; +#line 503 "shotwell-publishing.c" +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-publishing/youtube_publishing_options_pane.glade b/plugins/shotwell-publishing/youtube_publishing_options_pane.ui index cdf82af..cdf82af 100644 --- a/plugins/shotwell-publishing/youtube_publishing_options_pane.glade +++ b/plugins/shotwell-publishing/youtube_publishing_options_pane.ui |