summaryrefslogtreecommitdiff
path: root/src/threads
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
commita9bafe967a7a664c43dec4aeb64a6f6e0f284e05 (patch)
tree653c43a63b70c47278367ad2a4e92640a6669b44 /src/threads
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parentab841afa5cb39058d9ab2cebb67cfe6369443f6e (diff)
Update upstream source from tag 'upstream/0.28.3'
Update to upstream version '0.28.3' with Debian dir 828a38627ed9287d7cf2466fb15ebdea073742b7
Diffstat (limited to 'src/threads')
-rw-r--r--src/threads/BackgroundJob.c1071
-rw-r--r--src/threads/Semaphore.c492
-rw-r--r--src/threads/Threads.c11
-rw-r--r--src/threads/Workers.c620
4 files changed, 1282 insertions, 912 deletions
diff --git a/src/threads/BackgroundJob.c b/src/threads/BackgroundJob.c
index f2ba99a..1de262e 100644
--- a/src/threads/BackgroundJob.c
+++ b/src/threads/BackgroundJob.c
@@ -1,4 +1,4 @@
-/* BackgroundJob.c generated by valac 0.36.6, the Vala compiler
+/* BackgroundJob.c generated by valac 0.40.4, the Vala compiler
* generated from BackgroundJob.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -9,6 +9,7 @@
/* This callback is executed when an associated BackgroundJob completes. It is called from within*/
/* the Gtk event loop, *not* the background thread's context.*/
+
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
@@ -193,36 +194,48 @@ static gpointer background_job_notification_job_parent_class = NULL;
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
-GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_background_job (GValue* value, gpointer v_object);
-void value_take_background_job (GValue* value, gpointer v_object);
+GParamSpec* param_spec_background_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_background_job (GValue* value,
+ gpointer v_object);
+void value_take_background_job (GValue* value,
+ gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
gpointer notification_object_ref (gpointer instance);
void notification_object_unref (gpointer instance);
-GParamSpec* param_spec_notification_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_notification_object (GValue* value, gpointer v_object);
-void value_take_notification_object (GValue* value, gpointer v_object);
+GParamSpec* param_spec_notification_object (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_notification_object (GValue* value,
+ gpointer v_object);
+void value_take_notification_object (GValue* value,
+ gpointer v_object);
gpointer value_get_notification_object (const GValue* value);
GType notification_object_get_type (void) G_GNUC_CONST;
-enum {
- NOTIFICATION_OBJECT_DUMMY_PROPERTY
-};
NotificationObject* notification_object_construct (GType object_type);
static void notification_object_finalize (NotificationObject * obj);
GType interlocked_notification_object_get_type (void) G_GNUC_CONST;
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_abstract_semaphore (GValue* value, gpointer v_object);
-void value_take_abstract_semaphore (GValue* value, gpointer v_object);
+GParamSpec* param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_abstract_semaphore (GValue* value,
+ gpointer v_object);
+void value_take_abstract_semaphore (GValue* value,
+ gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
GType semaphore_get_type (void) G_GNUC_CONST;
#define INTERLOCKED_NOTIFICATION_OBJECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_INTERLOCKED_NOTIFICATION_OBJECT, InterlockedNotificationObjectPrivate))
-enum {
- INTERLOCKED_NOTIFICATION_OBJECT_DUMMY_PROPERTY
-};
Semaphore* semaphore_new (void);
Semaphore* semaphore_construct (GType object_type);
void interlocked_notification_object_internal_wait_for_completion (InterlockedNotificationObject* self);
@@ -233,27 +246,43 @@ InterlockedNotificationObject* interlocked_notification_object_construct (GType
static void interlocked_notification_object_finalize (NotificationObject * obj);
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
#define BACKGROUND_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BACKGROUND_JOB, BackgroundJobPrivate))
-enum {
- BACKGROUND_JOB_DUMMY_PROPERTY
-};
-gint background_job_job_priority_compare (BackgroundJobJobPriority self, BackgroundJobJobPriority other);
-gint background_job_job_priority_compare_func (BackgroundJobJobPriority a, BackgroundJobJobPriority b);
+gint background_job_job_priority_compare (BackgroundJobJobPriority self,
+ BackgroundJobJobPriority other);
+gint background_job_job_priority_compare_func (BackgroundJobJobPriority a,
+ BackgroundJobJobPriority b);
static gpointer background_job_notification_job_ref (gpointer instance);
static void background_job_notification_job_unref (gpointer instance);
-static GParamSpec* background_job_param_spec_notification_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
-static void background_job_value_set_notification_job (GValue* value, gpointer v_object) G_GNUC_UNUSED;
-static void background_job_value_take_notification_job (GValue* value, gpointer v_object) G_GNUC_UNUSED;
+static GParamSpec* background_job_param_spec_notification_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags) G_GNUC_UNUSED;
+static void background_job_value_set_notification_job (GValue* value,
+ gpointer v_object) G_GNUC_UNUSED;
+static void background_job_value_take_notification_job (GValue* value,
+ gpointer v_object) G_GNUC_UNUSED;
static gpointer background_job_value_get_notification_job (const GValue* value) G_GNUC_UNUSED;
static GType background_job_notification_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
-BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore);
+BackgroundJob* background_job_construct (GType object_type,
+ GObject* owner,
+ CompletionCallback callback,
+ void* callback_target,
+ GCancellable* cancellable,
+ CancellationCallback cancellation,
+ void* cancellation_target,
+ AbstractSemaphore* completion_semaphore);
void background_job_execute (BackgroundJob* self);
static void background_job_real_execute (BackgroundJob* self);
BackgroundJobJobPriority background_job_get_priority (BackgroundJob* self);
static BackgroundJobJobPriority background_job_real_get_priority (BackgroundJob* self);
-gint background_job_priority_compare_func (BackgroundJob* a, BackgroundJob* b);
-gint64 background_job_priority_comparator (void* a, void* b);
-void background_job_set_completion_priority (BackgroundJob* self, gint priority);
-void background_job_set_notification_priority (BackgroundJob* self, gint priority);
+gint background_job_priority_compare_func (BackgroundJob* a,
+ BackgroundJob* b);
+gint64 background_job_priority_comparator (void* a,
+ void* b);
+void background_job_set_completion_priority (BackgroundJob* self,
+ gint priority);
+void background_job_set_notification_priority (BackgroundJob* self,
+ gint priority);
void background_job_wait_for_completion (BackgroundJob* self);
GCancellable* background_job_get_cancellable (BackgroundJob* self);
gboolean background_job_is_cancelled (BackgroundJob* self);
@@ -261,126 +290,160 @@ void background_job_cancel (BackgroundJob* self);
void background_job_internal_notify_completion (BackgroundJob* self);
static gboolean background_job_on_notify_completion (BackgroundJob* self);
static gboolean _background_job_on_notify_completion_gsource_func (gpointer self);
-void background_job_notify (BackgroundJob* self, NotificationCallback callback, void* callback_target, NotificationObject* user);
-static BackgroundJobNotificationJob* background_job_notification_job_new (NotificationCallback callback, void* callback_target, BackgroundJob* background_job, NotificationObject* user);
-static BackgroundJobNotificationJob* background_job_notification_job_construct (GType object_type, NotificationCallback callback, void* callback_target, BackgroundJob* background_job, NotificationObject* user);
+void background_job_notify (BackgroundJob* self,
+ NotificationCallback callback,
+ void* callback_target,
+ NotificationObject* user);
+static BackgroundJobNotificationJob* background_job_notification_job_new (NotificationCallback callback,
+ void* callback_target,
+ BackgroundJob* background_job,
+ NotificationObject* user);
+static BackgroundJobNotificationJob* background_job_notification_job_construct (GType object_type,
+ NotificationCallback callback,
+ void* callback_target,
+ BackgroundJob* background_job,
+ NotificationObject* user);
static gboolean background_job_on_notification_ready (BackgroundJob* self);
static gboolean _background_job_on_notification_ready_gsource_func (gpointer self);
-enum {
- BACKGROUND_JOB_NOTIFICATION_JOB_DUMMY_PROPERTY
-};
static void background_job_notification_job_finalize (BackgroundJobNotificationJob * obj);
static void background_job_finalize (BackgroundJob * obj);
-NotificationObject* notification_object_construct (GType object_type) {
+NotificationObject*
+notification_object_construct (GType object_type)
+{
NotificationObject* self = NULL;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = (NotificationObject*) g_type_create_instance (object_type);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self;
-#line 283 "BackgroundJob.c"
+#line 321 "BackgroundJob.c"
}
-static void value_notification_object_init (GValue* value) {
+static void
+value_notification_object_init (GValue* value)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 290 "BackgroundJob.c"
+#line 330 "BackgroundJob.c"
}
-static void value_notification_object_free_value (GValue* value) {
+static void
+value_notification_object_free_value (GValue* value)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (value->data[0].v_pointer) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_object_unref (value->data[0].v_pointer);
-#line 299 "BackgroundJob.c"
+#line 341 "BackgroundJob.c"
}
}
-static void value_notification_object_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_notification_object_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (src_value->data[0].v_pointer) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = notification_object_ref (src_value->data[0].v_pointer);
-#line 309 "BackgroundJob.c"
+#line 354 "BackgroundJob.c"
} else {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = NULL;
-#line 313 "BackgroundJob.c"
+#line 358 "BackgroundJob.c"
}
}
-static gpointer value_notification_object_peek_pointer (const GValue* value) {
+static gpointer
+value_notification_object_peek_pointer (const GValue* value)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 321 "BackgroundJob.c"
+#line 368 "BackgroundJob.c"
}
-static gchar* value_notification_object_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_notification_object_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (collect_values[0].v_pointer) {
-#line 328 "BackgroundJob.c"
+#line 380 "BackgroundJob.c"
NotificationObject * object;
object = collect_values[0].v_pointer;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (object->parent_instance.g_class == NULL) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 335 "BackgroundJob.c"
+#line 387 "BackgroundJob.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.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 339 "BackgroundJob.c"
+#line 391 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = notification_object_ref (object);
-#line 343 "BackgroundJob.c"
+#line 395 "BackgroundJob.c"
} else {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 347 "BackgroundJob.c"
+#line 399 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 351 "BackgroundJob.c"
+#line 403 "BackgroundJob.c"
}
-static gchar* value_notification_object_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_notification_object_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
NotificationObject ** object_p;
object_p = collect_values[0].v_pointer;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!object_p) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 362 "BackgroundJob.c"
+#line 419 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!value->data[0].v_pointer) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = NULL;
-#line 368 "BackgroundJob.c"
+#line 425 "BackgroundJob.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = value->data[0].v_pointer;
-#line 372 "BackgroundJob.c"
+#line 429 "BackgroundJob.c"
} else {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = notification_object_ref (value->data[0].v_pointer);
-#line 376 "BackgroundJob.c"
+#line 433 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 380 "BackgroundJob.c"
+#line 437 "BackgroundJob.c"
}
-GParamSpec* param_spec_notification_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_notification_object (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecNotificationObject* spec;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_NOTIFICATION_OBJECT), NULL);
@@ -390,20 +453,25 @@ GParamSpec* param_spec_notification_object (const gchar* name, const gchar* nick
G_PARAM_SPEC (spec)->value_type = object_type;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return G_PARAM_SPEC (spec);
-#line 394 "BackgroundJob.c"
+#line 457 "BackgroundJob.c"
}
-gpointer value_get_notification_object (const GValue* value) {
+gpointer
+value_get_notification_object (const GValue* value)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFICATION_OBJECT), NULL);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 403 "BackgroundJob.c"
+#line 468 "BackgroundJob.c"
}
-void value_set_notification_object (GValue* value, gpointer v_object) {
+void
+value_set_notification_object (GValue* value,
+ gpointer v_object)
+{
NotificationObject * old;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFICATION_OBJECT));
@@ -419,22 +487,25 @@ void value_set_notification_object (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_object_ref (value->data[0].v_pointer);
-#line 423 "BackgroundJob.c"
+#line 491 "BackgroundJob.c"
} else {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 427 "BackgroundJob.c"
+#line 495 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_object_unref (old);
-#line 433 "BackgroundJob.c"
+#line 501 "BackgroundJob.c"
}
}
-void value_take_notification_object (GValue* value, gpointer v_object) {
+void
+value_take_notification_object (GValue* value,
+ gpointer v_object)
+{
NotificationObject * old;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFICATION_OBJECT));
@@ -448,48 +519,56 @@ void value_take_notification_object (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = v_object;
-#line 452 "BackgroundJob.c"
+#line 523 "BackgroundJob.c"
} else {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 456 "BackgroundJob.c"
+#line 527 "BackgroundJob.c"
}
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_object_unref (old);
-#line 462 "BackgroundJob.c"
+#line 533 "BackgroundJob.c"
}
}
-static void notification_object_class_init (NotificationObjectClass * klass) {
+static void
+notification_object_class_init (NotificationObjectClass * klass)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_object_parent_class = g_type_class_peek_parent (klass);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
((NotificationObjectClass *) klass)->finalize = notification_object_finalize;
-#line 472 "BackgroundJob.c"
+#line 545 "BackgroundJob.c"
}
-static void notification_object_instance_init (NotificationObject * self) {
+static void
+notification_object_instance_init (NotificationObject * self)
+{
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->ref_count = 1;
-#line 479 "BackgroundJob.c"
+#line 554 "BackgroundJob.c"
}
-static void notification_object_finalize (NotificationObject * obj) {
+static void
+notification_object_finalize (NotificationObject * obj)
+{
NotificationObject * self;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFICATION_OBJECT, NotificationObject);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_signal_handlers_destroy (self);
-#line 489 "BackgroundJob.c"
+#line 566 "BackgroundJob.c"
}
-GType notification_object_get_type (void) {
+GType
+notification_object_get_type (void)
+{
static volatile gsize notification_object_type_id__volatile = 0;
if (g_once_init_enter (&notification_object_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_notification_object_init, value_notification_object_free_value, value_notification_object_copy_value, value_notification_object_peek_pointer, "p", value_notification_object_collect_value, "p", value_notification_object_lcopy_value };
@@ -503,18 +582,22 @@ GType notification_object_get_type (void) {
}
-gpointer notification_object_ref (gpointer instance) {
+gpointer
+notification_object_ref (gpointer instance)
+{
NotificationObject * self;
self = instance;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_atomic_int_inc (&self->ref_count);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return instance;
-#line 514 "BackgroundJob.c"
+#line 595 "BackgroundJob.c"
}
-void notification_object_unref (gpointer instance) {
+void
+notification_object_unref (gpointer instance)
+{
NotificationObject * self;
self = instance;
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -523,12 +606,14 @@ void notification_object_unref (gpointer instance) {
NOTIFICATION_OBJECT_GET_CLASS (self)->finalize (self);
#line 34 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 527 "BackgroundJob.c"
+#line 610 "BackgroundJob.c"
}
}
-void interlocked_notification_object_internal_wait_for_completion (InterlockedNotificationObject* self) {
+void
+interlocked_notification_object_internal_wait_for_completion (InterlockedNotificationObject* self)
+{
Semaphore* _tmp0_;
#line 41 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_INTERLOCKED_NOTIFICATION_OBJECT (self));
@@ -536,11 +621,13 @@ void interlocked_notification_object_internal_wait_for_completion (InterlockedNo
_tmp0_ = self->priv->semaphore;
#line 42 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
abstract_semaphore_wait (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 540 "BackgroundJob.c"
+#line 625 "BackgroundJob.c"
}
-void interlocked_notification_object_internal_completed (InterlockedNotificationObject* self) {
+void
+interlocked_notification_object_internal_completed (InterlockedNotificationObject* self)
+{
Semaphore* _tmp0_;
#line 46 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_INTERLOCKED_NOTIFICATION_OBJECT (self));
@@ -548,32 +635,38 @@ void interlocked_notification_object_internal_completed (InterlockedNotification
_tmp0_ = self->priv->semaphore;
#line 47 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 552 "BackgroundJob.c"
+#line 639 "BackgroundJob.c"
}
-InterlockedNotificationObject* interlocked_notification_object_construct (GType object_type) {
+InterlockedNotificationObject*
+interlocked_notification_object_construct (GType object_type)
+{
InterlockedNotificationObject* self = NULL;
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = (InterlockedNotificationObject*) notification_object_construct (object_type);
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self;
-#line 562 "BackgroundJob.c"
+#line 651 "BackgroundJob.c"
}
-static void interlocked_notification_object_class_init (InterlockedNotificationObjectClass * klass) {
+static void
+interlocked_notification_object_class_init (InterlockedNotificationObjectClass * klass)
+{
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
interlocked_notification_object_parent_class = g_type_class_peek_parent (klass);
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
((NotificationObjectClass *) klass)->finalize = interlocked_notification_object_finalize;
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_type_class_add_private (klass, sizeof (InterlockedNotificationObjectPrivate));
-#line 573 "BackgroundJob.c"
+#line 664 "BackgroundJob.c"
}
-static void interlocked_notification_object_instance_init (InterlockedNotificationObject * self) {
+static void
+interlocked_notification_object_instance_init (InterlockedNotificationObject * self)
+{
Semaphore* _tmp0_;
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->priv = INTERLOCKED_NOTIFICATION_OBJECT_GET_PRIVATE (self);
@@ -581,11 +674,13 @@ static void interlocked_notification_object_instance_init (InterlockedNotificati
_tmp0_ = semaphore_new ();
#line 38 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->priv->semaphore = _tmp0_;
-#line 585 "BackgroundJob.c"
+#line 678 "BackgroundJob.c"
}
-static void interlocked_notification_object_finalize (NotificationObject * obj) {
+static void
+interlocked_notification_object_finalize (NotificationObject * obj)
+{
InterlockedNotificationObject * self;
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_INTERLOCKED_NOTIFICATION_OBJECT, InterlockedNotificationObject);
@@ -593,11 +688,13 @@ static void interlocked_notification_object_finalize (NotificationObject * obj)
_abstract_semaphore_unref0 (self->priv->semaphore);
#line 37 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
NOTIFICATION_OBJECT_CLASS (interlocked_notification_object_parent_class)->finalize (obj);
-#line 597 "BackgroundJob.c"
+#line 692 "BackgroundJob.c"
}
-GType interlocked_notification_object_get_type (void) {
+GType
+interlocked_notification_object_get_type (void)
+{
static volatile gsize interlocked_notification_object_type_id__volatile = 0;
if (g_once_init_enter (&interlocked_notification_object_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (InterlockedNotificationObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) interlocked_notification_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (InterlockedNotificationObject), 0, (GInstanceInitFunc) interlocked_notification_object_instance_init, NULL };
@@ -609,36 +706,35 @@ GType interlocked_notification_object_get_type (void) {
}
-gint background_job_job_priority_compare (BackgroundJobJobPriority self, BackgroundJobJobPriority other) {
+gint
+background_job_job_priority_compare (BackgroundJobJobPriority self,
+ BackgroundJobJobPriority other)
+{
gint result = 0;
- BackgroundJobJobPriority _tmp0_;
-#line 75 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = other;
#line 75 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- result = ((gint) _tmp0_) - ((gint) self);
+ result = ((gint) other) - ((gint) self);
#line 75 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 622 "BackgroundJob.c"
+#line 719 "BackgroundJob.c"
}
-gint background_job_job_priority_compare_func (BackgroundJobJobPriority a, BackgroundJobJobPriority b) {
+gint
+background_job_job_priority_compare_func (BackgroundJobJobPriority a,
+ BackgroundJobJobPriority b)
+{
gint result = 0;
- BackgroundJobJobPriority _tmp0_;
- BackgroundJobJobPriority _tmp1_;
-#line 79 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = b;
#line 79 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = a;
-#line 79 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- result = ((gint) _tmp0_) - ((gint) _tmp1_);
+ result = ((gint) b) - ((gint) a);
#line 79 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 638 "BackgroundJob.c"
+#line 732 "BackgroundJob.c"
}
-GType background_job_job_priority_get_type (void) {
+GType
+background_job_job_priority_get_type (void)
+{
static volatile gsize background_job_job_priority_type_id__volatile = 0;
if (g_once_init_enter (&background_job_job_priority_type_id__volatile)) {
static const GEnumValue values[] = {{BACKGROUND_JOB_JOB_PRIORITY_HIGHEST, "BACKGROUND_JOB_JOB_PRIORITY_HIGHEST", "highest"}, {BACKGROUND_JOB_JOB_PRIORITY_HIGH, "BACKGROUND_JOB_JOB_PRIORITY_HIGH", "high"}, {BACKGROUND_JOB_JOB_PRIORITY_NORMAL, "BACKGROUND_JOB_JOB_PRIORITY_NORMAL", "normal"}, {BACKGROUND_JOB_JOB_PRIORITY_LOW, "BACKGROUND_JOB_JOB_PRIORITY_LOW", "low"}, {BACKGROUND_JOB_JOB_PRIORITY_LOWEST, "BACKGROUND_JOB_JOB_PRIORITY_LOWEST", "lowest"}, {0, NULL, NULL}};
@@ -650,32 +746,38 @@ GType background_job_job_priority_get_type (void) {
}
-static gpointer _g_object_ref0 (gpointer self) {
+static gpointer
+_g_object_ref0 (gpointer self)
+{
#line 116 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self ? g_object_ref (self) : NULL;
-#line 657 "BackgroundJob.c"
+#line 755 "BackgroundJob.c"
}
-static gpointer _abstract_semaphore_ref0 (gpointer self) {
+static gpointer
+_abstract_semaphore_ref0 (gpointer self)
+{
#line 120 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self ? abstract_semaphore_ref (self) : NULL;
-#line 664 "BackgroundJob.c"
+#line 764 "BackgroundJob.c"
}
-BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore) {
+BackgroundJob*
+background_job_construct (GType object_type,
+ GObject* owner,
+ CompletionCallback callback,
+ void* callback_target,
+ GCancellable* cancellable,
+ CancellationCallback cancellation,
+ void* cancellation_target,
+ AbstractSemaphore* completion_semaphore)
+{
BackgroundJob* self = NULL;
GObject* _tmp0_;
- GObject* _tmp1_;
- CompletionCallback _tmp2_;
- void* _tmp2__target;
- GCancellable* _tmp3_;
- GCancellable* _tmp4_;
- CancellationCallback _tmp5_;
- void* _tmp5__target;
- AbstractSemaphore* _tmp6_;
- AbstractSemaphore* _tmp7_;
+ GCancellable* _tmp1_;
+ AbstractSemaphore* _tmp2_;
#line 113 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail ((owner == NULL) || G_IS_OBJECT (owner), NULL);
#line 113 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -685,161 +787,139 @@ BackgroundJob* background_job_construct (GType object_type, GObject* owner, Comp
#line 113 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = (BackgroundJob*) g_type_create_instance (object_type);
#line 116 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = owner;
-#line 116 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = _g_object_ref0 (_tmp0_);
+ _tmp0_ = _g_object_ref0 (owner);
#line 116 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_g_object_unref0 (self->priv->owner);
#line 116 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->owner = _tmp1_;
-#line 117 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = callback;
+ self->priv->owner = _tmp0_;
#line 117 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2__target = callback_target;
+ self->priv->callback = callback;
#line 117 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->callback = _tmp2_;
-#line 117 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->callback_target = _tmp2__target;
-#line 118 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = cancellable;
+ self->priv->callback_target = callback_target;
#line 118 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ = _g_object_ref0 (_tmp3_);
+ _tmp1_ = _g_object_ref0 (cancellable);
#line 118 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_g_object_unref0 (self->priv->cancellable);
#line 118 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->cancellable = _tmp4_;
-#line 119 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp5_ = cancellation;
-#line 119 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp5__target = cancellation_target;
+ self->priv->cancellable = _tmp1_;
#line 119 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->cancellation = _tmp5_;
+ self->priv->cancellation = cancellation;
#line 119 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->cancellation_target = _tmp5__target;
+ self->priv->cancellation_target = cancellation_target;
#line 120 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp6_ = completion_semaphore;
-#line 120 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp7_ = _abstract_semaphore_ref0 (_tmp6_);
+ _tmp2_ = _abstract_semaphore_ref0 (completion_semaphore);
#line 120 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_abstract_semaphore_unref0 (self->priv->semaphore);
#line 120 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->semaphore = _tmp7_;
+ self->priv->semaphore = _tmp2_;
#line 113 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self;
-#line 730 "BackgroundJob.c"
+#line 818 "BackgroundJob.c"
}
-static void background_job_real_execute (BackgroundJob* self) {
+static void
+background_job_real_execute (BackgroundJob* self)
+{
#line 123 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_critical ("Type `%s' does not implement abstract method `background_job_execute'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 123 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return;
-#line 739 "BackgroundJob.c"
+#line 829 "BackgroundJob.c"
}
-void background_job_execute (BackgroundJob* self) {
+void
+background_job_execute (BackgroundJob* self)
+{
#line 123 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
#line 123 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
BACKGROUND_JOB_GET_CLASS (self)->execute (self);
-#line 748 "BackgroundJob.c"
+#line 840 "BackgroundJob.c"
}
-static BackgroundJobJobPriority background_job_real_get_priority (BackgroundJob* self) {
+static BackgroundJobJobPriority
+background_job_real_get_priority (BackgroundJob* self)
+{
BackgroundJobJobPriority result = 0;
#line 126 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
result = BACKGROUND_JOB_JOB_PRIORITY_NORMAL;
#line 126 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 758 "BackgroundJob.c"
+#line 852 "BackgroundJob.c"
}
-BackgroundJobJobPriority background_job_get_priority (BackgroundJob* self) {
+BackgroundJobJobPriority
+background_job_get_priority (BackgroundJob* self)
+{
#line 125 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (IS_BACKGROUND_JOB (self), 0);
#line 125 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return BACKGROUND_JOB_GET_CLASS (self)->get_priority (self);
-#line 767 "BackgroundJob.c"
+#line 863 "BackgroundJob.c"
}
-gint background_job_priority_compare_func (BackgroundJob* a, BackgroundJob* b) {
+gint
+background_job_priority_compare_func (BackgroundJob* a,
+ BackgroundJob* b)
+{
gint result = 0;
- BackgroundJob* _tmp0_;
- BackgroundJobJobPriority _tmp1_;
- BackgroundJob* _tmp2_;
- BackgroundJobJobPriority _tmp3_;
- gint _tmp4_;
#line 130 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (IS_BACKGROUND_JOB (a), 0);
#line 130 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (IS_BACKGROUND_JOB (b), 0);
#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = a;
-#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = background_job_get_priority (_tmp0_);
-#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = b;
-#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = background_job_get_priority (_tmp2_);
-#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ = background_job_job_priority_compare (_tmp1_, _tmp3_);
-#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- result = _tmp4_;
+ result = background_job_job_priority_compare (background_job_get_priority (a), background_job_get_priority (b));
#line 131 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 796 "BackgroundJob.c"
+#line 880 "BackgroundJob.c"
}
-gint64 background_job_priority_comparator (void* a, void* b) {
+gint64
+background_job_priority_comparator (void* a,
+ void* b)
+{
gint64 result = 0LL;
- void* _tmp0_;
- void* _tmp1_;
- gint _tmp2_;
-#line 136 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = a;
-#line 136 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = b;
#line 136 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = background_job_priority_compare_func (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_BACKGROUND_JOB, BackgroundJob), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_BACKGROUND_JOB, BackgroundJob));
-#line 136 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- result = (gint64) _tmp2_;
+ result = (gint64) background_job_priority_compare_func (G_TYPE_CHECK_INSTANCE_CAST (a, TYPE_BACKGROUND_JOB, BackgroundJob), G_TYPE_CHECK_INSTANCE_CAST (b, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 136 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 815 "BackgroundJob.c"
+#line 893 "BackgroundJob.c"
}
-void background_job_set_completion_priority (BackgroundJob* self, gint priority) {
- gint _tmp0_;
+void
+background_job_set_completion_priority (BackgroundJob* self,
+ gint priority)
+{
#line 140 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
#line 141 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = priority;
-#line 141 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->completion_priority = _tmp0_;
-#line 827 "BackgroundJob.c"
+ self->priv->completion_priority = priority;
+#line 905 "BackgroundJob.c"
}
-void background_job_set_notification_priority (BackgroundJob* self, gint priority) {
- gint _tmp0_;
+void
+background_job_set_notification_priority (BackgroundJob* self,
+ gint priority)
+{
#line 145 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
#line 146 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = priority;
-#line 146 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->notification_priority = _tmp0_;
-#line 839 "BackgroundJob.c"
+ self->priv->notification_priority = priority;
+#line 917 "BackgroundJob.c"
}
-void background_job_wait_for_completion (BackgroundJob* self) {
+void
+background_job_wait_for_completion (BackgroundJob* self)
+{
AbstractSemaphore* _tmp0_;
#line 152 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
@@ -847,18 +927,20 @@ void background_job_wait_for_completion (BackgroundJob* self) {
_tmp0_ = self->priv->semaphore;
#line 153 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp0_ != NULL) {
-#line 851 "BackgroundJob.c"
+#line 931 "BackgroundJob.c"
AbstractSemaphore* _tmp1_;
#line 154 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp1_ = self->priv->semaphore;
#line 154 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
abstract_semaphore_wait (_tmp1_);
-#line 857 "BackgroundJob.c"
+#line 937 "BackgroundJob.c"
}
}
-GCancellable* background_job_get_cancellable (BackgroundJob* self) {
+GCancellable*
+background_job_get_cancellable (BackgroundJob* self)
+{
GCancellable* result = NULL;
GCancellable* _tmp0_;
GCancellable* _tmp1_;
@@ -872,11 +954,13 @@ GCancellable* background_job_get_cancellable (BackgroundJob* self) {
result = _tmp1_;
#line 158 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 876 "BackgroundJob.c"
+#line 958 "BackgroundJob.c"
}
-gboolean background_job_is_cancelled (BackgroundJob* self) {
+gboolean
+background_job_is_cancelled (BackgroundJob* self)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
GCancellable* _tmp1_;
@@ -886,30 +970,29 @@ gboolean background_job_is_cancelled (BackgroundJob* self) {
_tmp1_ = self->priv->cancellable;
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp1_ != NULL) {
-#line 890 "BackgroundJob.c"
+#line 974 "BackgroundJob.c"
GCancellable* _tmp2_;
- gboolean _tmp3_;
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp2_ = self->priv->cancellable;
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = g_cancellable_is_cancelled (_tmp2_);
-#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = _tmp3_;
-#line 899 "BackgroundJob.c"
+ _tmp0_ = g_cancellable_is_cancelled (_tmp2_);
+#line 980 "BackgroundJob.c"
} else {
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp0_ = FALSE;
-#line 903 "BackgroundJob.c"
+#line 984 "BackgroundJob.c"
}
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
result = _tmp0_;
#line 162 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 909 "BackgroundJob.c"
+#line 990 "BackgroundJob.c"
}
-void background_job_cancel (BackgroundJob* self) {
+void
+background_job_cancel (BackgroundJob* self)
+{
GCancellable* _tmp0_;
#line 165 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
@@ -917,55 +1000,60 @@ void background_job_cancel (BackgroundJob* self) {
_tmp0_ = self->priv->cancellable;
#line 166 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp0_ != NULL) {
-#line 921 "BackgroundJob.c"
+#line 1004 "BackgroundJob.c"
GCancellable* _tmp1_;
#line 167 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp1_ = self->priv->cancellable;
#line 167 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_cancellable_cancel (_tmp1_);
-#line 927 "BackgroundJob.c"
+#line 1010 "BackgroundJob.c"
}
}
-static gpointer _background_job_ref0 (gpointer self) {
+static gpointer
+_background_job_ref0 (gpointer self)
+{
#line 183 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self ? background_job_ref (self) : NULL;
-#line 935 "BackgroundJob.c"
+#line 1020 "BackgroundJob.c"
}
-static gboolean _background_job_on_notify_completion_gsource_func (gpointer self) {
+static gboolean
+_background_job_on_notify_completion_gsource_func (gpointer self)
+{
gboolean result;
result = background_job_on_notify_completion ((BackgroundJob*) self);
#line 185 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 944 "BackgroundJob.c"
+#line 1031 "BackgroundJob.c"
}
-void background_job_internal_notify_completion (BackgroundJob* self) {
+void
+background_job_internal_notify_completion (BackgroundJob* self)
+{
AbstractSemaphore* _tmp0_;
gboolean _tmp2_ = FALSE;
CompletionCallback _tmp3_;
void* _tmp3__target;
gboolean _tmp5_ = FALSE;
- gboolean _tmp6_;
- BackgroundJob* _tmp8_;
- gint _tmp9_;
+ BackgroundJob* _tmp7_;
+ gint _tmp8_;
#line 171 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
#line 172 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp0_ = self->priv->semaphore;
#line 172 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp0_ != NULL) {
-#line 963 "BackgroundJob.c"
+#line 1051 "BackgroundJob.c"
AbstractSemaphore* _tmp1_;
#line 173 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp1_ = self->priv->semaphore;
#line 173 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
abstract_semaphore_notify (_tmp1_);
-#line 969 "BackgroundJob.c"
+#line 1057 "BackgroundJob.c"
}
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp3_ = self->priv->callback;
@@ -973,7 +1061,7 @@ void background_job_internal_notify_completion (BackgroundJob* self) {
_tmp3__target = self->priv->callback_target;
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp3_ == NULL) {
-#line 977 "BackgroundJob.c"
+#line 1065 "BackgroundJob.c"
CancellationCallback _tmp4_;
void* _tmp4__target;
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -982,105 +1070,102 @@ void background_job_internal_notify_completion (BackgroundJob* self) {
_tmp4__target = self->priv->cancellation_target;
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp2_ = _tmp4_ == NULL;
-#line 986 "BackgroundJob.c"
+#line 1074 "BackgroundJob.c"
} else {
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp2_ = FALSE;
-#line 990 "BackgroundJob.c"
+#line 1078 "BackgroundJob.c"
}
#line 175 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp2_) {
#line 176 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return;
-#line 996 "BackgroundJob.c"
+#line 1084 "BackgroundJob.c"
}
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp6_ = background_job_is_cancelled (self);
-#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- if (_tmp6_) {
-#line 1002 "BackgroundJob.c"
- CancellationCallback _tmp7_;
- void* _tmp7__target;
+ if (background_job_is_cancelled (self)) {
+#line 1088 "BackgroundJob.c"
+ CancellationCallback _tmp6_;
+ void* _tmp6__target;
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp7_ = self->priv->cancellation;
+ _tmp6_ = self->priv->cancellation;
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp7__target = self->priv->cancellation_target;
+ _tmp6__target = self->priv->cancellation_target;
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp5_ = _tmp7_ == NULL;
-#line 1011 "BackgroundJob.c"
+ _tmp5_ = _tmp6_ == NULL;
+#line 1097 "BackgroundJob.c"
} else {
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp5_ = FALSE;
-#line 1015 "BackgroundJob.c"
+#line 1101 "BackgroundJob.c"
}
#line 178 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp5_) {
#line 179 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return;
-#line 1021 "BackgroundJob.c"
+#line 1107 "BackgroundJob.c"
}
#line 183 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp8_ = _background_job_ref0 (self);
+ _tmp7_ = _background_job_ref0 (self);
#line 183 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_background_job_unref0 (self->priv->self);
#line 183 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->priv->self = _tmp8_;
+ self->priv->self = _tmp7_;
#line 185 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp9_ = self->priv->completion_priority;
+ _tmp8_ = self->priv->completion_priority;
#line 185 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- g_idle_add_full (_tmp9_, _background_job_on_notify_completion_gsource_func, background_job_ref (self), background_job_unref);
-#line 1033 "BackgroundJob.c"
+ g_idle_add_full (_tmp8_, _background_job_on_notify_completion_gsource_func, background_job_ref (self), background_job_unref);
+#line 1119 "BackgroundJob.c"
}
-static gboolean background_job_on_notify_completion (BackgroundJob* self) {
+static gboolean
+background_job_on_notify_completion (BackgroundJob* self)
+{
gboolean result = FALSE;
- gboolean _tmp0_;
#line 188 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (IS_BACKGROUND_JOB (self), FALSE);
#line 193 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = background_job_is_cancelled (self);
-#line 193 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- if (_tmp0_) {
-#line 1046 "BackgroundJob.c"
- CancellationCallback _tmp1_;
- void* _tmp1__target;
+ if (background_job_is_cancelled (self)) {
+#line 1131 "BackgroundJob.c"
+ CancellationCallback _tmp0_;
+ void* _tmp0__target;
#line 194 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = self->priv->cancellation;
+ _tmp0_ = self->priv->cancellation;
#line 194 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1__target = self->priv->cancellation_target;
+ _tmp0__target = self->priv->cancellation_target;
#line 194 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- if (_tmp1_ != NULL) {
-#line 1055 "BackgroundJob.c"
- CancellationCallback _tmp2_;
- void* _tmp2__target;
+ if (_tmp0_ != NULL) {
+#line 1140 "BackgroundJob.c"
+ CancellationCallback _tmp1_;
+ void* _tmp1__target;
#line 195 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = self->priv->cancellation;
+ _tmp1_ = self->priv->cancellation;
#line 195 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2__target = self->priv->cancellation_target;
+ _tmp1__target = self->priv->cancellation_target;
#line 195 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ (self, _tmp2__target);
-#line 1064 "BackgroundJob.c"
+ _tmp1_ (self, _tmp1__target);
+#line 1149 "BackgroundJob.c"
}
} else {
- CompletionCallback _tmp3_;
- void* _tmp3__target;
+ CompletionCallback _tmp2_;
+ void* _tmp2__target;
#line 197 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = self->priv->callback;
+ _tmp2_ = self->priv->callback;
#line 197 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3__target = self->priv->callback_target;
+ _tmp2__target = self->priv->callback_target;
#line 197 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- if (_tmp3_ != NULL) {
-#line 1075 "BackgroundJob.c"
- CompletionCallback _tmp4_;
- void* _tmp4__target;
+ if (_tmp2_ != NULL) {
+#line 1160 "BackgroundJob.c"
+ CompletionCallback _tmp3_;
+ void* _tmp3__target;
#line 198 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ = self->priv->callback;
+ _tmp3_ = self->priv->callback;
#line 198 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4__target = self->priv->callback_target;
+ _tmp3__target = self->priv->callback_target;
#line 198 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ (self, _tmp4__target);
-#line 1084 "BackgroundJob.c"
+ _tmp3_ (self, _tmp3__target);
+#line 1169 "BackgroundJob.c"
}
}
#line 202 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1091,78 +1176,77 @@ static gboolean background_job_on_notify_completion (BackgroundJob* self) {
result = FALSE;
#line 204 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 1095 "BackgroundJob.c"
+#line 1180 "BackgroundJob.c"
}
-static gboolean _background_job_on_notification_ready_gsource_func (gpointer self) {
+static gboolean
+_background_job_on_notification_ready_gsource_func (gpointer self)
+{
gboolean result;
result = background_job_on_notification_ready ((BackgroundJob*) self);
#line 214 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 1104 "BackgroundJob.c"
+#line 1191 "BackgroundJob.c"
}
-static gpointer _notification_object_ref0 (gpointer self) {
+static gpointer
+_notification_object_ref0 (gpointer self)
+{
#line 218 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self ? notification_object_ref (self) : NULL;
-#line 1111 "BackgroundJob.c"
+#line 1200 "BackgroundJob.c"
}
-void background_job_notify (BackgroundJob* self, NotificationCallback callback, void* callback_target, NotificationObject* user) {
- gint _tmp7_;
+void
+background_job_notify (BackgroundJob* self,
+ NotificationCallback callback,
+ void* callback_target,
+ NotificationObject* user)
+{
+ gint _tmp5_;
InterlockedNotificationObject* interlocked = NULL;
- NotificationObject* _tmp8_;
- InterlockedNotificationObject* _tmp9_;
- InterlockedNotificationObject* _tmp10_;
+ InterlockedNotificationObject* _tmp6_;
+ InterlockedNotificationObject* _tmp7_;
GError * _inner_error_ = NULL;
#line 209 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (IS_BACKGROUND_JOB (self));
#line 209 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail ((user == NULL) || IS_NOTIFICATION_OBJECT (user));
-#line 1126 "BackgroundJob.c"
+#line 1219 "BackgroundJob.c"
{
GeeArrayList* _tmp0_;
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp0_ = background_job_notify_queue;
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_rec_mutex_lock (&__lock_background_job_notify_queue);
-#line 1133 "BackgroundJob.c"
+#line 1226 "BackgroundJob.c"
{
GeeArrayList* _tmp1_;
- NotificationCallback _tmp2_;
- void* _tmp2__target;
- NotificationObject* _tmp3_;
- BackgroundJobNotificationJob* _tmp4_;
- BackgroundJobNotificationJob* _tmp5_;
+ BackgroundJobNotificationJob* _tmp2_;
+ BackgroundJobNotificationJob* _tmp3_;
#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp1_ = background_job_notify_queue;
#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = callback;
-#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2__target = callback_target;
-#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = user;
+ _tmp2_ = background_job_notification_job_new (callback, callback_target, self, user);
#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ = background_job_notification_job_new (_tmp2_, _tmp2__target, self, _tmp3_);
-#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp5_ = _tmp4_;
+ _tmp3_ = _tmp2_;
#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp5_);
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp3_);
#line 211 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _background_job_notification_job_unref0 (_tmp5_);
-#line 1157 "BackgroundJob.c"
+ _background_job_notification_job_unref0 (_tmp3_);
+#line 1241 "BackgroundJob.c"
}
__finally13:
{
- GeeArrayList* _tmp6_;
+ GeeArrayList* _tmp4_;
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp6_ = background_job_notify_queue;
+ _tmp4_ = background_job_notify_queue;
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_rec_mutex_unlock (&__lock_background_job_notify_queue);
-#line 1166 "BackgroundJob.c"
+#line 1250 "BackgroundJob.c"
}
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
@@ -1172,38 +1256,38 @@ void background_job_notify (BackgroundJob* self, NotificationCallback callback,
g_clear_error (&_inner_error_);
#line 210 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return;
-#line 1176 "BackgroundJob.c"
+#line 1260 "BackgroundJob.c"
}
}
#line 214 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp7_ = self->priv->notification_priority;
+ _tmp5_ = self->priv->notification_priority;
#line 214 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- g_idle_add_full (_tmp7_, _background_job_on_notification_ready_gsource_func, background_job_ref (self), background_job_unref);
+ g_idle_add_full (_tmp5_, _background_job_on_notification_ready_gsource_func, background_job_ref (self), background_job_unref);
#line 218 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp8_ = user;
+ _tmp6_ = _notification_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (user, TYPE_INTERLOCKED_NOTIFICATION_OBJECT) ? ((InterlockedNotificationObject*) user) : NULL);
#line 218 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp9_ = _notification_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, TYPE_INTERLOCKED_NOTIFICATION_OBJECT) ? ((InterlockedNotificationObject*) _tmp8_) : NULL);
-#line 218 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- interlocked = _tmp9_;
+ interlocked = _tmp6_;
#line 219 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp10_ = interlocked;
+ _tmp7_ = interlocked;
#line 219 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- if (_tmp10_ != NULL) {
-#line 1193 "BackgroundJob.c"
- InterlockedNotificationObject* _tmp11_;
+ if (_tmp7_ != NULL) {
+#line 1275 "BackgroundJob.c"
+ InterlockedNotificationObject* _tmp8_;
#line 220 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp11_ = interlocked;
+ _tmp8_ = interlocked;
#line 220 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- interlocked_notification_object_internal_wait_for_completion (_tmp11_);
-#line 1199 "BackgroundJob.c"
+ interlocked_notification_object_internal_wait_for_completion (_tmp8_);
+#line 1281 "BackgroundJob.c"
}
#line 209 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_notification_object_unref0 (interlocked);
-#line 1203 "BackgroundJob.c"
+#line 1285 "BackgroundJob.c"
}
-static gboolean background_job_on_notification_ready (BackgroundJob* self) {
+static gboolean
+background_job_on_notification_ready (BackgroundJob* self)
+{
gboolean result = FALSE;
BackgroundJobNotificationJob* notification_job = NULL;
BackgroundJobNotificationJob* _tmp8_;
@@ -1224,14 +1308,14 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
g_return_val_if_fail (IS_BACKGROUND_JOB (self), FALSE);
#line 226 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_job = NULL;
-#line 1228 "BackgroundJob.c"
+#line 1312 "BackgroundJob.c"
{
GeeArrayList* _tmp0_;
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp0_ = background_job_notify_queue;
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_rec_mutex_lock (&__lock_background_job_notify_queue);
-#line 1235 "BackgroundJob.c"
+#line 1319 "BackgroundJob.c"
{
GeeArrayList* _tmp1_;
gint _tmp2_;
@@ -1244,7 +1328,7 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
_tmp3_ = _tmp2_;
#line 228 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp3_ > 0) {
-#line 1248 "BackgroundJob.c"
+#line 1332 "BackgroundJob.c"
GeeArrayList* _tmp4_;
gpointer _tmp5_;
#line 229 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1255,7 +1339,7 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
_background_job_notification_job_unref0 (notification_job);
#line 229 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
notification_job = (BackgroundJobNotificationJob*) _tmp5_;
-#line 1259 "BackgroundJob.c"
+#line 1343 "BackgroundJob.c"
}
}
__finally14:
@@ -1265,11 +1349,11 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
_tmp6_ = background_job_notify_queue;
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_rec_mutex_unlock (&__lock_background_job_notify_queue);
-#line 1269 "BackgroundJob.c"
+#line 1353 "BackgroundJob.c"
}
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1273 "BackgroundJob.c"
+#line 1357 "BackgroundJob.c"
gboolean _tmp7_ = FALSE;
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_background_job_notification_job_unref0 (notification_job);
@@ -1279,7 +1363,7 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
g_clear_error (&_inner_error_);
#line 227 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return _tmp7_;
-#line 1283 "BackgroundJob.c"
+#line 1367 "BackgroundJob.c"
}
}
#line 231 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1314,13 +1398,13 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
_tmp18_ = interlocked;
#line 237 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (_tmp18_ != NULL) {
-#line 1318 "BackgroundJob.c"
+#line 1402 "BackgroundJob.c"
InterlockedNotificationObject* _tmp19_;
#line 238 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_tmp19_ = interlocked;
#line 238 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
interlocked_notification_object_internal_completed (_tmp19_);
-#line 1324 "BackgroundJob.c"
+#line 1408 "BackgroundJob.c"
}
#line 240 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
result = FALSE;
@@ -1330,18 +1414,20 @@ static gboolean background_job_on_notification_ready (BackgroundJob* self) {
_background_job_notification_job_unref0 (notification_job);
#line 240 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return result;
-#line 1334 "BackgroundJob.c"
+#line 1418 "BackgroundJob.c"
}
-static BackgroundJobNotificationJob* background_job_notification_job_construct (GType object_type, NotificationCallback callback, void* callback_target, BackgroundJob* background_job, NotificationObject* user) {
+static BackgroundJobNotificationJob*
+background_job_notification_job_construct (GType object_type,
+ NotificationCallback callback,
+ void* callback_target,
+ BackgroundJob* background_job,
+ NotificationObject* user)
+{
BackgroundJobNotificationJob* self = NULL;
- NotificationCallback _tmp0_;
- void* _tmp0__target;
- BackgroundJob* _tmp1_;
- BackgroundJob* _tmp2_;
- NotificationObject* _tmp3_;
- NotificationObject* _tmp4_;
+ BackgroundJob* _tmp0_;
+ NotificationObject* _tmp1_;
#line 88 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (IS_BACKGROUND_JOB (background_job), NULL);
#line 88 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1349,140 +1435,162 @@ static BackgroundJobNotificationJob* background_job_notification_job_construct (
#line 88 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = (BackgroundJobNotificationJob*) g_type_create_instance (object_type);
#line 90 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0_ = callback;
-#line 90 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp0__target = callback_target;
-#line 90 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->callback = _tmp0_;
+ self->callback = callback;
#line 90 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->callback_target = _tmp0__target;
+ self->callback_target = callback_target;
#line 91 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp1_ = background_job;
-#line 91 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp2_ = _background_job_ref0 (_tmp1_);
+ _tmp0_ = _background_job_ref0 (background_job);
#line 91 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_background_job_unref0 (self->background_job);
#line 91 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->background_job = _tmp2_;
-#line 92 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp3_ = user;
+ self->background_job = _tmp0_;
#line 92 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- _tmp4_ = _notification_object_ref0 (_tmp3_);
+ _tmp1_ = _notification_object_ref0 (user);
#line 92 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_notification_object_unref0 (self->user);
#line 92 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
- self->user = _tmp4_;
+ self->user = _tmp1_;
#line 88 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return self;
-#line 1378 "BackgroundJob.c"
+#line 1456 "BackgroundJob.c"
}
-static BackgroundJobNotificationJob* background_job_notification_job_new (NotificationCallback callback, void* callback_target, BackgroundJob* background_job, NotificationObject* user) {
+static BackgroundJobNotificationJob*
+background_job_notification_job_new (NotificationCallback callback,
+ void* callback_target,
+ BackgroundJob* background_job,
+ NotificationObject* user)
+{
#line 88 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return background_job_notification_job_construct (BACKGROUND_JOB_TYPE_NOTIFICATION_JOB, callback, callback_target, background_job, user);
-#line 1385 "BackgroundJob.c"
+#line 1468 "BackgroundJob.c"
}
-static void background_job_value_notification_job_init (GValue* value) {
+static void
+background_job_value_notification_job_init (GValue* value)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1392 "BackgroundJob.c"
+#line 1477 "BackgroundJob.c"
}
-static void background_job_value_notification_job_free_value (GValue* value) {
+static void
+background_job_value_notification_job_free_value (GValue* value)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (value->data[0].v_pointer) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notification_job_unref (value->data[0].v_pointer);
-#line 1401 "BackgroundJob.c"
+#line 1488 "BackgroundJob.c"
}
}
-static void background_job_value_notification_job_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+background_job_value_notification_job_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (src_value->data[0].v_pointer) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = background_job_notification_job_ref (src_value->data[0].v_pointer);
-#line 1411 "BackgroundJob.c"
+#line 1501 "BackgroundJob.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = NULL;
-#line 1415 "BackgroundJob.c"
+#line 1505 "BackgroundJob.c"
}
}
-static gpointer background_job_value_notification_job_peek_pointer (const GValue* value) {
+static gpointer
+background_job_value_notification_job_peek_pointer (const GValue* value)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 1423 "BackgroundJob.c"
+#line 1515 "BackgroundJob.c"
}
-static gchar* background_job_value_notification_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+background_job_value_notification_job_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (collect_values[0].v_pointer) {
-#line 1430 "BackgroundJob.c"
+#line 1527 "BackgroundJob.c"
BackgroundJobNotificationJob * object;
object = collect_values[0].v_pointer;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (object->parent_instance.g_class == NULL) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 1437 "BackgroundJob.c"
+#line 1534 "BackgroundJob.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.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 1441 "BackgroundJob.c"
+#line 1538 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = background_job_notification_job_ref (object);
-#line 1445 "BackgroundJob.c"
+#line 1542 "BackgroundJob.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1449 "BackgroundJob.c"
+#line 1546 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 1453 "BackgroundJob.c"
+#line 1550 "BackgroundJob.c"
}
-static gchar* background_job_value_notification_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+background_job_value_notification_job_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
BackgroundJobNotificationJob ** object_p;
object_p = collect_values[0].v_pointer;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!object_p) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 1464 "BackgroundJob.c"
+#line 1566 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!value->data[0].v_pointer) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = NULL;
-#line 1470 "BackgroundJob.c"
+#line 1572 "BackgroundJob.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = value->data[0].v_pointer;
-#line 1474 "BackgroundJob.c"
+#line 1576 "BackgroundJob.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = background_job_notification_job_ref (value->data[0].v_pointer);
-#line 1478 "BackgroundJob.c"
+#line 1580 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 1482 "BackgroundJob.c"
+#line 1584 "BackgroundJob.c"
}
-static GParamSpec* background_job_param_spec_notification_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+static GParamSpec*
+background_job_param_spec_notification_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
BackgroundJobParamSpecNotificationJob* spec;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (g_type_is_a (object_type, BACKGROUND_JOB_TYPE_NOTIFICATION_JOB), NULL);
@@ -1492,20 +1600,25 @@ static GParamSpec* background_job_param_spec_notification_job (const gchar* name
G_PARAM_SPEC (spec)->value_type = object_type;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return G_PARAM_SPEC (spec);
-#line 1496 "BackgroundJob.c"
+#line 1604 "BackgroundJob.c"
}
-static gpointer background_job_value_get_notification_job (const GValue* value) {
+static gpointer
+background_job_value_get_notification_job (const GValue* value)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BACKGROUND_JOB_TYPE_NOTIFICATION_JOB), NULL);
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 1505 "BackgroundJob.c"
+#line 1615 "BackgroundJob.c"
}
-static void background_job_value_set_notification_job (GValue* value, gpointer v_object) {
+static void
+background_job_value_set_notification_job (GValue* value,
+ gpointer v_object)
+{
BackgroundJobNotificationJob * old;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BACKGROUND_JOB_TYPE_NOTIFICATION_JOB));
@@ -1521,22 +1634,25 @@ static void background_job_value_set_notification_job (GValue* value, gpointer v
value->data[0].v_pointer = v_object;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notification_job_ref (value->data[0].v_pointer);
-#line 1525 "BackgroundJob.c"
+#line 1638 "BackgroundJob.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1529 "BackgroundJob.c"
+#line 1642 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notification_job_unref (old);
-#line 1535 "BackgroundJob.c"
+#line 1648 "BackgroundJob.c"
}
}
-static void background_job_value_take_notification_job (GValue* value, gpointer v_object) {
+static void
+background_job_value_take_notification_job (GValue* value,
+ gpointer v_object)
+{
BackgroundJobNotificationJob * old;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BACKGROUND_JOB_TYPE_NOTIFICATION_JOB));
@@ -1550,38 +1666,44 @@ static void background_job_value_take_notification_job (GValue* value, gpointer
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = v_object;
-#line 1554 "BackgroundJob.c"
+#line 1670 "BackgroundJob.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1558 "BackgroundJob.c"
+#line 1674 "BackgroundJob.c"
}
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notification_job_unref (old);
-#line 1564 "BackgroundJob.c"
+#line 1680 "BackgroundJob.c"
}
}
-static void background_job_notification_job_class_init (BackgroundJobNotificationJobClass * klass) {
+static void
+background_job_notification_job_class_init (BackgroundJobNotificationJobClass * klass)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notification_job_parent_class = g_type_class_peek_parent (klass);
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
((BackgroundJobNotificationJobClass *) klass)->finalize = background_job_notification_job_finalize;
-#line 1574 "BackgroundJob.c"
+#line 1692 "BackgroundJob.c"
}
-static void background_job_notification_job_instance_init (BackgroundJobNotificationJob * self) {
+static void
+background_job_notification_job_instance_init (BackgroundJobNotificationJob * self)
+{
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->ref_count = 1;
-#line 1581 "BackgroundJob.c"
+#line 1701 "BackgroundJob.c"
}
-static void background_job_notification_job_finalize (BackgroundJobNotificationJob * obj) {
+static void
+background_job_notification_job_finalize (BackgroundJobNotificationJob * obj)
+{
BackgroundJobNotificationJob * self;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, BACKGROUND_JOB_TYPE_NOTIFICATION_JOB, BackgroundJobNotificationJob);
@@ -1591,11 +1713,13 @@ static void background_job_notification_job_finalize (BackgroundJobNotificationJ
_background_job_unref0 (self->background_job);
#line 86 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_notification_object_unref0 (self->user);
-#line 1595 "BackgroundJob.c"
+#line 1717 "BackgroundJob.c"
}
-static GType background_job_notification_job_get_type (void) {
+static GType
+background_job_notification_job_get_type (void)
+{
static volatile gsize background_job_notification_job_type_id__volatile = 0;
if (g_once_init_enter (&background_job_notification_job_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { background_job_value_notification_job_init, background_job_value_notification_job_free_value, background_job_value_notification_job_copy_value, background_job_value_notification_job_peek_pointer, "p", background_job_value_notification_job_collect_value, "p", background_job_value_notification_job_lcopy_value };
@@ -1609,18 +1733,22 @@ static GType background_job_notification_job_get_type (void) {
}
-static gpointer background_job_notification_job_ref (gpointer instance) {
+static gpointer
+background_job_notification_job_ref (gpointer instance)
+{
BackgroundJobNotificationJob * self;
self = instance;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_atomic_int_inc (&self->ref_count);
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return instance;
-#line 1620 "BackgroundJob.c"
+#line 1746 "BackgroundJob.c"
}
-static void background_job_notification_job_unref (gpointer instance) {
+static void
+background_job_notification_job_unref (gpointer instance)
+{
BackgroundJobNotificationJob * self;
self = instance;
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1629,109 +1757,134 @@ static void background_job_notification_job_unref (gpointer instance) {
BACKGROUND_JOB_NOTIFICATION_JOB_GET_CLASS (self)->finalize (self);
#line 83 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 1633 "BackgroundJob.c"
+#line 1761 "BackgroundJob.c"
}
}
-static void value_background_job_init (GValue* value) {
+static void
+value_background_job_init (GValue* value)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1641 "BackgroundJob.c"
+#line 1771 "BackgroundJob.c"
}
-static void value_background_job_free_value (GValue* value) {
+static void
+value_background_job_free_value (GValue* value)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (value->data[0].v_pointer) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_unref (value->data[0].v_pointer);
-#line 1650 "BackgroundJob.c"
+#line 1782 "BackgroundJob.c"
}
}
-static void value_background_job_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_background_job_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (src_value->data[0].v_pointer) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = background_job_ref (src_value->data[0].v_pointer);
-#line 1660 "BackgroundJob.c"
+#line 1795 "BackgroundJob.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
dest_value->data[0].v_pointer = NULL;
-#line 1664 "BackgroundJob.c"
+#line 1799 "BackgroundJob.c"
}
}
-static gpointer value_background_job_peek_pointer (const GValue* value) {
+static gpointer
+value_background_job_peek_pointer (const GValue* value)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 1672 "BackgroundJob.c"
+#line 1809 "BackgroundJob.c"
}
-static gchar* value_background_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_background_job_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (collect_values[0].v_pointer) {
-#line 1679 "BackgroundJob.c"
+#line 1821 "BackgroundJob.c"
BackgroundJob * object;
object = collect_values[0].v_pointer;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (object->parent_instance.g_class == NULL) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 1686 "BackgroundJob.c"
+#line 1828 "BackgroundJob.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.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 1690 "BackgroundJob.c"
+#line 1832 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = background_job_ref (object);
-#line 1694 "BackgroundJob.c"
+#line 1836 "BackgroundJob.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1698 "BackgroundJob.c"
+#line 1840 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 1702 "BackgroundJob.c"
+#line 1844 "BackgroundJob.c"
}
-static gchar* value_background_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_background_job_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
BackgroundJob ** object_p;
object_p = collect_values[0].v_pointer;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!object_p) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 1713 "BackgroundJob.c"
+#line 1860 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (!value->data[0].v_pointer) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = NULL;
-#line 1719 "BackgroundJob.c"
+#line 1866 "BackgroundJob.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = value->data[0].v_pointer;
-#line 1723 "BackgroundJob.c"
+#line 1870 "BackgroundJob.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
*object_p = background_job_ref (value->data[0].v_pointer);
-#line 1727 "BackgroundJob.c"
+#line 1874 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return NULL;
-#line 1731 "BackgroundJob.c"
+#line 1878 "BackgroundJob.c"
}
-GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_background_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecBackgroundJob* spec;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_BACKGROUND_JOB), NULL);
@@ -1741,20 +1894,25 @@ GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, con
G_PARAM_SPEC (spec)->value_type = object_type;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return G_PARAM_SPEC (spec);
-#line 1745 "BackgroundJob.c"
+#line 1898 "BackgroundJob.c"
}
-gpointer value_get_background_job (const GValue* value) {
+gpointer
+value_get_background_job (const GValue* value)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BACKGROUND_JOB), NULL);
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return value->data[0].v_pointer;
-#line 1754 "BackgroundJob.c"
+#line 1909 "BackgroundJob.c"
}
-void value_set_background_job (GValue* value, gpointer v_object) {
+void
+value_set_background_job (GValue* value,
+ gpointer v_object)
+{
BackgroundJob * old;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BACKGROUND_JOB));
@@ -1770,22 +1928,25 @@ void value_set_background_job (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_ref (value->data[0].v_pointer);
-#line 1774 "BackgroundJob.c"
+#line 1932 "BackgroundJob.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1778 "BackgroundJob.c"
+#line 1936 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_unref (old);
-#line 1784 "BackgroundJob.c"
+#line 1942 "BackgroundJob.c"
}
}
-void value_take_background_job (GValue* value, gpointer v_object) {
+void
+value_take_background_job (GValue* value,
+ gpointer v_object)
+{
BackgroundJob * old;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BACKGROUND_JOB));
@@ -1799,22 +1960,24 @@ void value_take_background_job (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = v_object;
-#line 1803 "BackgroundJob.c"
+#line 1964 "BackgroundJob.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
value->data[0].v_pointer = NULL;
-#line 1807 "BackgroundJob.c"
+#line 1968 "BackgroundJob.c"
}
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
if (old) {
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_unref (old);
-#line 1813 "BackgroundJob.c"
+#line 1974 "BackgroundJob.c"
}
}
-static void background_job_class_init (BackgroundJobClass * klass) {
+static void
+background_job_class_init (BackgroundJobClass * klass)
+{
GeeArrayList* _tmp0_;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_parent_class = g_type_class_peek_parent (klass);
@@ -1832,11 +1995,13 @@ static void background_job_class_init (BackgroundJobClass * klass) {
_tmp0_ = gee_array_list_new (BACKGROUND_JOB_TYPE_NOTIFICATION_JOB, (GBoxedCopyFunc) background_job_notification_job_ref, (GDestroyNotify) background_job_notification_job_unref, NULL, NULL, NULL);
#line 96 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
background_job_notify_queue = _tmp0_;
-#line 1836 "BackgroundJob.c"
+#line 1999 "BackgroundJob.c"
}
-static void background_job_instance_init (BackgroundJob * self) {
+static void
+background_job_instance_init (BackgroundJob * self)
+{
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->priv = BACKGROUND_JOB_GET_PRIVATE (self);
#line 102 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1849,11 +2014,13 @@ static void background_job_instance_init (BackgroundJob * self) {
self->priv->notification_priority = G_PRIORITY_DEFAULT_IDLE;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self->ref_count = 1;
-#line 1853 "BackgroundJob.c"
+#line 2018 "BackgroundJob.c"
}
-static void background_job_finalize (BackgroundJob * obj) {
+static void
+background_job_finalize (BackgroundJob * obj)
+{
BackgroundJob * self;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BACKGROUND_JOB, BackgroundJob);
@@ -1867,11 +2034,13 @@ static void background_job_finalize (BackgroundJob * obj) {
_background_job_unref0 (self->priv->self);
#line 103 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
_abstract_semaphore_unref0 (self->priv->semaphore);
-#line 1871 "BackgroundJob.c"
+#line 2038 "BackgroundJob.c"
}
-GType background_job_get_type (void) {
+GType
+background_job_get_type (void)
+{
static volatile gsize background_job_type_id__volatile = 0;
if (g_once_init_enter (&background_job_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_background_job_init, value_background_job_free_value, value_background_job_copy_value, value_background_job_peek_pointer, "p", value_background_job_collect_value, "p", value_background_job_lcopy_value };
@@ -1885,18 +2054,22 @@ GType background_job_get_type (void) {
}
-gpointer background_job_ref (gpointer instance) {
+gpointer
+background_job_ref (gpointer instance)
+{
BackgroundJob * self;
self = instance;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_atomic_int_inc (&self->ref_count);
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
return instance;
-#line 1896 "BackgroundJob.c"
+#line 2067 "BackgroundJob.c"
}
-void background_job_unref (gpointer instance) {
+void
+background_job_unref (gpointer instance)
+{
BackgroundJob * self;
self = instance;
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
@@ -1905,7 +2078,7 @@ void background_job_unref (gpointer instance) {
BACKGROUND_JOB_GET_CLASS (self)->finalize (self);
#line 65 "/home/jens/Source/shotwell/src/threads/BackgroundJob.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 1909 "BackgroundJob.c"
+#line 2082 "BackgroundJob.c"
}
}
diff --git a/src/threads/Semaphore.c b/src/threads/Semaphore.c
index c93420b..0d5bd4d 100644
--- a/src/threads/Semaphore.c
+++ b/src/threads/Semaphore.c
@@ -1,4 +1,4 @@
-/* Semaphore.c generated by valac 0.36.6, the Vala compiler
+/* Semaphore.c generated by valac 0.40.4, the Vala compiler
* generated from Semaphore.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -10,6 +10,7 @@
/* mechanism (essentially, a blocking mechanism) to the system of callbacks that BackgroundJob*/
/* offers. They can also be used for other job-dependent notification mechanisms.*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -159,19 +160,23 @@ static gpointer event_semaphore_parent_class = NULL;
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_abstract_semaphore (GValue* value, gpointer v_object);
-void value_take_abstract_semaphore (GValue* value, gpointer v_object);
+GParamSpec* param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_abstract_semaphore (GValue* value,
+ gpointer v_object);
+void value_take_abstract_semaphore (GValue* value,
+ gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_notify_action_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_wait_action_get_type (void) G_GNUC_CONST;
GType abstract_semaphore_type_get_type (void) G_GNUC_CONST;
#define ABSTRACT_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphorePrivate))
-enum {
- ABSTRACT_SEMAPHORE_DUMMY_PROPERTY
-};
-AbstractSemaphore* abstract_semaphore_construct (GType object_type, AbstractSemaphoreType type);
+AbstractSemaphore* abstract_semaphore_construct (GType object_type,
+ AbstractSemaphoreType type);
static void abstract_semaphore_trigger (AbstractSemaphore* self);
void abstract_semaphore_notify (AbstractSemaphore* self);
AbstractSemaphoreNotifyAction abstract_semaphore_do_notify (AbstractSemaphore* self);
@@ -186,9 +191,6 @@ static gboolean abstract_semaphore_real_do_reset (AbstractSemaphore* self);
static void abstract_semaphore_finalize (AbstractSemaphore * obj);
GType semaphore_get_type (void) G_GNUC_CONST;
#define SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SEMAPHORE, SemaphorePrivate))
-enum {
- SEMAPHORE_DUMMY_PROPERTY
-};
Semaphore* semaphore_new (void);
Semaphore* semaphore_construct (GType object_type);
static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore* base);
@@ -196,19 +198,14 @@ static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* ba
static void semaphore_finalize (AbstractSemaphore * obj);
GType countdown_semaphore_get_type (void) G_GNUC_CONST;
#define COUNTDOWN_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_COUNTDOWN_SEMAPHORE, CountdownSemaphorePrivate))
-enum {
- COUNTDOWN_SEMAPHORE_DUMMY_PROPERTY
-};
CountdownSemaphore* countdown_semaphore_new (gint total);
-CountdownSemaphore* countdown_semaphore_construct (GType object_type, gint total);
+CountdownSemaphore* countdown_semaphore_construct (GType object_type,
+ gint total);
static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (AbstractSemaphore* base);
static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSemaphore* base);
static void countdown_semaphore_finalize (AbstractSemaphore * obj);
GType event_semaphore_get_type (void) G_GNUC_CONST;
#define EVENT_SEMAPHORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EVENT_SEMAPHORE, EventSemaphorePrivate))
-enum {
- EVENT_SEMAPHORE_DUMMY_PROPERTY
-};
EventSemaphore* event_semaphore_new (void);
EventSemaphore* event_semaphore_construct (GType object_type);
static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSemaphore* base);
@@ -221,7 +218,9 @@ static void _vala_clear_GRWLock (GRWLock * mutex);
static void _vala_clear_GCond (GCond * mutex);
-GType abstract_semaphore_type_get_type (void) {
+GType
+abstract_semaphore_type_get_type (void)
+{
static volatile gsize abstract_semaphore_type_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_type_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_TYPE_SERIAL, "ABSTRACT_SEMAPHORE_TYPE_SERIAL", "serial"}, {ABSTRACT_SEMAPHORE_TYPE_BROADCAST, "ABSTRACT_SEMAPHORE_TYPE_BROADCAST", "broadcast"}, {0, NULL, NULL}};
@@ -233,7 +232,9 @@ GType abstract_semaphore_type_get_type (void) {
}
-GType abstract_semaphore_notify_action_get_type (void) {
+GType
+abstract_semaphore_notify_action_get_type (void)
+{
static volatile gsize abstract_semaphore_notify_action_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_notify_action_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE, "ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE", "none"}, {ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL, "ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL", "signal"}, {0, NULL, NULL}};
@@ -245,7 +246,9 @@ GType abstract_semaphore_notify_action_get_type (void) {
}
-GType abstract_semaphore_wait_action_get_type (void) {
+GType
+abstract_semaphore_wait_action_get_type (void)
+{
static volatile gsize abstract_semaphore_wait_action_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_wait_action_type_id__volatile)) {
static const GEnumValue values[] = {{ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP, "ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP", "sleep"}, {ABSTRACT_SEMAPHORE_WAIT_ACTION_READY, "ABSTRACT_SEMAPHORE_WAIT_ACTION_READY", "ready"}, {0, NULL, NULL}};
@@ -257,41 +260,37 @@ GType abstract_semaphore_wait_action_get_type (void) {
}
-AbstractSemaphore* abstract_semaphore_construct (GType object_type, AbstractSemaphoreType type) {
+AbstractSemaphore*
+abstract_semaphore_construct (GType object_type,
+ AbstractSemaphoreType type)
+{
AbstractSemaphore* self = NULL;
gboolean _tmp0_ = FALSE;
- AbstractSemaphoreType _tmp1_;
- AbstractSemaphoreType _tmp3_;
#line 30 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (AbstractSemaphore*) g_type_create_instance (object_type);
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp1_ = type;
-#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- if (_tmp1_ == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
+ if (type == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = TRUE;
-#line 274 "Semaphore.c"
+#line 276 "Semaphore.c"
} else {
- AbstractSemaphoreType _tmp2_;
-#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp2_ = type;
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = _tmp2_ == ABSTRACT_SEMAPHORE_TYPE_BROADCAST;
-#line 281 "Semaphore.c"
+ _tmp0_ = type == ABSTRACT_SEMAPHORE_TYPE_BROADCAST;
+#line 280 "Semaphore.c"
}
#line 31 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_vala_assert (_tmp0_, "type == Type.SERIAL || type == Type.BROADCAST");
#line 33 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp3_ = type;
-#line 33 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- self->priv->type = _tmp3_;
+ self->priv->type = type;
#line 30 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 291 "Semaphore.c"
+#line 288 "Semaphore.c"
}
-static void abstract_semaphore_trigger (AbstractSemaphore* self) {
+static void
+abstract_semaphore_trigger (AbstractSemaphore* self)
+{
AbstractSemaphoreType _tmp0_;
#line 36 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
@@ -301,69 +300,70 @@ static void abstract_semaphore_trigger (AbstractSemaphore* self) {
if (_tmp0_ == ABSTRACT_SEMAPHORE_TYPE_SERIAL) {
#line 38 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_cond_signal (&self->priv->monitor);
-#line 305 "Semaphore.c"
+#line 304 "Semaphore.c"
} else {
#line 40 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_cond_broadcast (&self->priv->monitor);
-#line 309 "Semaphore.c"
+#line 308 "Semaphore.c"
}
}
-void abstract_semaphore_notify (AbstractSemaphore* self) {
+void
+abstract_semaphore_notify (AbstractSemaphore* self)
+{
AbstractSemaphoreNotifyAction action = 0;
AbstractSemaphoreNotifyAction _tmp0_;
- AbstractSemaphoreNotifyAction _tmp1_;
#line 43 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
#line 44 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 46 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_notify (self);
-#line 46 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- action = _tmp0_;
+ action = abstract_semaphore_do_notify (self);
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp1_ = action;
+ _tmp0_ = action;
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- switch (_tmp1_) {
+ switch (_tmp0_) {
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
case ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE:
-#line 332 "Semaphore.c"
+#line 330 "Semaphore.c"
{
#line 50 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
-#line 336 "Semaphore.c"
+#line 334 "Semaphore.c"
}
#line 47 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
case ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL:
-#line 340 "Semaphore.c"
+#line 338 "Semaphore.c"
{
#line 53 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_trigger (self);
#line 54 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
-#line 346 "Semaphore.c"
+#line 344 "Semaphore.c"
}
default:
{
- AbstractSemaphoreNotifyAction _tmp2_;
- GEnumValue* _tmp3_;
+ AbstractSemaphoreNotifyAction _tmp1_;
+ GEnumValue* _tmp2_;
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp2_ = action;
+ _tmp1_ = action;
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp3_ = g_enum_get_value (g_type_class_ref (ABSTRACT_SEMAPHORE_TYPE_NOTIFY_ACTION), _tmp2_);
+ _tmp2_ = g_enum_get_value (g_type_class_ref (ABSTRACT_SEMAPHORE_TYPE_NOTIFY_ACTION), _tmp1_);
#line 57 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- g_error ("Semaphore.vala:57: Unknown semaphore action: %s", (_tmp3_ != NULL) ? _tmp3_->value_name : NULL);
-#line 358 "Semaphore.c"
+ g_error ("Semaphore.vala:57: Unknown semaphore action: %s", (_tmp2_ != NULL) ? _tmp2_->value_name : NULL);
+#line 356 "Semaphore.c"
}
}
#line 60 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_unlock (&self->priv->mutex);
-#line 363 "Semaphore.c"
+#line 361 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction abstract_semaphore_real_do_notify (AbstractSemaphore* self) {
+static AbstractSemaphoreNotifyAction
+abstract_semaphore_real_do_notify (AbstractSemaphore* self)
+{
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Type `%s' does not implement abstract method `abstract_semaphore_do_notify'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -372,28 +372,28 @@ static AbstractSemaphoreNotifyAction abstract_semaphore_real_do_notify (Abstract
}
-AbstractSemaphoreNotifyAction abstract_semaphore_do_notify (AbstractSemaphore* self) {
+AbstractSemaphoreNotifyAction
+abstract_semaphore_do_notify (AbstractSemaphore* self)
+{
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), 0);
#line 64 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_notify (self);
-#line 381 "Semaphore.c"
+#line 383 "Semaphore.c"
}
-void abstract_semaphore_wait (AbstractSemaphore* self) {
+void
+abstract_semaphore_wait (AbstractSemaphore* self)
+{
#line 66 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (IS_ABSTRACT_SEMAPHORE (self));
#line 67 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
while (TRUE) {
-#line 392 "Semaphore.c"
- AbstractSemaphoreWaitAction _tmp0_;
-#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_wait (self);
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- if (!(_tmp0_ == ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP)) {
+ if (!(abstract_semaphore_do_wait (self) == ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP)) {
#line 69 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
break;
#line 400 "Semaphore.c"
@@ -408,163 +408,195 @@ void abstract_semaphore_wait (AbstractSemaphore* self) {
}
-static AbstractSemaphoreWaitAction abstract_semaphore_real_do_wait (AbstractSemaphore* self) {
+static AbstractSemaphoreWaitAction
+abstract_semaphore_real_do_wait (AbstractSemaphore* self)
+{
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Type `%s' does not implement abstract method `abstract_semaphore_do_wait'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return 0;
-#line 417 "Semaphore.c"
+#line 419 "Semaphore.c"
}
-AbstractSemaphoreWaitAction abstract_semaphore_do_wait (AbstractSemaphore* self) {
+AbstractSemaphoreWaitAction
+abstract_semaphore_do_wait (AbstractSemaphore* self)
+{
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), 0);
#line 76 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_wait (self);
-#line 426 "Semaphore.c"
+#line 430 "Semaphore.c"
}
-gboolean abstract_semaphore_reset (AbstractSemaphore* self) {
+gboolean
+abstract_semaphore_reset (AbstractSemaphore* self)
+{
gboolean result = FALSE;
gboolean is_reset = FALSE;
- gboolean _tmp0_;
#line 79 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), FALSE);
#line 80 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_lock (&self->priv->mutex);
#line 81 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = abstract_semaphore_do_reset (self);
-#line 81 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- is_reset = _tmp0_;
+ is_reset = abstract_semaphore_do_reset (self);
#line 82 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_mutex_unlock (&self->priv->mutex);
#line 84 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = is_reset;
#line 84 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 448 "Semaphore.c"
+#line 451 "Semaphore.c"
}
-static gboolean abstract_semaphore_real_do_reset (AbstractSemaphore* self) {
+static gboolean
+abstract_semaphore_real_do_reset (AbstractSemaphore* self)
+{
gboolean result = FALSE;
#line 90 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = FALSE;
#line 90 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 458 "Semaphore.c"
+#line 463 "Semaphore.c"
}
-gboolean abstract_semaphore_do_reset (AbstractSemaphore* self) {
+gboolean
+abstract_semaphore_do_reset (AbstractSemaphore* self)
+{
#line 89 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (IS_ABSTRACT_SEMAPHORE (self), FALSE);
#line 89 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return ABSTRACT_SEMAPHORE_GET_CLASS (self)->do_reset (self);
-#line 467 "Semaphore.c"
+#line 474 "Semaphore.c"
}
-static void value_abstract_semaphore_init (GValue* value) {
+static void
+value_abstract_semaphore_init (GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 474 "Semaphore.c"
+#line 483 "Semaphore.c"
}
-static void value_abstract_semaphore_free_value (GValue* value) {
+static void
+value_abstract_semaphore_free_value (GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (value->data[0].v_pointer);
-#line 483 "Semaphore.c"
+#line 494 "Semaphore.c"
}
}
-static void value_abstract_semaphore_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_abstract_semaphore_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (src_value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
dest_value->data[0].v_pointer = abstract_semaphore_ref (src_value->data[0].v_pointer);
-#line 493 "Semaphore.c"
+#line 507 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
dest_value->data[0].v_pointer = NULL;
-#line 497 "Semaphore.c"
+#line 511 "Semaphore.c"
}
}
-static gpointer value_abstract_semaphore_peek_pointer (const GValue* value) {
+static gpointer
+value_abstract_semaphore_peek_pointer (const GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return value->data[0].v_pointer;
-#line 505 "Semaphore.c"
+#line 521 "Semaphore.c"
}
-static gchar* value_abstract_semaphore_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_abstract_semaphore_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (collect_values[0].v_pointer) {
-#line 512 "Semaphore.c"
+#line 533 "Semaphore.c"
AbstractSemaphore * object;
object = collect_values[0].v_pointer;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (object->parent_instance.g_class == NULL) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 519 "Semaphore.c"
+#line 540 "Semaphore.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.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 523 "Semaphore.c"
+#line 544 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = abstract_semaphore_ref (object);
-#line 527 "Semaphore.c"
+#line 548 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 531 "Semaphore.c"
+#line 552 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return NULL;
-#line 535 "Semaphore.c"
+#line 556 "Semaphore.c"
}
-static gchar* value_abstract_semaphore_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_abstract_semaphore_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
AbstractSemaphore ** object_p;
object_p = collect_values[0].v_pointer;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (!object_p) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 546 "Semaphore.c"
+#line 572 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (!value->data[0].v_pointer) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = NULL;
-#line 552 "Semaphore.c"
+#line 578 "Semaphore.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = value->data[0].v_pointer;
-#line 556 "Semaphore.c"
+#line 582 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
*object_p = abstract_semaphore_ref (value->data[0].v_pointer);
-#line 560 "Semaphore.c"
+#line 586 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return NULL;
-#line 564 "Semaphore.c"
+#line 590 "Semaphore.c"
}
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecAbstractSemaphore* spec;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_ABSTRACT_SEMAPHORE), NULL);
@@ -574,20 +606,25 @@ GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick,
G_PARAM_SPEC (spec)->value_type = object_type;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return G_PARAM_SPEC (spec);
-#line 578 "Semaphore.c"
+#line 610 "Semaphore.c"
}
-gpointer value_get_abstract_semaphore (const GValue* value) {
+gpointer
+value_get_abstract_semaphore (const GValue* value)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE), NULL);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return value->data[0].v_pointer;
-#line 587 "Semaphore.c"
+#line 621 "Semaphore.c"
}
-void value_set_abstract_semaphore (GValue* value, gpointer v_object) {
+void
+value_set_abstract_semaphore (GValue* value,
+ gpointer v_object)
+{
AbstractSemaphore * old;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE));
@@ -603,22 +640,25 @@ void value_set_abstract_semaphore (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_ref (value->data[0].v_pointer);
-#line 607 "Semaphore.c"
+#line 644 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 611 "Semaphore.c"
+#line 648 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (old) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (old);
-#line 617 "Semaphore.c"
+#line 654 "Semaphore.c"
}
}
-void value_take_abstract_semaphore (GValue* value, gpointer v_object) {
+void
+value_take_abstract_semaphore (GValue* value,
+ gpointer v_object)
+{
AbstractSemaphore * old;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ABSTRACT_SEMAPHORE));
@@ -632,22 +672,24 @@ void value_take_abstract_semaphore (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = v_object;
-#line 636 "Semaphore.c"
+#line 676 "Semaphore.c"
} else {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
value->data[0].v_pointer = NULL;
-#line 640 "Semaphore.c"
+#line 680 "Semaphore.c"
}
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (old) {
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_unref (old);
-#line 646 "Semaphore.c"
+#line 686 "Semaphore.c"
}
}
-static void abstract_semaphore_class_init (AbstractSemaphoreClass * klass) {
+static void
+abstract_semaphore_class_init (AbstractSemaphoreClass * klass)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
abstract_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -660,11 +702,13 @@ static void abstract_semaphore_class_init (AbstractSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) abstract_semaphore_real_do_wait;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_reset = (gboolean (*) (AbstractSemaphore *)) abstract_semaphore_real_do_reset;
-#line 664 "Semaphore.c"
+#line 706 "Semaphore.c"
}
-static void abstract_semaphore_instance_init (AbstractSemaphore * self) {
+static void
+abstract_semaphore_instance_init (AbstractSemaphore * self)
+{
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = ABSTRACT_SEMAPHORE_GET_PRIVATE (self);
#line 27 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -673,11 +717,13 @@ static void abstract_semaphore_instance_init (AbstractSemaphore * self) {
g_cond_init (&self->priv->monitor);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->ref_count = 1;
-#line 677 "Semaphore.c"
+#line 721 "Semaphore.c"
}
-static void abstract_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+abstract_semaphore_finalize (AbstractSemaphore * obj)
+{
AbstractSemaphore * self;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore);
@@ -687,11 +733,13 @@ static void abstract_semaphore_finalize (AbstractSemaphore * obj) {
_vala_clear_GMutex (&self->priv->mutex);
#line 28 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_vala_clear_GCond (&self->priv->monitor);
-#line 691 "Semaphore.c"
+#line 737 "Semaphore.c"
}
-GType abstract_semaphore_get_type (void) {
+GType
+abstract_semaphore_get_type (void)
+{
static volatile gsize abstract_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&abstract_semaphore_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_abstract_semaphore_init, value_abstract_semaphore_free_value, value_abstract_semaphore_copy_value, value_abstract_semaphore_peek_pointer, "p", value_abstract_semaphore_collect_value, "p", value_abstract_semaphore_lcopy_value };
@@ -705,18 +753,22 @@ GType abstract_semaphore_get_type (void) {
}
-gpointer abstract_semaphore_ref (gpointer instance) {
+gpointer
+abstract_semaphore_ref (gpointer instance)
+{
AbstractSemaphore * self;
self = instance;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_atomic_int_inc (&self->ref_count);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return instance;
-#line 716 "Semaphore.c"
+#line 766 "Semaphore.c"
}
-void abstract_semaphore_unref (gpointer instance) {
+void
+abstract_semaphore_unref (gpointer instance)
+{
AbstractSemaphore * self;
self = instance;
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -725,29 +777,35 @@ void abstract_semaphore_unref (gpointer instance) {
ABSTRACT_SEMAPHORE_GET_CLASS (self)->finalize (self);
#line 10 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 729 "Semaphore.c"
+#line 781 "Semaphore.c"
}
}
-Semaphore* semaphore_construct (GType object_type) {
+Semaphore*
+semaphore_construct (GType object_type)
+{
Semaphore* self = NULL;
#line 98 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (Semaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 97 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 740 "Semaphore.c"
+#line 794 "Semaphore.c"
}
-Semaphore* semaphore_new (void) {
+Semaphore*
+semaphore_new (void)
+{
#line 97 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return semaphore_construct (TYPE_SEMAPHORE);
-#line 747 "Semaphore.c"
+#line 803 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+semaphore_real_do_notify (AbstractSemaphore* base)
+{
Semaphore * self;
AbstractSemaphoreNotifyAction result = 0;
gboolean _tmp0_;
@@ -761,7 +819,7 @@ static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE;
#line 103 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 765 "Semaphore.c"
+#line 823 "Semaphore.c"
}
#line 105 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = TRUE;
@@ -769,11 +827,13 @@ static AbstractSemaphoreNotifyAction semaphore_real_do_notify (AbstractSemaphore
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
#line 107 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 773 "Semaphore.c"
+#line 831 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+semaphore_real_do_wait (AbstractSemaphore* base)
+{
Semaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -786,21 +846,23 @@ static AbstractSemaphoreWaitAction semaphore_real_do_wait (AbstractSemaphore* ba
if (_tmp1_) {
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 790 "Semaphore.c"
+#line 850 "Semaphore.c"
} else {
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 794 "Semaphore.c"
+#line 854 "Semaphore.c"
}
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 111 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 800 "Semaphore.c"
+#line 860 "Semaphore.c"
}
-static void semaphore_class_init (SemaphoreClass * klass) {
+static void
+semaphore_class_init (SemaphoreClass * klass)
+{
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
semaphore_parent_class = g_type_class_peek_parent (klass);
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -811,30 +873,36 @@ static void semaphore_class_init (SemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_notify = (AbstractSemaphoreNotifyAction (*) (AbstractSemaphore *)) semaphore_real_do_notify;
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) semaphore_real_do_wait;
-#line 815 "Semaphore.c"
+#line 877 "Semaphore.c"
}
-static void semaphore_instance_init (Semaphore * self) {
+static void
+semaphore_instance_init (Semaphore * self)
+{
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = SEMAPHORE_GET_PRIVATE (self);
#line 95 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = FALSE;
-#line 824 "Semaphore.c"
+#line 888 "Semaphore.c"
}
-static void semaphore_finalize (AbstractSemaphore * obj) {
+static void
+semaphore_finalize (AbstractSemaphore * obj)
+{
Semaphore * self;
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SEMAPHORE, Semaphore);
#line 94 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (semaphore_parent_class)->finalize (obj);
-#line 834 "Semaphore.c"
+#line 900 "Semaphore.c"
}
-GType semaphore_get_type (void) {
+GType
+semaphore_get_type (void)
+{
static volatile gsize semaphore_type_id__volatile = 0;
if (g_once_init_enter (&semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Semaphore), 0, (GInstanceInitFunc) semaphore_instance_init, NULL };
@@ -846,29 +914,33 @@ GType semaphore_get_type (void) {
}
-CountdownSemaphore* countdown_semaphore_construct (GType object_type, gint total) {
+CountdownSemaphore*
+countdown_semaphore_construct (GType object_type,
+ gint total)
+{
CountdownSemaphore* self = NULL;
- gint _tmp0_;
#line 120 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (CountdownSemaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 122 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- _tmp0_ = total;
-#line 122 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
- self->priv->total = _tmp0_;
+ self->priv->total = total;
#line 119 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 861 "Semaphore.c"
+#line 929 "Semaphore.c"
}
-CountdownSemaphore* countdown_semaphore_new (gint total) {
+CountdownSemaphore*
+countdown_semaphore_new (gint total)
+{
#line 119 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return countdown_semaphore_construct (TYPE_COUNTDOWN_SEMAPHORE, total);
-#line 868 "Semaphore.c"
+#line 938 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+countdown_semaphore_real_do_notify (AbstractSemaphore* base)
+{
CountdownSemaphore * self;
AbstractSemaphoreNotifyAction result = 0;
gint _tmp0_;
@@ -885,7 +957,7 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
_tmp1_ = self->priv->total;
#line 126 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
if (_tmp0_ >= _tmp1_) {
-#line 889 "Semaphore.c"
+#line 961 "Semaphore.c"
gint _tmp2_;
gint _tmp3_;
#line 127 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -894,7 +966,7 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
_tmp3_ = self->priv->total;
#line 127 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
g_critical ("Semaphore.vala:127: CountdownSemaphore overrun: %d/%d", _tmp2_ + 1, _tmp3_);
-#line 898 "Semaphore.c"
+#line 970 "Semaphore.c"
}
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp5_ = self->priv->passed;
@@ -908,21 +980,23 @@ static AbstractSemaphoreNotifyAction countdown_semaphore_real_do_notify (Abstrac
if (_tmp6_ >= _tmp7_) {
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp4_ = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
-#line 912 "Semaphore.c"
+#line 984 "Semaphore.c"
} else {
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp4_ = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_NONE;
-#line 916 "Semaphore.c"
+#line 988 "Semaphore.c"
}
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp4_;
#line 129 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 922 "Semaphore.c"
+#line 994 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+countdown_semaphore_real_do_wait (AbstractSemaphore* base)
+{
CountdownSemaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -938,21 +1012,23 @@ static AbstractSemaphoreWaitAction countdown_semaphore_real_do_wait (AbstractSem
if (_tmp1_ < _tmp2_) {
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 942 "Semaphore.c"
+#line 1016 "Semaphore.c"
} else {
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 946 "Semaphore.c"
+#line 1020 "Semaphore.c"
}
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 133 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 952 "Semaphore.c"
+#line 1026 "Semaphore.c"
}
-static void countdown_semaphore_class_init (CountdownSemaphoreClass * klass) {
+static void
+countdown_semaphore_class_init (CountdownSemaphoreClass * klass)
+{
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
countdown_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -963,30 +1039,36 @@ static void countdown_semaphore_class_init (CountdownSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_notify = (AbstractSemaphoreNotifyAction (*) (AbstractSemaphore *)) countdown_semaphore_real_do_notify;
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) countdown_semaphore_real_do_wait;
-#line 967 "Semaphore.c"
+#line 1043 "Semaphore.c"
}
-static void countdown_semaphore_instance_init (CountdownSemaphore * self) {
+static void
+countdown_semaphore_instance_init (CountdownSemaphore * self)
+{
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = COUNTDOWN_SEMAPHORE_GET_PRIVATE (self);
#line 117 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->passed = 0;
-#line 976 "Semaphore.c"
+#line 1054 "Semaphore.c"
}
-static void countdown_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+countdown_semaphore_finalize (AbstractSemaphore * obj)
+{
CountdownSemaphore * self;
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COUNTDOWN_SEMAPHORE, CountdownSemaphore);
#line 115 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (countdown_semaphore_parent_class)->finalize (obj);
-#line 986 "Semaphore.c"
+#line 1066 "Semaphore.c"
}
-GType countdown_semaphore_get_type (void) {
+GType
+countdown_semaphore_get_type (void)
+{
static volatile gsize countdown_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&countdown_semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CountdownSemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) countdown_semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CountdownSemaphore), 0, (GInstanceInitFunc) countdown_semaphore_instance_init, NULL };
@@ -998,24 +1080,30 @@ GType countdown_semaphore_get_type (void) {
}
-EventSemaphore* event_semaphore_construct (GType object_type) {
+EventSemaphore*
+event_semaphore_construct (GType object_type)
+{
EventSemaphore* self = NULL;
#line 141 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = (EventSemaphore*) abstract_semaphore_construct (object_type, ABSTRACT_SEMAPHORE_TYPE_BROADCAST);
#line 140 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return self;
-#line 1008 "Semaphore.c"
+#line 1092 "Semaphore.c"
}
-EventSemaphore* event_semaphore_new (void) {
+EventSemaphore*
+event_semaphore_new (void)
+{
#line 140 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return event_semaphore_construct (TYPE_EVENT_SEMAPHORE);
-#line 1015 "Semaphore.c"
+#line 1101 "Semaphore.c"
}
-static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSemaphore* base) {
+static AbstractSemaphoreNotifyAction
+event_semaphore_real_do_notify (AbstractSemaphore* base)
+{
EventSemaphore * self;
AbstractSemaphoreNotifyAction result = 0;
#line 144 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1026,11 +1114,13 @@ static AbstractSemaphoreNotifyAction event_semaphore_real_do_notify (AbstractSem
result = ABSTRACT_SEMAPHORE_NOTIFY_ACTION_SIGNAL;
#line 147 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1030 "Semaphore.c"
+#line 1118 "Semaphore.c"
}
-static AbstractSemaphoreWaitAction event_semaphore_real_do_wait (AbstractSemaphore* base) {
+static AbstractSemaphoreWaitAction
+event_semaphore_real_do_wait (AbstractSemaphore* base)
+{
EventSemaphore * self;
AbstractSemaphoreWaitAction result = 0;
AbstractSemaphoreWaitAction _tmp0_ = 0;
@@ -1043,21 +1133,23 @@ static AbstractSemaphoreWaitAction event_semaphore_real_do_wait (AbstractSemapho
if (_tmp1_) {
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_READY;
-#line 1047 "Semaphore.c"
+#line 1137 "Semaphore.c"
} else {
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
_tmp0_ = ABSTRACT_SEMAPHORE_WAIT_ACTION_SLEEP;
-#line 1051 "Semaphore.c"
+#line 1141 "Semaphore.c"
}
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
result = _tmp0_;
#line 151 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1057 "Semaphore.c"
+#line 1147 "Semaphore.c"
}
-static gboolean event_semaphore_real_do_reset (AbstractSemaphore* base) {
+static gboolean
+event_semaphore_real_do_reset (AbstractSemaphore* base)
+{
EventSemaphore * self;
gboolean result = FALSE;
#line 154 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1068,11 +1160,13 @@ static gboolean event_semaphore_real_do_reset (AbstractSemaphore* base) {
result = TRUE;
#line 157 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
return result;
-#line 1072 "Semaphore.c"
+#line 1164 "Semaphore.c"
}
-static void event_semaphore_class_init (EventSemaphoreClass * klass) {
+static void
+event_semaphore_class_init (EventSemaphoreClass * klass)
+{
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
event_semaphore_parent_class = g_type_class_peek_parent (klass);
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
@@ -1085,30 +1179,36 @@ static void event_semaphore_class_init (EventSemaphoreClass * klass) {
((AbstractSemaphoreClass *) klass)->do_wait = (AbstractSemaphoreWaitAction (*) (AbstractSemaphore *)) event_semaphore_real_do_wait;
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
((AbstractSemaphoreClass *) klass)->do_reset = (gboolean (*) (AbstractSemaphore *)) event_semaphore_real_do_reset;
-#line 1089 "Semaphore.c"
+#line 1183 "Semaphore.c"
}
-static void event_semaphore_instance_init (EventSemaphore * self) {
+static void
+event_semaphore_instance_init (EventSemaphore * self)
+{
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv = EVENT_SEMAPHORE_GET_PRIVATE (self);
#line 138 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self->priv->fired = FALSE;
-#line 1098 "Semaphore.c"
+#line 1194 "Semaphore.c"
}
-static void event_semaphore_finalize (AbstractSemaphore * obj) {
+static void
+event_semaphore_finalize (AbstractSemaphore * obj)
+{
EventSemaphore * self;
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT_SEMAPHORE, EventSemaphore);
#line 137 "/home/jens/Source/shotwell/src/threads/Semaphore.vala"
ABSTRACT_SEMAPHORE_CLASS (event_semaphore_parent_class)->finalize (obj);
-#line 1108 "Semaphore.c"
+#line 1206 "Semaphore.c"
}
-GType event_semaphore_get_type (void) {
+GType
+event_semaphore_get_type (void)
+{
static volatile gsize event_semaphore_type_id__volatile = 0;
if (g_once_init_enter (&event_semaphore_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (EventSemaphoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_semaphore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventSemaphore), 0, (GInstanceInitFunc) event_semaphore_instance_init, NULL };
@@ -1120,7 +1220,9 @@ GType event_semaphore_get_type (void) {
}
-static void _vala_clear_GMutex (GMutex * mutex) {
+static void
+_vala_clear_GMutex (GMutex * mutex)
+{
GMutex zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GMutex))) {
g_mutex_clear (mutex);
@@ -1129,7 +1231,9 @@ static void _vala_clear_GMutex (GMutex * mutex) {
}
-static void _vala_clear_GRecMutex (GRecMutex * mutex) {
+static void
+_vala_clear_GRecMutex (GRecMutex * mutex)
+{
GRecMutex zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GRecMutex))) {
g_rec_mutex_clear (mutex);
@@ -1138,7 +1242,9 @@ static void _vala_clear_GRecMutex (GRecMutex * mutex) {
}
-static void _vala_clear_GRWLock (GRWLock * mutex) {
+static void
+_vala_clear_GRWLock (GRWLock * mutex)
+{
GRWLock zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GRWLock))) {
g_rw_lock_clear (mutex);
@@ -1147,7 +1253,9 @@ static void _vala_clear_GRWLock (GRWLock * mutex) {
}
-static void _vala_clear_GCond (GCond * mutex) {
+static void
+_vala_clear_GCond (GCond * mutex)
+{
GCond zero_mutex = { 0 };
if (memcmp (mutex, &zero_mutex, sizeof (GCond))) {
g_cond_clear (mutex);
diff --git a/src/threads/Threads.c b/src/threads/Threads.c
index 04aae36..369492b 100644
--- a/src/threads/Threads.c
+++ b/src/threads/Threads.c
@@ -1,4 +1,4 @@
-/* Threads.c generated by valac 0.36.6, the Vala compiler
+/* Threads.c generated by valac 0.40.4, the Vala compiler
* generated from Threads.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>
@@ -17,11 +18,15 @@ void threads_init (GError** error);
void threads_terminate (void);
-void threads_init (GError** error) {
+void
+threads_init (GError** error)
+{
}
-void threads_terminate (void) {
+void
+threads_terminate (void)
+{
}
diff --git a/src/threads/Workers.c b/src/threads/Workers.c
index 0391730..4f250d1 100644
--- a/src/threads/Workers.c
+++ b/src/threads/Workers.c
@@ -1,4 +1,4 @@
-/* Workers.c generated by valac 0.36.6, the Vala compiler
+/* Workers.c generated by valac 0.40.4, the Vala compiler
* generated from Workers.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <gee.h>
@@ -34,6 +35,11 @@ typedef struct _SortedListPrivate SortedListPrivate;
typedef struct _BackgroundJobBatch BackgroundJobBatch;
typedef struct _BackgroundJobBatchClass BackgroundJobBatchClass;
typedef struct _BackgroundJobBatchPrivate BackgroundJobBatchPrivate;
+enum {
+ BACKGROUND_JOB_BATCH_0_PROPERTY,
+ BACKGROUND_JOB_BATCH_NUM_PROPERTIES
+};
+static GParamSpec* background_job_batch_properties[BACKGROUND_JOB_BATCH_NUM_PROPERTIES];
#define TYPE_BACKGROUND_JOB (background_job_get_type ())
#define BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_JOB, BackgroundJob))
@@ -135,57 +141,92 @@ static gpointer workers_parent_class = NULL;
GType sorted_list_get_type (void) G_GNUC_CONST;
GType background_job_batch_get_type (void) G_GNUC_CONST;
-enum {
- BACKGROUND_JOB_BATCH_DUMMY_PROPERTY
-};
BackgroundJobBatch* background_job_batch_new (void);
BackgroundJobBatch* background_job_batch_construct (GType object_type);
-gint64 background_job_priority_comparator (void* a, void* b);
-static gint64 _background_job_priority_comparator_comparator (void* a, void* b, gpointer self);
-SortedList* sorted_list_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, Comparator cmp, void* cmp_target);
-SortedList* sorted_list_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, Comparator cmp, void* cmp_target);
+gint64 background_job_priority_comparator (void* a,
+ void* b);
+static gint64 _background_job_priority_comparator_comparator (void* a,
+ void* b,
+ gpointer self);
+SortedList* sorted_list_new (GType g_type,
+ GBoxedCopyFunc g_dup_func,
+ GDestroyNotify g_destroy_func,
+ Comparator cmp,
+ void* cmp_target);
+SortedList* sorted_list_construct (GType object_type,
+ GType g_type,
+ GBoxedCopyFunc g_dup_func,
+ GDestroyNotify g_destroy_func,
+ Comparator cmp,
+ void* cmp_target);
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
-GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_background_job (GValue* value, gpointer v_object);
-void value_take_background_job (GValue* value, gpointer v_object);
+GParamSpec* param_spec_background_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_background_job (GValue* value,
+ gpointer v_object);
+void value_take_background_job (GValue* value,
+ gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
gpointer workers_ref (gpointer instance);
void workers_unref (gpointer instance);
-GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_workers (GValue* value, gpointer v_object);
-void value_take_workers (GValue* value, gpointer v_object);
+GParamSpec* param_spec_workers (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_workers (GValue* value,
+ gpointer v_object);
+void value_take_workers (GValue* value,
+ gpointer v_object);
gpointer value_get_workers (const GValue* value);
GType workers_get_type (void) G_GNUC_CONST;
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_abstract_semaphore (GValue* value, gpointer v_object);
-void value_take_abstract_semaphore (GValue* value, gpointer v_object);
+GParamSpec* param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_abstract_semaphore (GValue* value,
+ gpointer v_object);
+void value_take_abstract_semaphore (GValue* value,
+ gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
GType event_semaphore_get_type (void) G_GNUC_CONST;
#define WORKERS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_WORKERS, WorkersPrivate))
-enum {
- WORKERS_DUMMY_PROPERTY
-};
static void _background_job_unref0_ (gpointer var);
EventSemaphore* event_semaphore_new (void);
EventSemaphore* event_semaphore_construct (GType object_type);
#define WORKERS_UNLIMITED_THREADS -1
-Workers* workers_new (guint max_threads, gboolean exclusive);
-Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
+Workers* workers_new (guint max_threads,
+ gboolean exclusive);
+Workers* workers_construct (GType object_type,
+ guint max_threads,
+ gboolean exclusive);
void abstract_semaphore_notify (AbstractSemaphore* self);
-static void workers_thread_start (Workers* self, void* ignored);
-static void _workers_thread_start_gfunc (gpointer data, gpointer self);
-guint workers_threads_per_cpu (gint per, gint max);
+static void workers_thread_start (Workers* self,
+ void* ignored);
+static void _workers_thread_start_gfunc (gpointer data,
+ gpointer self);
+guint workers_threads_per_cpu (gint per,
+ gint max);
guint workers_thread_per_cpu_minus_one (void);
-void workers_enqueue (Workers* self, BackgroundJob* job);
+void workers_enqueue (Workers* self,
+ BackgroundJob* job);
gboolean abstract_semaphore_reset (AbstractSemaphore* self);
-gint background_job_priority_compare_func (BackgroundJob* a, BackgroundJob* b);
-static gint _background_job_priority_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
-void workers_enqueue_many (Workers* self, BackgroundJobBatch* batch);
+gint background_job_priority_compare_func (BackgroundJob* a,
+ BackgroundJob* b);
+static gint _background_job_priority_compare_func_gcompare_data_func (gconstpointer a,
+ gconstpointer b,
+ gpointer self);
+void workers_enqueue_many (Workers* self,
+ BackgroundJobBatch* batch);
void workers_wait_for_empty_queue (Workers* self);
void abstract_semaphore_wait (AbstractSemaphore* self);
gint workers_get_pending_job_count (Workers* self);
@@ -195,44 +236,58 @@ void background_job_internal_notify_completion (BackgroundJob* self);
static void workers_finalize (Workers * obj);
-static gint64 _background_job_priority_comparator_comparator (void* a, void* b, gpointer self) {
+static gint64
+_background_job_priority_comparator_comparator (void* a,
+ void* b,
+ gpointer self)
+{
gint64 result;
result = background_job_priority_comparator (a, b);
#line 10 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 204 "Workers.c"
+#line 249 "Workers.c"
}
-BackgroundJobBatch* background_job_batch_construct (GType object_type) {
+BackgroundJobBatch*
+background_job_batch_construct (GType object_type)
+{
BackgroundJobBatch * self = NULL;
#line 10 "/home/jens/Source/shotwell/src/threads/Workers.vala"
self = (BackgroundJobBatch*) sorted_list_construct (object_type, TYPE_BACKGROUND_JOB, (GBoxedCopyFunc) background_job_ref, (GDestroyNotify) background_job_unref, _background_job_priority_comparator_comparator, NULL);
#line 9 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return self;
-#line 214 "Workers.c"
+#line 261 "Workers.c"
}
-BackgroundJobBatch* background_job_batch_new (void) {
+BackgroundJobBatch*
+background_job_batch_new (void)
+{
#line 9 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return background_job_batch_construct (TYPE_BACKGROUND_JOB_BATCH);
-#line 221 "Workers.c"
+#line 270 "Workers.c"
}
-static void background_job_batch_class_init (BackgroundJobBatchClass * klass) {
+static void
+background_job_batch_class_init (BackgroundJobBatchClass * klass)
+{
#line 8 "/home/jens/Source/shotwell/src/threads/Workers.vala"
background_job_batch_parent_class = g_type_class_peek_parent (klass);
-#line 228 "Workers.c"
+#line 279 "Workers.c"
}
-static void background_job_batch_instance_init (BackgroundJobBatch * self) {
+static void
+background_job_batch_instance_init (BackgroundJobBatch * self)
+{
}
-GType background_job_batch_get_type (void) {
+GType
+background_job_batch_get_type (void)
+{
static volatile gsize background_job_batch_type_id__volatile = 0;
if (g_once_init_enter (&background_job_batch_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (BackgroundJobBatchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) background_job_batch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BackgroundJobBatch), 0, (GInstanceInitFunc) background_job_batch_instance_init, NULL };
@@ -244,74 +299,70 @@ GType background_job_batch_get_type (void) {
}
-static void _background_job_unref0_ (gpointer var) {
+static void
+_background_job_unref0_ (gpointer var)
+{
#line 19 "/home/jens/Source/shotwell/src/threads/Workers.vala"
(var == NULL) ? NULL : (var = (background_job_unref (var), NULL));
-#line 251 "Workers.c"
+#line 308 "Workers.c"
}
-static void _workers_thread_start_gfunc (gpointer data, gpointer self) {
+static void
+_workers_thread_start_gfunc (gpointer data,
+ gpointer self)
+{
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_thread_start ((Workers*) self, data);
-#line 258 "Workers.c"
+#line 318 "Workers.c"
}
-Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive) {
+Workers*
+workers_construct (GType object_type,
+ guint max_threads,
+ gboolean exclusive)
+{
Workers* self = NULL;
gboolean _tmp0_ = FALSE;
- guint _tmp1_;
- EventSemaphore* _tmp3_;
+ EventSemaphore* _tmp1_;
GError * _inner_error_ = NULL;
#line 23 "/home/jens/Source/shotwell/src/threads/Workers.vala"
self = (Workers*) g_type_create_instance (object_type);
#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp1_ = max_threads;
-#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- if (_tmp1_ <= ((guint) 0)) {
-#line 274 "Workers.c"
- guint _tmp2_;
-#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp2_ = max_threads;
+ if (max_threads <= ((guint) 0)) {
#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp0_ = _tmp2_ != ((guint) WORKERS_UNLIMITED_THREADS);
-#line 280 "Workers.c"
+ _tmp0_ = max_threads != ((guint) WORKERS_UNLIMITED_THREADS);
+#line 337 "Workers.c"
} else {
#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp0_ = FALSE;
-#line 284 "Workers.c"
+#line 341 "Workers.c"
}
#line 24 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (_tmp0_) {
#line 25 "/home/jens/Source/shotwell/src/threads/Workers.vala"
max_threads = (guint) 1;
-#line 290 "Workers.c"
+#line 347 "Workers.c"
}
#line 28 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp3_ = self->priv->empty_event;
+ _tmp1_ = self->priv->empty_event;
#line 28 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 296 "Workers.c"
+ abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
+#line 353 "Workers.c"
{
- GThreadPool* _tmp4_ = NULL;
- guint _tmp5_;
- gboolean _tmp6_;
- GThreadPool* _tmp7_;
- GThreadPool* _tmp8_;
-#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp5_ = max_threads;
-#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp6_ = exclusive;
+ GThreadPool* _tmp2_ = NULL;
+ GThreadPool* _tmp3_;
+ GThreadPool* _tmp4_;
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp7_ = g_thread_pool_new (_workers_thread_start_gfunc, self, (gint) _tmp5_, _tmp6_, &_inner_error_);
+ _tmp3_ = g_thread_pool_new (_workers_thread_start_gfunc, self, (gint) max_threads, exclusive, &_inner_error_);
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp4_ = _tmp7_;
+ _tmp2_ = _tmp3_;
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (_inner_error_->domain == G_THREAD_ERROR) {
-#line 315 "Workers.c"
+#line 366 "Workers.c"
goto __catch8_g_thread_error;
}
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -320,36 +371,36 @@ Workers* workers_construct (GType object_type, guint max_threads, gboolean exclu
g_clear_error (&_inner_error_);
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 324 "Workers.c"
+#line 375 "Workers.c"
}
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp8_ = _tmp4_;
+ _tmp4_ = _tmp2_;
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp4_ = NULL;
+ _tmp2_ = NULL;
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_g_thread_pool_free0 (self->priv->thread_pool);
#line 31 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- self->priv->thread_pool = _tmp8_;
+ self->priv->thread_pool = _tmp4_;
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _g_thread_pool_free0 (_tmp4_);
-#line 336 "Workers.c"
+ _g_thread_pool_free0 (_tmp2_);
+#line 387 "Workers.c"
}
goto __finally8;
__catch8_g_thread_error:
{
GError* err = NULL;
- const gchar* _tmp9_;
+ const gchar* _tmp5_;
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
err = _inner_error_;
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_inner_error_ = NULL;
#line 33 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp9_ = err->message;
+ _tmp5_ = err->message;
#line 33 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- g_error ("Workers.vala:33: Unable to create thread pool: %s", _tmp9_);
+ g_error ("Workers.vala:33: Unable to create thread pool: %s", _tmp5_);
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_g_error_free0 (err);
-#line 353 "Workers.c"
+#line 404 "Workers.c"
}
__finally8:
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -360,117 +411,110 @@ Workers* workers_construct (GType object_type, guint max_threads, gboolean exclu
g_clear_error (&_inner_error_);
#line 30 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 364 "Workers.c"
+#line 415 "Workers.c"
}
#line 23 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return self;
-#line 368 "Workers.c"
+#line 419 "Workers.c"
}
-Workers* workers_new (guint max_threads, gboolean exclusive) {
+Workers*
+workers_new (guint max_threads,
+ gboolean exclusive)
+{
#line 23 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return workers_construct (TYPE_WORKERS, max_threads, exclusive);
-#line 375 "Workers.c"
+#line 429 "Workers.c"
}
-guint workers_threads_per_cpu (gint per, gint max) {
+guint
+workers_threads_per_cpu (gint per,
+ gint max)
+{
guint result = 0U;
- gint _tmp0_;
guint count = 0U;
- guint _tmp1_;
- gint _tmp2_;
- guint _tmp3_ = 0U;
- gint _tmp4_;
- guint _tmp9_;
- guint _tmp10_;
-#line 37 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp0_ = per;
+ guint _tmp0_ = 0U;
+ guint _tmp3_;
+ guint _tmp4_;
#line 37 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _vala_return_val_if_fail (_tmp0_ > 0, "per > 0", 0U);
-#line 38 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp1_ = g_get_num_processors ();
+ _vala_return_val_if_fail (per > 0, "per > 0", 0U);
#line 38 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp2_ = per;
-#line 38 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- count = _tmp1_ * _tmp2_;
-#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp4_ = max;
+ count = g_get_num_processors () * per;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- if (_tmp4_ < 0) {
-#line 403 "Workers.c"
- guint _tmp5_;
+ if (max < 0) {
+#line 448 "Workers.c"
+ guint _tmp1_;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp5_ = count;
+ _tmp1_ = count;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp3_ = _tmp5_;
-#line 409 "Workers.c"
+ _tmp0_ = _tmp1_;
+#line 454 "Workers.c"
} else {
- guint _tmp6_;
- gint _tmp7_;
- guint _tmp8_;
-#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp6_ = count;
-#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp7_ = max;
+ guint _tmp2_;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp8_ = CLAMP (_tmp6_, (guint) 0, (guint) _tmp7_);
+ _tmp2_ = count;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp3_ = _tmp8_;
-#line 422 "Workers.c"
+ _tmp0_ = CLAMP (_tmp2_, (guint) 0, (guint) max);
+#line 461 "Workers.c"
}
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- result = _tmp3_;
+ result = _tmp0_;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp9_ = result;
+ _tmp3_ = result;
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _vala_warn_if_fail (_tmp9_ > ((guint) 0), "result > 0");
+ _vala_warn_if_fail (_tmp3_ > ((guint) 0), "result > 0");
#line 40 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 432 "Workers.c"
+#line 471 "Workers.c"
}
-guint workers_thread_per_cpu_minus_one (void) {
+guint
+workers_thread_per_cpu_minus_one (void)
+{
guint result = 0U;
guint _tmp0_;
guint _tmp1_;
- guint _tmp2_;
- guint _tmp3_;
-#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp0_ = g_get_num_processors ();
#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp1_ = CLAMP (_tmp0_ - 1, (guint) 1, (guint) G_MAXINT);
+ result = CLAMP (g_get_num_processors () - 1, (guint) 1, (guint) G_MAXINT);
#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- result = _tmp1_;
+ _tmp0_ = result;
#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp2_ = result;
-#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _vala_warn_if_fail (_tmp2_ > ((guint) 0), "result > 0");
+ _vala_warn_if_fail (_tmp0_ > ((guint) 0), "result > 0");
#line 46 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 454 "Workers.c"
+#line 489 "Workers.c"
}
-static gpointer _background_job_ref0 (gpointer self) {
+static gpointer
+_background_job_ref0 (gpointer self)
+{
#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return self ? background_job_ref (self) : NULL;
-#line 461 "Workers.c"
+#line 498 "Workers.c"
}
-static gint _background_job_priority_compare_func_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
+static gint
+_background_job_priority_compare_func_gcompare_data_func (gconstpointer a,
+ gconstpointer b,
+ gpointer self)
+{
gint result;
result = background_job_priority_compare_func ((BackgroundJob*) a, (BackgroundJob*) b);
#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 470 "Workers.c"
+#line 511 "Workers.c"
}
-void workers_enqueue (Workers* self, BackgroundJob* job) {
+void
+workers_enqueue (Workers* self,
+ BackgroundJob* job)
+{
EventSemaphore* _tmp0_;
GError * _inner_error_ = NULL;
#line 51 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -481,41 +525,38 @@ void workers_enqueue (Workers* self, BackgroundJob* job) {
_tmp0_ = self->priv->empty_event;
#line 52 "/home/jens/Source/shotwell/src/threads/Workers.vala"
abstract_semaphore_reset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 485 "Workers.c"
+#line 529 "Workers.c"
{
GAsyncQueue* _tmp1_;
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp1_ = self->priv->queue;
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_lock (&self->priv->__lock_queue);
-#line 492 "Workers.c"
+#line 536 "Workers.c"
{
GAsyncQueue* _tmp2_;
BackgroundJob* _tmp3_;
- BackgroundJob* _tmp4_;
- gint _tmp5_;
+ gint _tmp4_;
#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp2_ = self->priv->queue;
#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp3_ = job;
+ _tmp3_ = _background_job_ref0 (job);
#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp4_ = _background_job_ref0 (_tmp3_);
-#line 55 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- g_async_queue_push_sorted (_tmp2_, _tmp4_, _background_job_priority_compare_func_gcompare_data_func, NULL);
+ g_async_queue_push_sorted (_tmp2_, _tmp3_, _background_job_priority_compare_func_gcompare_data_func, NULL);
#line 56 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp5_ = self->priv->enqueued;
+ _tmp4_ = self->priv->enqueued;
#line 56 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- self->priv->enqueued = _tmp5_ + 1;
-#line 510 "Workers.c"
+ self->priv->enqueued = _tmp4_ + 1;
+#line 551 "Workers.c"
}
__finally9:
{
- GAsyncQueue* _tmp6_;
+ GAsyncQueue* _tmp5_;
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp6_ = self->priv->queue;
+ _tmp5_ = self->priv->queue;
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 519 "Workers.c"
+#line 560 "Workers.c"
}
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
@@ -525,23 +566,20 @@ void workers_enqueue (Workers* self, BackgroundJob* job) {
g_clear_error (&_inner_error_);
#line 54 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return;
-#line 529 "Workers.c"
+#line 570 "Workers.c"
}
}
{
- GThreadPool* _tmp7_;
- BackgroundJob* _tmp8_;
-#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp7_ = self->priv->thread_pool;
+ GThreadPool* _tmp6_;
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp8_ = job;
+ _tmp6_ = self->priv->thread_pool;
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- g_thread_pool_push (_tmp7_, _tmp8_, &_inner_error_);
+ g_thread_pool_push (_tmp6_, job, &_inner_error_);
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (_inner_error_->domain == G_THREAD_ERROR) {
-#line 545 "Workers.c"
+#line 583 "Workers.c"
goto __catch10_g_thread_error;
}
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -550,28 +588,28 @@ void workers_enqueue (Workers* self, BackgroundJob* job) {
g_clear_error (&_inner_error_);
#line 60 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return;
-#line 554 "Workers.c"
+#line 592 "Workers.c"
}
}
goto __finally10;
__catch10_g_thread_error:
{
GError* err = NULL;
- GError* _tmp9_;
- const gchar* _tmp10_;
+ GError* _tmp7_;
+ const gchar* _tmp8_;
#line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala"
err = _inner_error_;
#line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_inner_error_ = NULL;
#line 64 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp9_ = err;
+ _tmp7_ = err;
#line 64 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp10_ = _tmp9_->message;
+ _tmp8_ = _tmp7_->message;
#line 64 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- g_warning ("Workers.vala:64: Unable to create worker thread: %s", _tmp10_);
+ g_warning ("Workers.vala:64: Unable to create worker thread: %s", _tmp8_);
#line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_g_error_free0 (err);
-#line 575 "Workers.c"
+#line 613 "Workers.c"
}
__finally10:
#line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -582,68 +620,67 @@ void workers_enqueue (Workers* self, BackgroundJob* job) {
g_clear_error (&_inner_error_);
#line 59 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return;
-#line 586 "Workers.c"
+#line 624 "Workers.c"
}
}
-void workers_enqueue_many (Workers* self, BackgroundJobBatch* batch) {
+void
+workers_enqueue_many (Workers* self,
+ BackgroundJobBatch* batch)
+{
#line 68 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (IS_WORKERS (self));
#line 68 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (IS_BACKGROUND_JOB_BATCH (batch));
-#line 596 "Workers.c"
+#line 637 "Workers.c"
{
GeeIterator* _job_it = NULL;
- BackgroundJobBatch* _tmp0_;
- GeeIterator* _tmp1_;
-#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp0_ = batch;
+ GeeIterator* _tmp0_;
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
+ _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (batch, GEE_TYPE_ITERABLE, GeeIterable));
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _job_it = _tmp1_;
+ _job_it = _tmp0_;
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
while (TRUE) {
-#line 609 "Workers.c"
- GeeIterator* _tmp2_;
- gboolean _tmp3_;
+#line 647 "Workers.c"
+ GeeIterator* _tmp1_;
BackgroundJob* job = NULL;
- GeeIterator* _tmp4_;
- gpointer _tmp5_;
- BackgroundJob* _tmp6_;
-#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp2_ = _job_it;
+ GeeIterator* _tmp2_;
+ gpointer _tmp3_;
+ BackgroundJob* _tmp4_;
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp3_ = gee_iterator_next (_tmp2_);
+ _tmp1_ = _job_it;
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- if (!_tmp3_) {
+ if (!gee_iterator_next (_tmp1_)) {
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
break;
-#line 624 "Workers.c"
+#line 659 "Workers.c"
}
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp4_ = _job_it;
+ _tmp2_ = _job_it;
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp5_ = gee_iterator_get (_tmp4_);
+ _tmp3_ = gee_iterator_get (_tmp2_);
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- job = (BackgroundJob*) _tmp5_;
+ job = (BackgroundJob*) _tmp3_;
#line 70 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp6_ = job;
+ _tmp4_ = job;
#line 70 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- workers_enqueue (self, _tmp6_);
+ workers_enqueue (self, _tmp4_);
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_background_job_unref0 (job);
-#line 638 "Workers.c"
+#line 673 "Workers.c"
}
#line 69 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_g_object_unref0 (_job_it);
-#line 642 "Workers.c"
+#line 677 "Workers.c"
}
}
-void workers_wait_for_empty_queue (Workers* self) {
+void
+workers_wait_for_empty_queue (Workers* self)
+{
EventSemaphore* _tmp0_;
#line 73 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (IS_WORKERS (self));
@@ -651,16 +688,18 @@ void workers_wait_for_empty_queue (Workers* self) {
_tmp0_ = self->priv->empty_event;
#line 74 "/home/jens/Source/shotwell/src/threads/Workers.vala"
abstract_semaphore_wait (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 655 "Workers.c"
+#line 692 "Workers.c"
}
-gint workers_get_pending_job_count (Workers* self) {
+gint
+workers_get_pending_job_count (Workers* self)
+{
gint result = 0;
GError * _inner_error_ = NULL;
#line 78 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_val_if_fail (IS_WORKERS (self), 0);
-#line 664 "Workers.c"
+#line 703 "Workers.c"
{
GAsyncQueue* _tmp0_;
gint _tmp4_ = 0;
@@ -668,25 +707,25 @@ gint workers_get_pending_job_count (Workers* self) {
_tmp0_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_lock (&self->priv->__lock_queue);
-#line 672 "Workers.c"
+#line 711 "Workers.c"
{
gint _tmp1_;
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp1_ = self->priv->enqueued;
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
result = _tmp1_;
-#line 679 "Workers.c"
+#line 718 "Workers.c"
{
GAsyncQueue* _tmp2_;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp2_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 686 "Workers.c"
+#line 725 "Workers.c"
}
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 690 "Workers.c"
+#line 729 "Workers.c"
}
__finally11:
{
@@ -695,7 +734,7 @@ gint workers_get_pending_job_count (Workers* self) {
_tmp3_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 699 "Workers.c"
+#line 738 "Workers.c"
}
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.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);
@@ -703,26 +742,28 @@ gint workers_get_pending_job_count (Workers* self) {
g_clear_error (&_inner_error_);
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return _tmp4_;
-#line 707 "Workers.c"
+#line 746 "Workers.c"
}
}
-static void workers_thread_start (Workers* self, void* ignored) {
+static void
+workers_thread_start (Workers* self,
+ void* ignored)
+{
BackgroundJob* job = NULL;
gboolean empty = FALSE;
- gboolean _tmp7_;
GError * _inner_error_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (IS_WORKERS (self));
-#line 719 "Workers.c"
+#line 760 "Workers.c"
{
GAsyncQueue* _tmp0_;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp0_ = self->priv->queue;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_lock (&self->priv->__lock_queue);
-#line 726 "Workers.c"
+#line 767 "Workers.c"
{
GAsyncQueue* _tmp1_;
gpointer _tmp2_;
@@ -751,7 +792,7 @@ static void workers_thread_start (Workers* self, void* ignored) {
_tmp5_ = self->priv->enqueued;
#line 92 "/home/jens/Source/shotwell/src/threads/Workers.vala"
empty = _tmp5_ == 0;
-#line 755 "Workers.c"
+#line 796 "Workers.c"
}
__finally12:
{
@@ -760,7 +801,7 @@ static void workers_thread_start (Workers* self, void* ignored) {
_tmp6_ = self->priv->queue;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 764 "Workers.c"
+#line 805 "Workers.c"
}
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
@@ -772,133 +813,156 @@ static void workers_thread_start (Workers* self, void* ignored) {
g_clear_error (&_inner_error_);
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return;
-#line 776 "Workers.c"
+#line 817 "Workers.c"
}
}
#line 95 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp7_ = background_job_is_cancelled (job);
-#line 95 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- if (!_tmp7_) {
+ if (!background_job_is_cancelled (job)) {
#line 96 "/home/jens/Source/shotwell/src/threads/Workers.vala"
background_job_execute (job);
-#line 785 "Workers.c"
+#line 824 "Workers.c"
}
#line 98 "/home/jens/Source/shotwell/src/threads/Workers.vala"
background_job_internal_notify_completion (job);
#line 100 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (empty) {
-#line 791 "Workers.c"
- EventSemaphore* _tmp8_;
+#line 830 "Workers.c"
+ EventSemaphore* _tmp7_;
#line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- _tmp8_ = self->priv->empty_event;
+ _tmp7_ = self->priv->empty_event;
#line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 797 "Workers.c"
+ abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
+#line 836 "Workers.c"
}
#line 84 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_background_job_unref0 (job);
-#line 801 "Workers.c"
+#line 840 "Workers.c"
}
-static void value_workers_init (GValue* value) {
+static void
+value_workers_init (GValue* value)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 808 "Workers.c"
+#line 849 "Workers.c"
}
-static void value_workers_free_value (GValue* value) {
+static void
+value_workers_free_value (GValue* value)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (value->data[0].v_pointer);
-#line 817 "Workers.c"
+#line 860 "Workers.c"
}
}
-static void value_workers_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_workers_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (src_value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
dest_value->data[0].v_pointer = workers_ref (src_value->data[0].v_pointer);
-#line 827 "Workers.c"
+#line 873 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
dest_value->data[0].v_pointer = NULL;
-#line 831 "Workers.c"
+#line 877 "Workers.c"
}
}
-static gpointer value_workers_peek_pointer (const GValue* value) {
+static gpointer
+value_workers_peek_pointer (const GValue* value)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return value->data[0].v_pointer;
-#line 839 "Workers.c"
+#line 887 "Workers.c"
}
-static gchar* value_workers_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_workers_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (collect_values[0].v_pointer) {
-#line 846 "Workers.c"
+#line 899 "Workers.c"
Workers * object;
object = collect_values[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (object->parent_instance.g_class == NULL) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 853 "Workers.c"
+#line 906 "Workers.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.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 857 "Workers.c"
+#line 910 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = workers_ref (object);
-#line 861 "Workers.c"
+#line 914 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 865 "Workers.c"
+#line 918 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 869 "Workers.c"
+#line 922 "Workers.c"
}
-static gchar* value_workers_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_workers_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
Workers ** object_p;
object_p = collect_values[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (!object_p) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 880 "Workers.c"
+#line 938 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (!value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = NULL;
-#line 886 "Workers.c"
+#line 944 "Workers.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = value->data[0].v_pointer;
-#line 890 "Workers.c"
+#line 948 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = workers_ref (value->data[0].v_pointer);
-#line 894 "Workers.c"
+#line 952 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 898 "Workers.c"
+#line 956 "Workers.c"
}
-GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_workers (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecWorkers* spec;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_WORKERS), NULL);
@@ -908,20 +972,25 @@ GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gcha
G_PARAM_SPEC (spec)->value_type = object_type;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return G_PARAM_SPEC (spec);
-#line 912 "Workers.c"
+#line 976 "Workers.c"
}
-gpointer value_get_workers (const GValue* value) {
+gpointer
+value_get_workers (const GValue* value)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS), NULL);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return value->data[0].v_pointer;
-#line 921 "Workers.c"
+#line 987 "Workers.c"
}
-void value_set_workers (GValue* value, gpointer v_object) {
+void
+value_set_workers (GValue* value,
+ gpointer v_object)
+{
Workers * old;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS));
@@ -937,22 +1006,25 @@ void value_set_workers (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_ref (value->data[0].v_pointer);
-#line 941 "Workers.c"
+#line 1010 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 945 "Workers.c"
+#line 1014 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (old) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (old);
-#line 951 "Workers.c"
+#line 1020 "Workers.c"
}
}
-void value_take_workers (GValue* value, gpointer v_object) {
+void
+value_take_workers (GValue* value,
+ gpointer v_object)
+{
Workers * old;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS));
@@ -966,33 +1038,37 @@ void value_take_workers (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = v_object;
-#line 970 "Workers.c"
+#line 1042 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 974 "Workers.c"
+#line 1046 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (old) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (old);
-#line 980 "Workers.c"
+#line 1052 "Workers.c"
}
}
-static void workers_class_init (WorkersClass * klass) {
+static void
+workers_class_init (WorkersClass * klass)
+{
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_parent_class = g_type_class_peek_parent (klass);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
((WorkersClass *) klass)->finalize = workers_finalize;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_type_class_add_private (klass, sizeof (WorkersPrivate));
-#line 992 "Workers.c"
+#line 1066 "Workers.c"
}
-static void workers_instance_init (Workers * self) {
+static void
+workers_instance_init (Workers * self)
+{
GAsyncQueue* _tmp0_;
EventSemaphore* _tmp1_;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -1011,11 +1087,13 @@ static void workers_instance_init (Workers * self) {
self->priv->enqueued = 0;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
self->ref_count = 1;
-#line 1015 "Workers.c"
+#line 1091 "Workers.c"
}
-static void workers_finalize (Workers * obj) {
+static void
+workers_finalize (Workers * obj)
+{
Workers * self;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_WORKERS, Workers);
@@ -1029,11 +1107,13 @@ static void workers_finalize (Workers * obj) {
_g_async_queue_unref0 (self->priv->queue);
#line 20 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_abstract_semaphore_unref0 (self->priv->empty_event);
-#line 1033 "Workers.c"
+#line 1111 "Workers.c"
}
-GType workers_get_type (void) {
+GType
+workers_get_type (void)
+{
static volatile gsize workers_type_id__volatile = 0;
if (g_once_init_enter (&workers_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_workers_init, value_workers_free_value, value_workers_copy_value, value_workers_peek_pointer, "p", value_workers_collect_value, "p", value_workers_lcopy_value };
@@ -1047,18 +1127,22 @@ GType workers_get_type (void) {
}
-gpointer workers_ref (gpointer instance) {
+gpointer
+workers_ref (gpointer instance)
+{
Workers * self;
self = instance;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_atomic_int_inc (&self->ref_count);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return instance;
-#line 1058 "Workers.c"
+#line 1140 "Workers.c"
}
-void workers_unref (gpointer instance) {
+void
+workers_unref (gpointer instance)
+{
Workers * self;
self = instance;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -1067,7 +1151,7 @@ void workers_unref (gpointer instance) {
WORKERS_GET_CLASS (self)->finalize (self);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 1071 "Workers.c"
+#line 1155 "Workers.c"
}
}