summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shotwell-publishing-extras/shotwell-publishing-extras.c')
-rw-r--r--plugins/shotwell-publishing-extras/shotwell-publishing-extras.c202
1 files changed, 118 insertions, 84 deletions
diff --git a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c
index c4556dd..e873272 100644
--- a/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c
+++ b/plugins/shotwell-publishing-extras/shotwell-publishing-extras.c
@@ -1,4 +1,4 @@
-/* shotwell-publishing-extras.c generated by valac 0.36.6, the Vala compiler
+/* shotwell-publishing-extras.c generated by valac 0.40.4, the Vala compiler
* generated from shotwell-publishing-extras.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <shotwell-plugin-dev-1.0.h>
@@ -26,6 +27,11 @@
typedef struct _ShotwellPublishingExtraServices ShotwellPublishingExtraServices;
typedef struct _ShotwellPublishingExtraServicesClass ShotwellPublishingExtraServicesClass;
typedef struct _ShotwellPublishingExtraServicesPrivate ShotwellPublishingExtraServicesPrivate;
+enum {
+ SHOTWELL_PUBLISHING_EXTRA_SERVICES_0_PROPERTY,
+ SHOTWELL_PUBLISHING_EXTRA_SERVICES_NUM_PROPERTIES
+};
+static GParamSpec* shotwell_publishing_extra_services_properties[SHOTWELL_PUBLISHING_EXTRA_SERVICES_NUM_PROPERTIES];
#define TYPE_GALLERY3_SERVICE (gallery3_service_get_type ())
#define GALLERY3_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GALLERY3_SERVICE, Gallery3Service))
@@ -59,50 +65,64 @@ static SpitModuleIface * shotwell_publishing_extra_services_spit_module_parent_i
GType shotwell_publishing_extra_services_get_type (void) G_GNUC_CONST;
#define SHOTWELL_PUBLISHING_EXTRA_SERVICES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServicesPrivate))
-enum {
- SHOTWELL_PUBLISHING_EXTRA_SERVICES_DUMMY_PROPERTY
-};
ShotwellPublishingExtraServices* shotwell_publishing_extra_services_new (GFile* module_file);
-ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (GType object_type, GFile* module_file);
+ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (GType object_type,
+ GFile* module_file);
Gallery3Service* gallery3_service_new (GFile* resource_directory);
-Gallery3Service* gallery3_service_construct (GType object_type, GFile* resource_directory);
+Gallery3Service* gallery3_service_construct (GType object_type,
+ GFile* resource_directory);
GType gallery3_service_get_type (void) G_GNUC_CONST;
-static void _vala_array_add14 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value);
+static void _vala_array_add14 (SpitPluggable** * array,
+ int* length,
+ int* size,
+ SpitPluggable* value);
static const gchar* shotwell_publishing_extra_services_real_get_module_name (SpitModule* base);
static const gchar* shotwell_publishing_extra_services_real_get_version (SpitModule* base);
static const gchar* shotwell_publishing_extra_services_real_get_id (SpitModule* base);
-static SpitPluggable** shotwell_publishing_extra_services_real_get_pluggables (SpitModule* base, int* result_length1);
+static SpitPluggable** shotwell_publishing_extra_services_real_get_pluggables (SpitModule* base,
+ int* result_length1);
static void shotwell_publishing_extra_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_add14 (SpitPluggable** * array, int* length, int* size, SpitPluggable* value) {
+static void _vala_array_destroy (gpointer array,
+ gint array_length,
+ GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array,
+ gint array_length,
+ GDestroyNotify destroy_func);
+
+
+static void
+_vala_array_add14 (SpitPluggable** * array,
+ int* length,
+ int* size,
+ SpitPluggable* value)
+{
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
if ((*length) == (*size)) {
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
*size = (*size) ? (2 * (*size)) : 4;
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
*array = g_renew (SpitPluggable*, *array, (*size) + 1);
-#line 89 "shotwell-publishing-extras.c"
+#line 107 "shotwell-publishing-extras.c"
}
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
(*array)[(*length)++] = value;
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
(*array)[*length] = NULL;
-#line 95 "shotwell-publishing-extras.c"
+#line 113 "shotwell-publishing-extras.c"
}
-ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (GType object_type, GFile* module_file) {
+ShotwellPublishingExtraServices*
+shotwell_publishing_extra_services_construct (GType object_type,
+ GFile* module_file)
+{
ShotwellPublishingExtraServices * self = NULL;
SpitPluggable** _tmp0_;
gint _tmp0__length1;
GFile* _tmp1_;
GFile* _tmp2_;
- GFile* _tmp3_;
- Gallery3Service* _tmp4_;
+ Gallery3Service* _tmp3_;
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
g_return_val_if_fail (G_IS_FILE (module_file), NULL);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
@@ -112,31 +132,33 @@ ShotwellPublishingExtraServices* shotwell_publishing_extra_services_construct (G
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
_tmp0__length1 = self->priv->pluggables_length1;
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp1_ = module_file;
-#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp2_ = g_file_get_parent (_tmp1_);
+ _tmp1_ = g_file_get_parent (module_file);
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp3_ = _tmp2_;
+ _tmp2_ = _tmp1_;
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp4_ = gallery3_service_new (_tmp3_);
+ _tmp3_ = gallery3_service_new (_tmp2_);
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _vala_array_add14 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
+ _vala_array_add14 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
#line 22 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _g_object_unref0 (_tmp3_);
+ _g_object_unref0 (_tmp2_);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return self;
-#line 129 "shotwell-publishing-extras.c"
+#line 147 "shotwell-publishing-extras.c"
}
-ShotwellPublishingExtraServices* shotwell_publishing_extra_services_new (GFile* module_file) {
+ShotwellPublishingExtraServices*
+shotwell_publishing_extra_services_new (GFile* module_file)
+{
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return shotwell_publishing_extra_services_construct (TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, module_file);
-#line 136 "shotwell-publishing-extras.c"
+#line 156 "shotwell-publishing-extras.c"
}
-static const gchar* shotwell_publishing_extra_services_real_get_module_name (SpitModule* base) {
+static const gchar*
+shotwell_publishing_extra_services_real_get_module_name (SpitModule* base)
+{
ShotwellPublishingExtraServices * self;
const gchar* result = NULL;
#line 26 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
@@ -145,11 +167,13 @@ static const gchar* shotwell_publishing_extra_services_real_get_module_name (Spi
result = _ ("Shotwell Extra Publishing Services");
#line 27 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return result;
-#line 149 "shotwell-publishing-extras.c"
+#line 171 "shotwell-publishing-extras.c"
}
-static const gchar* shotwell_publishing_extra_services_real_get_version (SpitModule* base) {
+static const gchar*
+shotwell_publishing_extra_services_real_get_version (SpitModule* base)
+{
ShotwellPublishingExtraServices * self;
const gchar* result = NULL;
#line 30 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
@@ -158,11 +182,13 @@ static const gchar* shotwell_publishing_extra_services_real_get_version (SpitMod
result = _VERSION;
#line 31 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return result;
-#line 162 "shotwell-publishing-extras.c"
+#line 186 "shotwell-publishing-extras.c"
}
-static const gchar* shotwell_publishing_extra_services_real_get_id (SpitModule* base) {
+static const gchar*
+shotwell_publishing_extra_services_real_get_id (SpitModule* base)
+{
ShotwellPublishingExtraServices * self;
const gchar* result = NULL;
#line 34 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
@@ -171,11 +197,14 @@ static const gchar* shotwell_publishing_extra_services_real_get_id (SpitModule*
result = "org.yorba.shotwell.publishing.extras";
#line 35 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return result;
-#line 175 "shotwell-publishing-extras.c"
+#line 201 "shotwell-publishing-extras.c"
}
-static SpitPluggable** shotwell_publishing_extra_services_real_get_pluggables (SpitModule* base, int* result_length1) {
+static SpitPluggable**
+shotwell_publishing_extra_services_real_get_pluggables (SpitModule* base,
+ int* result_length1)
+{
ShotwellPublishingExtraServices * self;
SpitPluggable** result = NULL;
SpitPluggable** _tmp0_;
@@ -196,28 +225,32 @@ static SpitPluggable** shotwell_publishing_extra_services_real_get_pluggables (S
if (result_length1) {
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
*result_length1 = _tmp1__length1;
-#line 200 "shotwell-publishing-extras.c"
+#line 229 "shotwell-publishing-extras.c"
}
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
result = _tmp1_;
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return result;
-#line 206 "shotwell-publishing-extras.c"
+#line 235 "shotwell-publishing-extras.c"
}
-static void shotwell_publishing_extra_services_class_init (ShotwellPublishingExtraServicesClass * klass) {
+static void
+shotwell_publishing_extra_services_class_init (ShotwellPublishingExtraServicesClass * klass)
+{
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
shotwell_publishing_extra_services_parent_class = g_type_class_peek_parent (klass);
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
g_type_class_add_private (klass, sizeof (ShotwellPublishingExtraServicesPrivate));
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
G_OBJECT_CLASS (klass)->finalize = shotwell_publishing_extra_services_finalize;
-#line 217 "shotwell-publishing-extras.c"
+#line 248 "shotwell-publishing-extras.c"
}
-static void shotwell_publishing_extra_services_spit_module_interface_init (SpitModuleIface * iface) {
+static void
+shotwell_publishing_extra_services_spit_module_interface_init (SpitModuleIface * iface)
+{
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
shotwell_publishing_extra_services_spit_module_parent_iface = g_type_interface_peek_parent (iface);
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
@@ -228,11 +261,13 @@ static void shotwell_publishing_extra_services_spit_module_interface_init (SpitM
iface->get_id = (const gchar* (*) (SpitModule *)) shotwell_publishing_extra_services_real_get_id;
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
iface->get_pluggables = (SpitPluggable** (*) (SpitModule *, int*)) shotwell_publishing_extra_services_real_get_pluggables;
-#line 232 "shotwell-publishing-extras.c"
+#line 265 "shotwell-publishing-extras.c"
}
-static void shotwell_publishing_extra_services_instance_init (ShotwellPublishingExtraServices * self) {
+static void
+shotwell_publishing_extra_services_instance_init (ShotwellPublishingExtraServices * self)
+{
SpitPluggable** _tmp0_;
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
self->priv = SHOTWELL_PUBLISHING_EXTRA_SERVICES_GET_PRIVATE (self);
@@ -244,11 +279,13 @@ static void shotwell_publishing_extra_services_instance_init (ShotwellPublishing
self->priv->pluggables_length1 = 0;
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
self->priv->_pluggables_size_ = self->priv->pluggables_length1;
-#line 248 "shotwell-publishing-extras.c"
+#line 283 "shotwell-publishing-extras.c"
}
-static void shotwell_publishing_extra_services_finalize (GObject * obj) {
+static void
+shotwell_publishing_extra_services_finalize (GObject * obj)
+{
ShotwellPublishingExtraServices * self;
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_PUBLISHING_EXTRA_SERVICES, ShotwellPublishingExtraServices);
@@ -256,11 +293,13 @@ static void shotwell_publishing_extra_services_finalize (GObject * obj) {
self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL);
#line 9 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
G_OBJECT_CLASS (shotwell_publishing_extra_services_parent_class)->finalize (obj);
-#line 260 "shotwell-publishing-extras.c"
+#line 297 "shotwell-publishing-extras.c"
}
-GType shotwell_publishing_extra_services_get_type (void) {
+GType
+shotwell_publishing_extra_services_get_type (void)
+{
static volatile gsize shotwell_publishing_extra_services_type_id__volatile = 0;
if (g_once_init_enter (&shotwell_publishing_extra_services_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ShotwellPublishingExtraServicesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_publishing_extra_services_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellPublishingExtraServices), 0, (GInstanceInitFunc) shotwell_publishing_extra_services_instance_init, NULL };
@@ -274,65 +313,56 @@ GType shotwell_publishing_extra_services_get_type (void) {
}
-SpitModule* spit_entry_point (SpitEntryPointParams* params) {
+SpitModule*
+spit_entry_point (SpitEntryPointParams* params)
+{
SpitModule* result = NULL;
- SpitEntryPointParams* _tmp0_;
+ gint _tmp0_;
gint _tmp1_;
- SpitEntryPointParams* _tmp2_;
+ ShotwellPublishingExtraServices* _tmp2_ = NULL;
gint _tmp3_;
- gint _tmp4_;
- ShotwellPublishingExtraServices* _tmp5_ = NULL;
- SpitEntryPointParams* _tmp6_;
- gint _tmp7_;
-#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp0_ = params;
-#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp1_ = (*_tmp0_).host_min_spit_interface;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp2_ = params;
+ _tmp0_ = (*params).host_min_spit_interface;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp3_ = (*_tmp2_).host_max_spit_interface;
+ _tmp1_ = (*params).host_max_spit_interface;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE);
-#line 45 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- (*params).module_spit_interface = _tmp4_;
-#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp6_ = params;
+ (*params).module_spit_interface = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_CURRENT_INTERFACE);
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp7_ = (*_tmp6_).module_spit_interface;
+ _tmp3_ = (*params).module_spit_interface;
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) {
-#line 306 "shotwell-publishing-extras.c"
- SpitEntryPointParams* _tmp8_;
- GFile* _tmp9_;
- ShotwellPublishingExtraServices* _tmp10_;
-#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp8_ = params;
+ if (_tmp3_ != SPIT_UNSUPPORTED_INTERFACE) {
+#line 335 "shotwell-publishing-extras.c"
+ GFile* _tmp4_;
+ ShotwellPublishingExtraServices* _tmp5_;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp9_ = (*_tmp8_).module_file;
+ _tmp4_ = (*params).module_file;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp10_ = shotwell_publishing_extra_services_new (_tmp9_);
+ _tmp5_ = shotwell_publishing_extra_services_new (_tmp4_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _g_object_unref0 (_tmp5_);
+ _g_object_unref0 (_tmp2_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp5_ = _tmp10_;
-#line 320 "shotwell-publishing-extras.c"
+ _tmp2_ = _tmp5_;
+#line 346 "shotwell-publishing-extras.c"
} else {
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _g_object_unref0 (_tmp5_);
+ _g_object_unref0 (_tmp2_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- _tmp5_ = NULL;
-#line 326 "shotwell-publishing-extras.c"
+ _tmp2_ = NULL;
+#line 352 "shotwell-publishing-extras.c"
}
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
- result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule);
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SPIT_TYPE_MODULE, SpitModule);
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-publishing-extras/shotwell-publishing-extras.vala"
return result;
-#line 332 "shotwell-publishing-extras.c"
+#line 358 "shotwell-publishing-extras.c"
}
-static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+static void
+_vala_array_destroy (gpointer array,
+ gint array_length,
+ GDestroyNotify destroy_func)
+{
if ((array != NULL) && (destroy_func != NULL)) {
int i;
for (i = 0; i < array_length; i = i + 1) {
@@ -344,7 +374,11 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti
}
-static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+static void
+_vala_array_free (gpointer array,
+ gint array_length,
+ GDestroyNotify destroy_func)
+{
_vala_array_destroy (array, array_length, destroy_func);
g_free (array);
}