diff options
Diffstat (limited to 'src/scanner.c')
-rw-r--r-- | src/scanner.c | 6646 |
1 files changed, 5744 insertions, 902 deletions
diff --git a/src/scanner.c b/src/scanner.c index d564732..b67db5e 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1,4 +1,4 @@ -/* scanner.c generated by valac 0.18.1, the Vala compiler +/* scanner.c generated by valac 0.20.1, the Vala compiler * generated from scanner.vala, do not modify */ /* @@ -285,6 +285,7 @@ typedef struct _NotifyGotLine NotifyGotLine; typedef struct _NotifyGotLineClass NotifyGotLineClass; typedef struct _NotifyGotLinePrivate NotifyGotLinePrivate; #define _scan_line_unref0(var) ((var == NULL) ? NULL : (var = (scan_line_unref (var), NULL))) +#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL))) #define _g_async_queue_unref0(var) ((var == NULL) ? NULL : (var = (g_async_queue_unref (var), NULL))) #define __g_list_free__scan_job_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__scan_job_unref0_ (var), NULL))) #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) @@ -382,6 +383,8 @@ struct _ScanOptions { ScanType type; gint paper_width; gint paper_height; + gint brightness; + gint contrast; }; struct _ScanOptionsClass { @@ -405,6 +408,8 @@ struct _ScanJob { ScanType type; gint page_width; gint page_height; + gint brightness; + gint contrast; }; struct _ScanJobClass { @@ -926,6 +931,7 @@ static gint scanner_get_device_weight (const gchar* device); static gint scanner_compare_devices (ScanDevice* device1, ScanDevice* device2); static void scanner_do_redetect (Scanner* self); static gint _scanner_compare_devices_gcompare_func (gconstpointer a, gconstpointer b); +static gint scanner_scale_int (Scanner* self, gint source_min, gint source_max, SANE_Option_Descriptor* option, gint value); static gboolean scanner_set_default_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index); static void scanner_set_bool_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gboolean value, gboolean* _result_); static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gint value, gint* _result_); @@ -968,142 +974,226 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify ScanDevice* scan_device_construct (GType object_type) { ScanDevice* self = NULL; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (ScanDevice*) g_type_create_instance (object_type); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 982 "scanner.c" } ScanDevice* scan_device_new (void) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scan_device_construct (TYPE_SCAN_DEVICE); +#line 989 "scanner.c" } static void value_scan_device_init (GValue* value) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 996 "scanner.c" } static void value_scan_device_free_value (GValue* value) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device_unref (value->data[0].v_pointer); +#line 1005 "scanner.c" } } static void value_scan_device_copy_value (const GValue* src_value, GValue* dest_value) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scan_device_ref (src_value->data[0].v_pointer); +#line 1015 "scanner.c" } else { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 1019 "scanner.c" } } static gpointer value_scan_device_peek_pointer (const GValue* value) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1027 "scanner.c" } static gchar* value_scan_device_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 1034 "scanner.c" ScanDevice* object; object = collect_values[0].v_pointer; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1041 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1045 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scan_device_ref (object); +#line 1049 "scanner.c" } else { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1053 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1057 "scanner.c" } static gchar* value_scan_device_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { ScanDevice** object_p; object_p = collect_values[0].v_pointer; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1068 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 1074 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 1078 "scanner.c" } else { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scan_device_ref (value->data[0].v_pointer); +#line 1082 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1086 "scanner.c" } GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanDevice* spec; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_DEVICE), NULL); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 1100 "scanner.c" } gpointer value_get_scan_device (const GValue* value) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE), NULL); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1109 "scanner.c" } void value_set_scan_device (GValue* value, gpointer v_object) { ScanDevice* old; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE)); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_DEVICE)); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device_ref (value->data[0].v_pointer); +#line 1129 "scanner.c" } else { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1133 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device_unref (old); +#line 1139 "scanner.c" } } void value_take_scan_device (GValue* value, gpointer v_object) { ScanDevice* old; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE)); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_DEVICE)); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 1158 "scanner.c" } else { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1162 "scanner.c" } +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device_unref (old); +#line 1168 "scanner.c" } } static void scan_device_class_init (ScanDeviceClass * klass) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device_parent_class = g_type_class_peek_parent (klass); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_DEVICE_CLASS (klass)->finalize = scan_device_finalize; +#line 1178 "scanner.c" } static void scan_device_instance_init (ScanDevice * self) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 1185 "scanner.c" } static void scan_device_finalize (ScanDevice* obj) { ScanDevice * self; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_DEVICE, ScanDevice); +#line 16 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->name); +#line 17 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->label); +#line 1197 "scanner.c" } @@ -1124,158 +1214,248 @@ GType scan_device_get_type (void) { gpointer scan_device_ref (gpointer instance) { ScanDevice* self; self = instance; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 1222 "scanner.c" } void scan_device_unref (gpointer instance) { ScanDevice* self; self = instance; +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_DEVICE_GET_CLASS (self)->finalize (self); +#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 1235 "scanner.c" } } ScanPageInfo* scan_page_info_construct (GType object_type) { ScanPageInfo* self = NULL; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (ScanPageInfo*) g_type_create_instance (object_type); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 1246 "scanner.c" } ScanPageInfo* scan_page_info_new (void) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scan_page_info_construct (TYPE_SCAN_PAGE_INFO); +#line 1253 "scanner.c" } static void value_scan_page_info_init (GValue* value) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1260 "scanner.c" } static void value_scan_page_info_free_value (GValue* value) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_page_info_unref (value->data[0].v_pointer); +#line 1269 "scanner.c" } } static void value_scan_page_info_copy_value (const GValue* src_value, GValue* dest_value) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scan_page_info_ref (src_value->data[0].v_pointer); +#line 1279 "scanner.c" } else { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 1283 "scanner.c" } } static gpointer value_scan_page_info_peek_pointer (const GValue* value) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1291 "scanner.c" } static gchar* value_scan_page_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 1298 "scanner.c" ScanPageInfo* object; object = collect_values[0].v_pointer; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1305 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1309 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scan_page_info_ref (object); +#line 1313 "scanner.c" } else { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1317 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1321 "scanner.c" } static gchar* value_scan_page_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { ScanPageInfo** object_p; object_p = collect_values[0].v_pointer; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1332 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 1338 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 1342 "scanner.c" } else { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scan_page_info_ref (value->data[0].v_pointer); +#line 1346 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1350 "scanner.c" } GParamSpec* param_spec_scan_page_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanPageInfo* spec; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_PAGE_INFO), NULL); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 1364 "scanner.c" } gpointer value_get_scan_page_info (const GValue* value) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO), NULL); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1373 "scanner.c" } void value_set_scan_page_info (GValue* value, gpointer v_object) { ScanPageInfo* old; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO)); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_PAGE_INFO)); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_page_info_ref (value->data[0].v_pointer); +#line 1393 "scanner.c" } else { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1397 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_page_info_unref (old); +#line 1403 "scanner.c" } } void value_take_scan_page_info (GValue* value, gpointer v_object) { ScanPageInfo* old; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO)); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_PAGE_INFO)); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 1422 "scanner.c" } else { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1426 "scanner.c" } +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_page_info_unref (old); +#line 1432 "scanner.c" } } static void scan_page_info_class_init (ScanPageInfoClass * klass) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_page_info_parent_class = g_type_class_peek_parent (klass); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_PAGE_INFO_CLASS (klass)->finalize = scan_page_info_finalize; +#line 1442 "scanner.c" } static void scan_page_info_instance_init (ScanPageInfo * self) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 1449 "scanner.c" } static void scan_page_info_finalize (ScanPageInfo* obj) { ScanPageInfo * self; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_PAGE_INFO, ScanPageInfo); +#line 36 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->device); +#line 1459 "scanner.c" } @@ -1296,158 +1476,248 @@ GType scan_page_info_get_type (void) { gpointer scan_page_info_ref (gpointer instance) { ScanPageInfo* self; self = instance; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 1484 "scanner.c" } void scan_page_info_unref (gpointer instance) { ScanPageInfo* self; self = instance; +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_PAGE_INFO_GET_CLASS (self)->finalize (self); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 1497 "scanner.c" } } ScanLine* scan_line_construct (GType object_type) { ScanLine* self = NULL; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (ScanLine*) g_type_create_instance (object_type); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 1508 "scanner.c" } ScanLine* scan_line_new (void) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scan_line_construct (TYPE_SCAN_LINE); +#line 1515 "scanner.c" } static void value_scan_line_init (GValue* value) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1522 "scanner.c" } static void value_scan_line_free_value (GValue* value) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_line_unref (value->data[0].v_pointer); +#line 1531 "scanner.c" } } static void value_scan_line_copy_value (const GValue* src_value, GValue* dest_value) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scan_line_ref (src_value->data[0].v_pointer); +#line 1541 "scanner.c" } else { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 1545 "scanner.c" } } static gpointer value_scan_line_peek_pointer (const GValue* value) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1553 "scanner.c" } static gchar* value_scan_line_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 1560 "scanner.c" ScanLine* object; object = collect_values[0].v_pointer; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1567 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1571 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scan_line_ref (object); +#line 1575 "scanner.c" } else { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1579 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1583 "scanner.c" } static gchar* value_scan_line_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { ScanLine** object_p; object_p = collect_values[0].v_pointer; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1594 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 1600 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 1604 "scanner.c" } else { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scan_line_ref (value->data[0].v_pointer); +#line 1608 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1612 "scanner.c" } GParamSpec* param_spec_scan_line (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanLine* spec; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_LINE), NULL); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 1626 "scanner.c" } gpointer value_get_scan_line (const GValue* value) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE), NULL); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1635 "scanner.c" } void value_set_scan_line (GValue* value, gpointer v_object) { ScanLine* old; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE)); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_LINE)); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_line_ref (value->data[0].v_pointer); +#line 1655 "scanner.c" } else { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1659 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_line_unref (old); +#line 1665 "scanner.c" } } void value_take_scan_line (GValue* value, gpointer v_object) { ScanLine* old; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE)); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_LINE)); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 1684 "scanner.c" } else { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1688 "scanner.c" } +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_line_unref (old); +#line 1694 "scanner.c" } } static void scan_line_class_init (ScanLineClass * klass) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_line_parent_class = g_type_class_peek_parent (klass); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_LINE_CLASS (klass)->finalize = scan_line_finalize; +#line 1704 "scanner.c" } static void scan_line_instance_init (ScanLine * self) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 1711 "scanner.c" } static void scan_line_finalize (ScanLine* obj) { ScanLine * self; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_LINE, ScanLine); +#line 55 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->data = (g_free (self->data), NULL); +#line 1721 "scanner.c" } @@ -1468,17 +1738,24 @@ GType scan_line_get_type (void) { gpointer scan_line_ref (gpointer instance) { ScanLine* self; self = instance; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 1746 "scanner.c" } void scan_line_unref (gpointer instance) { ScanLine* self; self = instance; +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_LINE_GET_CLASS (self)->finalize (self); +#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 1759 "scanner.c" } } @@ -1509,140 +1786,222 @@ GType scan_type_get_type (void) { ScanOptions* scan_options_construct (GType object_type) { ScanOptions* self = NULL; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (ScanOptions*) g_type_create_instance (object_type); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 1794 "scanner.c" } ScanOptions* scan_options_new (void) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scan_options_construct (TYPE_SCAN_OPTIONS); +#line 1801 "scanner.c" } static void value_scan_options_init (GValue* value) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1808 "scanner.c" } static void value_scan_options_free_value (GValue* value) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_options_unref (value->data[0].v_pointer); +#line 1817 "scanner.c" } } static void value_scan_options_copy_value (const GValue* src_value, GValue* dest_value) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scan_options_ref (src_value->data[0].v_pointer); +#line 1827 "scanner.c" } else { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 1831 "scanner.c" } } static gpointer value_scan_options_peek_pointer (const GValue* value) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1839 "scanner.c" } static gchar* value_scan_options_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 1846 "scanner.c" ScanOptions* object; object = collect_values[0].v_pointer; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1853 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1857 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scan_options_ref (object); +#line 1861 "scanner.c" } else { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1865 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1869 "scanner.c" } static gchar* value_scan_options_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { ScanOptions** object_p; object_p = collect_values[0].v_pointer; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1880 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 1886 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 1890 "scanner.c" } else { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scan_options_ref (value->data[0].v_pointer); +#line 1894 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 1898 "scanner.c" } GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanOptions* spec; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_OPTIONS), NULL); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 1912 "scanner.c" } gpointer value_get_scan_options (const GValue* value) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS), NULL); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 1921 "scanner.c" } void value_set_scan_options (GValue* value, gpointer v_object) { ScanOptions* old; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS)); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_OPTIONS)); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_options_ref (value->data[0].v_pointer); +#line 1941 "scanner.c" } else { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1945 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_options_unref (old); +#line 1951 "scanner.c" } } void value_take_scan_options (GValue* value, gpointer v_object) { ScanOptions* old; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS)); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_OPTIONS)); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 1970 "scanner.c" } else { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 1974 "scanner.c" } +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_options_unref (old); +#line 1980 "scanner.c" } } static void scan_options_class_init (ScanOptionsClass * klass) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_options_parent_class = g_type_class_peek_parent (klass); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_OPTIONS_CLASS (klass)->finalize = scan_options_finalize; +#line 1990 "scanner.c" } static void scan_options_instance_init (ScanOptions * self) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 1997 "scanner.c" } static void scan_options_finalize (ScanOptions* obj) { ScanOptions * self; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_OPTIONS, ScanOptions); +#line 2005 "scanner.c" } @@ -1663,158 +2022,248 @@ GType scan_options_get_type (void) { gpointer scan_options_ref (gpointer instance) { ScanOptions* self; self = instance; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 2030 "scanner.c" } void scan_options_unref (gpointer instance) { ScanOptions* self; self = instance; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_OPTIONS_GET_CLASS (self)->finalize (self); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 2043 "scanner.c" } } ScanJob* scan_job_construct (GType object_type) { ScanJob* self = NULL; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (ScanJob*) g_type_create_instance (object_type); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2054 "scanner.c" } ScanJob* scan_job_new (void) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scan_job_construct (TYPE_SCAN_JOB); +#line 2061 "scanner.c" } static void value_scan_job_init (GValue* value) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2068 "scanner.c" } static void value_scan_job_free_value (GValue* value) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_job_unref (value->data[0].v_pointer); +#line 2077 "scanner.c" } } static void value_scan_job_copy_value (const GValue* src_value, GValue* dest_value) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scan_job_ref (src_value->data[0].v_pointer); +#line 2087 "scanner.c" } else { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 2091 "scanner.c" } } static gpointer value_scan_job_peek_pointer (const GValue* value) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2099 "scanner.c" } static gchar* value_scan_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 2106 "scanner.c" ScanJob* object; object = collect_values[0].v_pointer; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 2113 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2117 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scan_job_ref (object); +#line 2121 "scanner.c" } else { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2125 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2129 "scanner.c" } static gchar* value_scan_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { ScanJob** object_p; object_p = collect_values[0].v_pointer; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 2140 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 2146 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 2150 "scanner.c" } else { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scan_job_ref (value->data[0].v_pointer); +#line 2154 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2158 "scanner.c" } GParamSpec* param_spec_scan_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanJob* spec; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_JOB), NULL); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 2172 "scanner.c" } gpointer value_get_scan_job (const GValue* value) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB), NULL); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2181 "scanner.c" } void value_set_scan_job (GValue* value, gpointer v_object) { ScanJob* old; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB)); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_JOB)); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_job_ref (value->data[0].v_pointer); +#line 2201 "scanner.c" } else { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2205 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_job_unref (old); +#line 2211 "scanner.c" } } void value_take_scan_job (GValue* value, gpointer v_object) { ScanJob* old; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB)); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_JOB)); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 2230 "scanner.c" } else { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2234 "scanner.c" } +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_job_unref (old); +#line 2240 "scanner.c" } } static void scan_job_class_init (ScanJobClass * klass) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_job_parent_class = g_type_class_peek_parent (klass); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_JOB_CLASS (klass)->finalize = scan_job_finalize; +#line 2250 "scanner.c" } static void scan_job_instance_init (ScanJob * self) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 2257 "scanner.c" } static void scan_job_finalize (ScanJob* obj) { ScanJob * self; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_JOB, ScanJob); +#line 90 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->device); +#line 2267 "scanner.c" } @@ -1835,157 +2284,246 @@ GType scan_job_get_type (void) { gpointer scan_job_ref (gpointer instance) { ScanJob* self; self = instance; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 2292 "scanner.c" } void scan_job_unref (gpointer instance) { ScanJob* self; self = instance; +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCAN_JOB_GET_CLASS (self)->finalize (self); +#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 2305 "scanner.c" } } Request* request_construct (GType object_type) { Request* self = NULL; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (Request*) g_type_create_instance (object_type); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2316 "scanner.c" } Request* request_new (void) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return request_construct (TYPE_REQUEST); +#line 2323 "scanner.c" } static void value_request_init (GValue* value) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2330 "scanner.c" } static void value_request_free_value (GValue* value) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_unref (value->data[0].v_pointer); +#line 2339 "scanner.c" } } static void value_request_copy_value (const GValue* src_value, GValue* dest_value) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = request_ref (src_value->data[0].v_pointer); +#line 2349 "scanner.c" } else { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 2353 "scanner.c" } } static gpointer value_request_peek_pointer (const GValue* value) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2361 "scanner.c" } static gchar* value_request_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 2368 "scanner.c" Request* object; object = collect_values[0].v_pointer; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 2375 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2379 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = request_ref (object); +#line 2383 "scanner.c" } else { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2387 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2391 "scanner.c" } static gchar* value_request_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { Request** object_p; object_p = collect_values[0].v_pointer; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 2402 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 2408 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 2412 "scanner.c" } else { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = request_ref (value->data[0].v_pointer); +#line 2416 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2420 "scanner.c" } GParamSpec* param_spec_request (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecRequest* spec; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_REQUEST), NULL); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 2434 "scanner.c" } gpointer value_get_request (const GValue* value) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST), NULL); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2443 "scanner.c" } void value_set_request (GValue* value, gpointer v_object) { Request* old; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST)); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_REQUEST)); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_ref (value->data[0].v_pointer); +#line 2463 "scanner.c" } else { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2467 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_unref (old); +#line 2473 "scanner.c" } } void value_take_request (GValue* value, gpointer v_object) { Request* old; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST)); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_REQUEST)); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 2492 "scanner.c" } else { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2496 "scanner.c" } +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_unref (old); +#line 2502 "scanner.c" } } static void request_class_init (RequestClass * klass) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_parent_class = g_type_class_peek_parent (klass); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" REQUEST_CLASS (klass)->finalize = request_finalize; +#line 2512 "scanner.c" } static void request_instance_init (Request * self) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 2519 "scanner.c" } static void request_finalize (Request* obj) { Request * self; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REQUEST, Request); +#line 2527 "scanner.c" } @@ -2006,35 +2544,49 @@ GType request_get_type (void) { gpointer request_ref (gpointer instance) { Request* self; self = instance; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 2552 "scanner.c" } void request_unref (gpointer instance) { Request* self; self = instance; +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" REQUEST_GET_CLASS (self)->finalize (self); +#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 2565 "scanner.c" } } RequestRedetect* request_redetect_construct (GType object_type) { RequestRedetect* self = NULL; +#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (RequestRedetect*) request_construct (object_type); +#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2576 "scanner.c" } RequestRedetect* request_redetect_new (void) { +#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return request_redetect_construct (TYPE_REQUEST_REDETECT); +#line 2583 "scanner.c" } static void request_redetect_class_init (RequestRedetectClass * klass) { +#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_redetect_parent_class = g_type_class_peek_parent (klass); +#line 2590 "scanner.c" } @@ -2056,18 +2608,25 @@ GType request_redetect_get_type (void) { RequestCancel* request_cancel_construct (GType object_type) { RequestCancel* self = NULL; +#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (RequestCancel*) request_construct (object_type); +#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2616 "scanner.c" } RequestCancel* request_cancel_new (void) { +#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return request_cancel_construct (TYPE_REQUEST_CANCEL); +#line 2623 "scanner.c" } static void request_cancel_class_init (RequestCancelClass * klass) { +#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_cancel_parent_class = g_type_class_peek_parent (klass); +#line 2630 "scanner.c" } @@ -2089,19 +2648,27 @@ GType request_cancel_get_type (void) { RequestStartScan* request_start_scan_construct (GType object_type) { RequestStartScan* self = NULL; +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (RequestStartScan*) request_construct (object_type); +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2656 "scanner.c" } RequestStartScan* request_start_scan_new (void) { +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return request_start_scan_construct (TYPE_REQUEST_START_SCAN); +#line 2663 "scanner.c" } static void request_start_scan_class_init (RequestStartScanClass * klass) { +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_start_scan_parent_class = g_type_class_peek_parent (klass); +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" REQUEST_CLASS (klass)->finalize = request_start_scan_finalize; +#line 2672 "scanner.c" } @@ -2111,9 +2678,13 @@ static void request_start_scan_instance_init (RequestStartScan * self) { static void request_start_scan_finalize (Request* obj) { RequestStartScan * self; +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REQUEST_START_SCAN, RequestStartScan); +#line 109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (self->job); +#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" REQUEST_CLASS (request_start_scan_parent_class)->finalize (obj); +#line 2688 "scanner.c" } @@ -2131,18 +2702,25 @@ GType request_start_scan_get_type (void) { RequestQuit* request_quit_construct (GType object_type) { RequestQuit* self = NULL; +#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (RequestQuit*) request_construct (object_type); +#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2710 "scanner.c" } RequestQuit* request_quit_new (void) { +#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return request_quit_construct (TYPE_REQUEST_QUIT); +#line 2717 "scanner.c" } static void request_quit_class_init (RequestQuitClass * klass) { +#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_quit_parent_class = g_type_class_peek_parent (klass); +#line 2724 "scanner.c" } @@ -2164,142 +2742,226 @@ GType request_quit_get_type (void) { Credentials* credentials_construct (GType object_type) { Credentials* self = NULL; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (Credentials*) g_type_create_instance (object_type); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 2750 "scanner.c" } Credentials* credentials_new (void) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return credentials_construct (TYPE_CREDENTIALS); +#line 2757 "scanner.c" } static void value_credentials_init (GValue* value) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2764 "scanner.c" } static void value_credentials_free_value (GValue* value) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials_unref (value->data[0].v_pointer); +#line 2773 "scanner.c" } } static void value_credentials_copy_value (const GValue* src_value, GValue* dest_value) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = credentials_ref (src_value->data[0].v_pointer); +#line 2783 "scanner.c" } else { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 2787 "scanner.c" } } static gpointer value_credentials_peek_pointer (const GValue* value) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2795 "scanner.c" } static gchar* value_credentials_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 2802 "scanner.c" Credentials* object; object = collect_values[0].v_pointer; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 2809 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2813 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = credentials_ref (object); +#line 2817 "scanner.c" } else { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2821 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2825 "scanner.c" } static gchar* value_credentials_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { Credentials** object_p; object_p = collect_values[0].v_pointer; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 2836 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 2842 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 2846 "scanner.c" } else { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = credentials_ref (value->data[0].v_pointer); +#line 2850 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 2854 "scanner.c" } GParamSpec* param_spec_credentials (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecCredentials* spec; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_CREDENTIALS), NULL); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 2868 "scanner.c" } gpointer value_get_credentials (const GValue* value) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS), NULL); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 2877 "scanner.c" } void value_set_credentials (GValue* value, gpointer v_object) { Credentials* old; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS)); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CREDENTIALS)); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials_ref (value->data[0].v_pointer); +#line 2897 "scanner.c" } else { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2901 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials_unref (old); +#line 2907 "scanner.c" } } void value_take_credentials (GValue* value, gpointer v_object) { Credentials* old; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS)); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CREDENTIALS)); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 2926 "scanner.c" } else { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 2930 "scanner.c" } +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials_unref (old); +#line 2936 "scanner.c" } } static void credentials_class_init (CredentialsClass * klass) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials_parent_class = g_type_class_peek_parent (klass); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" CREDENTIALS_CLASS (klass)->finalize = credentials_finalize; +#line 2946 "scanner.c" } static void credentials_instance_init (Credentials * self) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 2953 "scanner.c" } static void credentials_finalize (Credentials* obj) { Credentials * self; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CREDENTIALS, Credentials); +#line 116 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->username); +#line 117 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->password); +#line 2965 "scanner.c" } @@ -2320,17 +2982,24 @@ GType credentials_get_type (void) { gpointer credentials_ref (gpointer instance) { Credentials* self; self = instance; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 2990 "scanner.c" } void credentials_unref (gpointer instance) { Credentials* self; self = instance; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" CREDENTIALS_GET_CLASS (self)->finalize (self); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 3003 "scanner.c" } } @@ -2348,153 +3017,241 @@ GType scan_state_get_type (void) { static void notify_real_run (Notify* self, Scanner* scanner) { +#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 3023 "scanner.c" } void notify_run (Notify* self, Scanner* scanner) { +#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_GET_CLASS (self)->run (self, scanner); +#line 3032 "scanner.c" } Notify* notify_construct (GType object_type) { Notify* self = NULL; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (Notify*) g_type_create_instance (object_type); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3042 "scanner.c" } Notify* notify_new (void) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_construct (TYPE_NOTIFY); +#line 3049 "scanner.c" } static void value_notify_init (GValue* value) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 3056 "scanner.c" } static void value_notify_free_value (GValue* value) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_unref (value->data[0].v_pointer); +#line 3065 "scanner.c" } } static void value_notify_copy_value (const GValue* src_value, GValue* dest_value) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = notify_ref (src_value->data[0].v_pointer); +#line 3075 "scanner.c" } else { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 3079 "scanner.c" } } static gpointer value_notify_peek_pointer (const GValue* value) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 3087 "scanner.c" } static gchar* value_notify_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 3094 "scanner.c" Notify* object; object = collect_values[0].v_pointer; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 3101 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 3105 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = notify_ref (object); +#line 3109 "scanner.c" } else { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 3113 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 3117 "scanner.c" } static gchar* value_notify_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { Notify** object_p; object_p = collect_values[0].v_pointer; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 3128 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 3134 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 3138 "scanner.c" } else { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = notify_ref (value->data[0].v_pointer); +#line 3142 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 3146 "scanner.c" } GParamSpec* param_spec_notify (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecNotify* spec; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_NOTIFY), NULL); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 3160 "scanner.c" } gpointer value_get_notify (const GValue* value) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY), NULL); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 3169 "scanner.c" } void value_set_notify (GValue* value, gpointer v_object) { Notify* old; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY)); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NOTIFY)); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_ref (value->data[0].v_pointer); +#line 3189 "scanner.c" } else { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 3193 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_unref (old); +#line 3199 "scanner.c" } } void value_take_notify (GValue* value, gpointer v_object) { Notify* old; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY)); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NOTIFY)); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 3218 "scanner.c" } else { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 3222 "scanner.c" } +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_unref (old); +#line 3228 "scanner.c" } } static void notify_class_init (NotifyClass * klass) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_parent_class = g_type_class_peek_parent (klass); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_finalize; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_real_run; +#line 3240 "scanner.c" } static void notify_instance_init (Notify * self) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 3247 "scanner.c" } static void notify_finalize (Notify* obj) { Notify * self; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY, Notify); +#line 3255 "scanner.c" } @@ -2515,17 +3272,24 @@ GType notify_get_type (void) { gpointer notify_ref (gpointer instance) { Notify* self; self = instance; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 3280 "scanner.c" } void notify_unref (gpointer instance) { Notify* self; self = instance; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_GET_CLASS (self)->finalize (self); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 3293 "scanner.c" } } @@ -2533,28 +3297,41 @@ void notify_unref (gpointer instance) { static void notify_scanning_changed_real_run (Notify* base, Scanner* scanner) { NotifyScanningChanged * self; Scanner* _tmp0_; +#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyScanningChanged*) base; +#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "scanning-changed"); +#line 3309 "scanner.c" } NotifyScanningChanged* notify_scanning_changed_construct (GType object_type) { NotifyScanningChanged* self = NULL; +#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyScanningChanged*) notify_construct (object_type); +#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3319 "scanner.c" } NotifyScanningChanged* notify_scanning_changed_new (void) { +#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_scanning_changed_construct (TYPE_NOTIFY_SCANNING_CHANGED); +#line 3326 "scanner.c" } static void notify_scanning_changed_class_init (NotifyScanningChangedClass * klass) { +#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_scanning_changed_parent_class = g_type_class_peek_parent (klass); +#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_scanning_changed_real_run; +#line 3335 "scanner.c" } @@ -2575,31 +3352,46 @@ GType notify_scanning_changed_get_type (void) { static void _scan_device_unref0_ (gpointer var) { +#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" (var == NULL) ? NULL : (var = (scan_device_unref (var), NULL)); +#line 3358 "scanner.c" } static void _g_list_free__scan_device_unref0_ (GList* self) { +#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_list_foreach (self, (GFunc) _scan_device_unref0_, NULL); +#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_list_free (self); +#line 3367 "scanner.c" } NotifyUpdateDevices* notify_update_devices_construct (GType object_type, GList* devices) { NotifyUpdateDevices* self = NULL; GList* _tmp0_; +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyUpdateDevices*) notify_construct (object_type); +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = devices; +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" devices = NULL; +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_device_unref0_0 (self->priv->devices); +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->devices = _tmp0_; +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_device_unref0_0 (devices); +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3388 "scanner.c" } NotifyUpdateDevices* notify_update_devices_new (GList* devices) { +#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_update_devices_construct (TYPE_NOTIFY_UPDATE_DEVICES, devices); +#line 3395 "scanner.c" } @@ -2607,32 +3399,49 @@ static void notify_update_devices_real_run (Notify* base, Scanner* scanner) { NotifyUpdateDevices * self; Scanner* _tmp0_; GList* _tmp1_; +#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyUpdateDevices*) base; +#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->devices; +#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "update-devices", _tmp1_); +#line 3413 "scanner.c" } static void notify_update_devices_class_init (NotifyUpdateDevicesClass * klass) { +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_update_devices_parent_class = g_type_class_peek_parent (klass); +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_update_devices_finalize; +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyUpdateDevicesPrivate)); +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_update_devices_real_run; +#line 3426 "scanner.c" } static void notify_update_devices_instance_init (NotifyUpdateDevices * self) { +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_UPDATE_DEVICES_GET_PRIVATE (self); +#line 3433 "scanner.c" } static void notify_update_devices_finalize (Notify* obj) { NotifyUpdateDevices * self; +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevices); +#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_device_unref0_0 (self->priv->devices); +#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_update_devices_parent_class)->finalize (obj); +#line 3445 "scanner.c" } @@ -2652,18 +3461,28 @@ NotifyRequestAuthorization* notify_request_authorization_construct (GType object NotifyRequestAuthorization* self = NULL; const gchar* _tmp0_; gchar* _tmp1_; +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (resource != NULL, NULL); +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyRequestAuthorization*) notify_construct (object_type); +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = resource; +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_strdup (_tmp0_); +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->resource); +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->resource = _tmp1_; +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3479 "scanner.c" } NotifyRequestAuthorization* notify_request_authorization_new (const gchar* resource) { +#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_request_authorization_construct (TYPE_NOTIFY_REQUEST_AUTHORIZATION, resource); +#line 3486 "scanner.c" } @@ -2671,32 +3490,49 @@ static void notify_request_authorization_real_run (Notify* base, Scanner* scanne NotifyRequestAuthorization * self; Scanner* _tmp0_; const gchar* _tmp1_; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyRequestAuthorization*) base; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->resource; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "request-authorization", _tmp1_); +#line 3504 "scanner.c" } static void notify_request_authorization_class_init (NotifyRequestAuthorizationClass * klass) { +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_request_authorization_parent_class = g_type_class_peek_parent (klass); +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_request_authorization_finalize; +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyRequestAuthorizationPrivate)); +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_request_authorization_real_run; +#line 3517 "scanner.c" } static void notify_request_authorization_instance_init (NotifyRequestAuthorization * self) { +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_REQUEST_AUTHORIZATION_GET_PRIVATE (self); +#line 3524 "scanner.c" } static void notify_request_authorization_finalize (Notify* obj) { NotifyRequestAuthorization * self; +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorization); +#line 151 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->resource); +#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_request_authorization_parent_class)->finalize (obj); +#line 3536 "scanner.c" } @@ -2717,20 +3553,32 @@ NotifyScanFailed* notify_scan_failed_construct (GType object_type, gint error_co gint _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (error_string != NULL, NULL); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyScanFailed*) notify_construct (object_type); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = error_code; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->error_code = _tmp0_; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = error_string; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_strdup (_tmp1_); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->error_string); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->error_string = _tmp2_; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3575 "scanner.c" } NotifyScanFailed* notify_scan_failed_new (gint error_code, const gchar* error_string) { +#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_scan_failed_construct (TYPE_NOTIFY_SCAN_FAILED, error_code, error_string); +#line 3582 "scanner.c" } @@ -2739,33 +3587,51 @@ static void notify_scan_failed_real_run (Notify* base, Scanner* scanner) { Scanner* _tmp0_; gint _tmp1_; const gchar* _tmp2_; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyScanFailed*) base; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->error_code; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->error_string; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "scan-failed", _tmp1_, _tmp2_); +#line 3603 "scanner.c" } static void notify_scan_failed_class_init (NotifyScanFailedClass * klass) { +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_scan_failed_parent_class = g_type_class_peek_parent (klass); +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_scan_failed_finalize; +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyScanFailedPrivate)); +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_scan_failed_real_run; +#line 3616 "scanner.c" } static void notify_scan_failed_instance_init (NotifyScanFailed * self) { +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_SCAN_FAILED_GET_PRIVATE (self); +#line 3623 "scanner.c" } static void notify_scan_failed_finalize (Notify* obj) { NotifyScanFailed * self; +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailed); +#line 159 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->error_string); +#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_scan_failed_parent_class)->finalize (obj); +#line 3635 "scanner.c" } @@ -2784,28 +3650,41 @@ GType notify_scan_failed_get_type (void) { static void notify_document_done_real_run (Notify* base, Scanner* scanner) { NotifyDocumentDone * self; Scanner* _tmp0_; +#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyDocumentDone*) base; +#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "document-done"); +#line 3662 "scanner.c" } NotifyDocumentDone* notify_document_done_construct (GType object_type) { NotifyDocumentDone* self = NULL; +#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyDocumentDone*) notify_construct (object_type); +#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3672 "scanner.c" } NotifyDocumentDone* notify_document_done_new (void) { +#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_document_done_construct (TYPE_NOTIFY_DOCUMENT_DONE); +#line 3679 "scanner.c" } static void notify_document_done_class_init (NotifyDocumentDoneClass * klass) { +#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_document_done_parent_class = g_type_class_peek_parent (klass); +#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_document_done_real_run; +#line 3688 "scanner.c" } @@ -2828,28 +3707,41 @@ GType notify_document_done_get_type (void) { static void notify_expect_page_real_run (Notify* base, Scanner* scanner) { NotifyExpectPage * self; Scanner* _tmp0_; +#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyExpectPage*) base; +#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner; +#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp0_, "expect-page"); +#line 3719 "scanner.c" } NotifyExpectPage* notify_expect_page_construct (GType object_type) { NotifyExpectPage* self = NULL; +#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyExpectPage*) notify_construct (object_type); +#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3729 "scanner.c" } NotifyExpectPage* notify_expect_page_new (void) { +#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_expect_page_construct (TYPE_NOTIFY_EXPECT_PAGE); +#line 3736 "scanner.c" } static void notify_expect_page_class_init (NotifyExpectPageClass * klass) { +#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_expect_page_parent_class = g_type_class_peek_parent (klass); +#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_expect_page_real_run; +#line 3745 "scanner.c" } @@ -2870,7 +3762,9 @@ GType notify_expect_page_get_type (void) { static gpointer _scan_page_info_ref0 (gpointer self) { +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? scan_page_info_ref (self) : NULL; +#line 3768 "scanner.c" } @@ -2879,20 +3773,32 @@ NotifyGotPageInfo* notify_got_page_info_construct (GType object_type, gint job_i gint _tmp0_; ScanPageInfo* _tmp1_; ScanPageInfo* _tmp2_; +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (info != NULL, NULL); +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyGotPageInfo*) notify_construct (object_type); +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = job_id; +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_id = _tmp0_; +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = info; +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_page_info_ref0 (_tmp1_); +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_page_info_unref0 (self->priv->info); +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->info = _tmp2_; +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3795 "scanner.c" } NotifyGotPageInfo* notify_got_page_info_new (gint job_id, ScanPageInfo* info) { +#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_got_page_info_construct (TYPE_NOTIFY_GOT_PAGE_INFO, job_id, info); +#line 3802 "scanner.c" } @@ -2903,51 +3809,83 @@ static void notify_got_page_info_real_run (Notify* base, Scanner* scanner) { Scanner* _tmp2_; gint _tmp3_; gboolean _tmp7_; +#line 178 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyGotPageInfo*) base; +#line 178 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->job_id; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = scanner; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->first_job_id; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_ >= _tmp3_) { +#line 3825 "scanner.c" gint _tmp4_; Scanner* _tmp5_; gint _tmp6_; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->job_id; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = scanner; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->job_id; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp4_ < _tmp6_; +#line 3837 "scanner.c" } else { +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = FALSE; +#line 3841 "scanner.c" } +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp0_; +#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp7_) { +#line 3847 "scanner.c" Scanner* _tmp8_; ScanPageInfo* _tmp9_; +#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = scanner; +#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = self->priv->info; +#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp8_, "got-page-info", _tmp9_); +#line 3856 "scanner.c" } } static void notify_got_page_info_class_init (NotifyGotPageInfoClass * klass) { +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_got_page_info_parent_class = g_type_class_peek_parent (klass); +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_got_page_info_finalize; +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyGotPageInfoPrivate)); +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_got_page_info_real_run; +#line 3870 "scanner.c" } static void notify_got_page_info_instance_init (NotifyGotPageInfo * self) { +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_GOT_PAGE_INFO_GET_PRIVATE (self); +#line 3877 "scanner.c" } static void notify_got_page_info_finalize (Notify* obj) { NotifyGotPageInfo * self; +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfo); +#line 177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_page_info_unref0 (self->priv->info); +#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_got_page_info_parent_class)->finalize (obj); +#line 3889 "scanner.c" } @@ -2966,15 +3904,22 @@ GType notify_got_page_info_get_type (void) { NotifyPageDone* notify_page_done_construct (GType object_type, gint job_id) { NotifyPageDone* self = NULL; gint _tmp0_; +#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyPageDone*) notify_construct (object_type); +#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = job_id; +#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_id = _tmp0_; +#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 3916 "scanner.c" } NotifyPageDone* notify_page_done_new (gint job_id) { +#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_page_done_construct (TYPE_NOTIFY_PAGE_DONE, job_id); +#line 3923 "scanner.c" } @@ -2985,48 +3930,78 @@ static void notify_page_done_real_run (Notify* base, Scanner* scanner) { Scanner* _tmp2_; gint _tmp3_; gboolean _tmp7_; +#line 189 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyPageDone*) base; +#line 189 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->job_id; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = scanner; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->first_job_id; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_ >= _tmp3_) { +#line 3946 "scanner.c" gint _tmp4_; Scanner* _tmp5_; gint _tmp6_; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->job_id; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = scanner; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->job_id; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp4_ < _tmp6_; +#line 3958 "scanner.c" } else { +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = FALSE; +#line 3962 "scanner.c" } +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp0_; +#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp7_) { +#line 3968 "scanner.c" Scanner* _tmp8_; +#line 192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = scanner; +#line 192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp8_, "page-done"); +#line 3974 "scanner.c" } } static void notify_page_done_class_init (NotifyPageDoneClass * klass) { +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_page_done_parent_class = g_type_class_peek_parent (klass); +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_page_done_finalize; +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyPageDonePrivate)); +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_page_done_real_run; +#line 3988 "scanner.c" } static void notify_page_done_instance_init (NotifyPageDone * self) { +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_PAGE_DONE_GET_PRIVATE (self); +#line 3995 "scanner.c" } static void notify_page_done_finalize (Notify* obj) { NotifyPageDone * self; +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_PAGE_DONE, NotifyPageDone); +#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_page_done_parent_class)->finalize (obj); +#line 4005 "scanner.c" } @@ -3043,7 +4018,9 @@ GType notify_page_done_get_type (void) { static gpointer _scan_line_ref0 (gpointer self) { +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? scan_line_ref (self) : NULL; +#line 4024 "scanner.c" } @@ -3052,20 +4029,32 @@ NotifyGotLine* notify_got_line_construct (GType object_type, gint job_id, ScanLi gint _tmp0_; ScanLine* _tmp1_; ScanLine* _tmp2_; +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (line != NULL, NULL); +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyGotLine*) notify_construct (object_type); +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = job_id; +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_id = _tmp0_; +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = line; +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_line_ref0 (_tmp1_); +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_line_unref0 (self->priv->line); +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->line = _tmp2_; +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 4051 "scanner.c" } NotifyGotLine* notify_got_line_new (gint job_id, ScanLine* line) { +#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return notify_got_line_construct (TYPE_NOTIFY_GOT_LINE, job_id, line); +#line 4058 "scanner.c" } @@ -3076,51 +4065,83 @@ static void notify_got_line_real_run (Notify* base, Scanner* scanner) { Scanner* _tmp2_; gint _tmp3_; gboolean _tmp7_; +#line 201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (NotifyGotLine*) base; +#line 201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (scanner != NULL); +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->job_id; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = scanner; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->first_job_id; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_ >= _tmp3_) { +#line 4081 "scanner.c" gint _tmp4_; Scanner* _tmp5_; gint _tmp6_; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->job_id; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = scanner; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->job_id; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp4_ < _tmp6_; +#line 4093 "scanner.c" } else { +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = FALSE; +#line 4097 "scanner.c" } +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp0_; +#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp7_) { +#line 4103 "scanner.c" Scanner* _tmp8_; ScanLine* _tmp9_; +#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = scanner; +#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = self->priv->line; +#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_emit_by_name (_tmp8_, "got-line", _tmp9_); +#line 4112 "scanner.c" } } static void notify_got_line_class_init (NotifyGotLineClass * klass) { +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_got_line_parent_class = g_type_class_peek_parent (klass); +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->finalize = notify_got_line_finalize; +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (NotifyGotLinePrivate)); +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (klass)->run = notify_got_line_real_run; +#line 4126 "scanner.c" } static void notify_got_line_instance_init (NotifyGotLine * self) { +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = NOTIFY_GOT_LINE_GET_PRIVATE (self); +#line 4133 "scanner.c" } static void notify_got_line_finalize (Notify* obj) { NotifyGotLine * self; +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_GOT_LINE, NotifyGotLine); +#line 200 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_line_unref0 (self->priv->line); +#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" NOTIFY_CLASS (notify_got_line_parent_class)->finalize (obj); +#line 4145 "scanner.c" } @@ -3137,28 +4158,39 @@ GType notify_got_line_get_type (void) { static void _scan_job_unref0_ (gpointer var) { +#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" (var == NULL) ? NULL : (var = (scan_job_unref (var), NULL)); +#line 4164 "scanner.c" } static void _g_list_free__scan_job_unref0_ (GList* self) { +#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_list_foreach (self, (GFunc) _scan_job_unref0_, NULL); +#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_list_free (self); +#line 4173 "scanner.c" } static void _request_unref0_ (gpointer var) { +#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" (var == NULL) ? NULL : (var = (request_unref (var), NULL)); +#line 4180 "scanner.c" } static void _notify_unref0_ (gpointer var) { +#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" (var == NULL) ? NULL : (var = (notify_unref (var), NULL)); +#line 4187 "scanner.c" } static void _credentials_unref0_ (gpointer var) { +#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" (var == NULL) ? NULL : (var = (credentials_unref (var), NULL)); +#line 4194 "scanner.c" } @@ -3167,27 +4199,43 @@ static Scanner* scanner_construct (GType object_type) { GAsyncQueue* _tmp0_; GAsyncQueue* _tmp1_; GAsyncQueue* _tmp2_; +#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = (Scanner*) g_type_create_instance (object_type); +#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = g_async_queue_new_full (_request_unref0_); +#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->request_queue); +#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->request_queue = _tmp0_; +#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_async_queue_new_full (_notify_unref0_); +#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->notify_queue); +#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->notify_queue = _tmp1_; +#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_async_queue_new_full (_credentials_unref0_); +#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->authorize_queue); +#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->authorize_queue = _tmp2_; +#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self; +#line 4225 "scanner.c" } static Scanner* scanner_new (void) { +#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return scanner_construct (TYPE_SCANNER); +#line 4232 "scanner.c" } static gpointer _scanner_ref0 (gpointer self) { +#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? scanner_ref (self) : NULL; +#line 4239 "scanner.c" } @@ -3196,17 +4244,29 @@ Scanner* scanner_get_instance (void) { Scanner* _tmp0_; Scanner* _tmp2_; Scanner* _tmp3_; +#line 280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner_scanner_object; +#line 280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp0_ == NULL) { +#line 4252 "scanner.c" Scanner* _tmp1_; +#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = scanner_new (); +#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scanner_unref0 (scanner_scanner_object); +#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_scanner_object = _tmp1_; +#line 4260 "scanner.c" } +#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = scanner_scanner_object; +#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _scanner_ref0 (_tmp2_); +#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp3_; +#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4270 "scanner.c" } @@ -3215,26 +4275,39 @@ static gboolean scanner_notify_idle_cb (Scanner* self) { GAsyncQueue* _tmp0_; gpointer _tmp1_ = NULL; Notify* notification; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->notify_queue; +#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_async_queue_pop (_tmp0_); +#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notification = (Notify*) _tmp1_; +#line 288 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" notify_run (notification, self); +#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = FALSE; +#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (notification); +#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4295 "scanner.c" } static gpointer _notify_ref0 (gpointer self) { +#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? notify_ref (self) : NULL; +#line 4302 "scanner.c" } static gboolean _scanner_notify_idle_cb_gsource_func (gpointer self) { gboolean result; result = scanner_notify_idle_cb (self); +#line 295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4311 "scanner.c" } @@ -3242,13 +4315,21 @@ static void scanner_notify (Scanner* self, Notify* notification) { GAsyncQueue* _tmp0_; Notify* _tmp1_; Notify* _tmp2_; +#line 292 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 292 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (notification != NULL); +#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->notify_queue; +#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = notification; +#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _notify_ref0 (_tmp1_); +#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_async_queue_push (_tmp0_, _tmp2_); +#line 295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _scanner_notify_idle_cb_gsource_func, scanner_ref (self), scanner_unref); +#line 4333 "scanner.c" } @@ -3258,44 +4339,78 @@ static void scanner_set_scanning (Scanner* self, gboolean is_scanning) { gboolean _tmp2_; gboolean _tmp4_; gboolean _tmp9_; +#line 298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->scanning; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp2_) { +#line 4349 "scanner.c" gboolean _tmp3_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = is_scanning; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = !_tmp3_; +#line 4355 "scanner.c" } else { +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = FALSE; +#line 4359 "scanner.c" } +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp1_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp4_) { +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = TRUE; +#line 4367 "scanner.c" } else { gboolean _tmp5_ = FALSE; gboolean _tmp6_; gboolean _tmp8_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = self->priv->scanning; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp6_) { +#line 4376 "scanner.c" gboolean _tmp7_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = is_scanning; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp7_; +#line 4382 "scanner.c" } else { +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = FALSE; +#line 4386 "scanner.c" } +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp5_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp8_; +#line 4392 "scanner.c" } +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = _tmp0_; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp9_) { +#line 4398 "scanner.c" gboolean _tmp10_; NotifyScanningChanged* _tmp11_; NotifyScanningChanged* _tmp12_; +#line 302 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = is_scanning; +#line 302 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->scanning = _tmp10_; +#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = notify_scanning_changed_new (); +#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_; +#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp12_); +#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp12_); +#line 4414 "scanner.c" } } @@ -3304,12 +4419,19 @@ static gboolean string_contains (const gchar* self, const gchar* needle) { gboolean result = FALSE; const gchar* _tmp0_; gchar* _tmp1_ = NULL; +#line 1238 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, FALSE); +#line 1238 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (needle != NULL, FALSE); +#line 1239 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp0_ = needle; +#line 1239 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); +#line 1239 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" result = _tmp1_ != NULL; +#line 1239 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return result; +#line 4435 "scanner.c" } @@ -3319,21 +4441,37 @@ static gint scanner_get_device_weight (const gchar* device) { gboolean _tmp1_ = FALSE; const gchar* _tmp2_; gboolean _tmp3_ = FALSE; +#line 307 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (device != NULL, 0); +#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = device; +#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_str_has_prefix (_tmp0_, "vfl:"); +#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_) { +#line 313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = 2; +#line 313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4457 "scanner.c" } +#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = device; +#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = string_contains (_tmp2_, "usb"); +#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp3_) { +#line 317 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = 0; +#line 317 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4469 "scanner.c" } +#line 319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = 1; +#line 319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4475 "scanner.c" } @@ -3355,134 +4493,241 @@ static gint scanner_compare_devices (ScanDevice* device1, ScanDevice* device2) { ScanDevice* _tmp13_; const gchar* _tmp14_; gint _tmp15_ = 0; +#line 322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (device1 != NULL, 0); +#line 322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (device2 != NULL, 0); +#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = device1; +#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->name; +#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = scanner_get_device_weight (_tmp1_); +#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" weight1 = _tmp2_; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = device2; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_->name; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = scanner_get_device_weight (_tmp4_); +#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" weight2 = _tmp5_; +#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = weight1; +#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = weight2; +#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp6_ != _tmp7_) { +#line 4523 "scanner.c" gint _tmp8_; gint _tmp9_; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = weight1; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = weight2; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp8_ - _tmp9_; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4534 "scanner.c" } +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = g_strcmp0; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = device1; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_->label; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = device2; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _tmp13_->label; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = _tmp10_ (_tmp12_, _tmp14_); +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp15_; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4552 "scanner.c" } static gchar* sane_status_to_string (SANE_Status status) { gchar* result = NULL; SANE_Status _tmp0_; +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp0_ = status; +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" switch (_tmp0_) { +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_GOOD: +#line 4565 "scanner.c" { gchar* _tmp1_; +#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp1_ = g_strdup ("SANE_STATUS_GOOD"); +#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp1_; +#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4574 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_UNSUPPORTED: +#line 4578 "scanner.c" { gchar* _tmp2_; +#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp2_ = g_strdup ("SANE_STATUS_UNSUPPORTED"); +#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp2_; +#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4587 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_CANCELLED: +#line 4591 "scanner.c" { gchar* _tmp3_; +#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp3_ = g_strdup ("SANE_STATUS_CANCELLED"); +#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp3_; +#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4600 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_DEVICE_BUSY: +#line 4604 "scanner.c" { gchar* _tmp4_; +#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp4_ = g_strdup ("SANE_STATUS_DEVICE_BUSY"); +#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp4_; +#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4613 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_INVAL: +#line 4617 "scanner.c" { gchar* _tmp5_; +#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp5_ = g_strdup ("SANE_STATUS_INVAL"); +#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp5_; +#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4626 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_EOF: +#line 4630 "scanner.c" { gchar* _tmp6_; +#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp6_ = g_strdup ("SANE_STATUS_EOF"); +#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp6_; +#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4639 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_JAMMED: +#line 4643 "scanner.c" { gchar* _tmp7_; +#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp7_ = g_strdup ("SANE_STATUS_JAMMED"); +#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp7_; +#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4652 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_NO_DOCS: +#line 4656 "scanner.c" { gchar* _tmp8_; +#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp8_ = g_strdup ("SANE_STATUS_NO_DOCS"); +#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp8_; +#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4665 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_COVER_OPEN: +#line 4669 "scanner.c" { gchar* _tmp9_; +#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp9_ = g_strdup ("SANE_STATUS_COVER_OPEN"); +#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp9_; +#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4678 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_IO_ERROR: +#line 4682 "scanner.c" { gchar* _tmp10_; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp10_ = g_strdup ("SANE_STATUS_IO_ERROR"); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp10_; +#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4691 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_NO_MEM: +#line 4695 "scanner.c" { gchar* _tmp11_; +#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp11_ = g_strdup ("SANE_STATUS_NO_MEM"); +#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp11_; +#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4704 "scanner.c" } +#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_STATUS_ACCESS_DENIED: +#line 4708 "scanner.c" { gchar* _tmp12_; +#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp12_ = g_strdup ("SANE_STATUS_ACCESS_DENIED"); +#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp12_; +#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4717 "scanner.c" } default: { SANE_Status _tmp13_; gchar* _tmp14_ = NULL; +#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp13_ = status; +#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp14_ = g_strdup_printf ("SANE_STATUS(%d)", (gint) _tmp13_); +#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp14_; +#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 4731 "scanner.c" } } } @@ -3491,9 +4736,13 @@ static gchar* sane_status_to_string (SANE_Status status) { static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { gchar* result = NULL; GError * _inner_error_ = NULL; +#line 1242 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); +#line 1242 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (old != NULL, NULL); +#line 1242 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (replacement != NULL, NULL); +#line 4746 "scanner.c" { const gchar* _tmp0_; gchar* _tmp1_ = NULL; @@ -3505,66 +4754,111 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar* const gchar* _tmp6_; gchar* _tmp7_ = NULL; gchar* _tmp8_; +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp0_ = old; +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp1_ = g_regex_escape_string (_tmp0_, -1); +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp2_ = _tmp1_; +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp4_ = _tmp3_; +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _g_free0 (_tmp2_); +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" regex = _tmp4_; +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" if (_inner_error_ != NULL) { +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch13_g_regex_error; +#line 4776 "scanner.c" + goto __catch14_g_regex_error; } +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); +#line 1244 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return NULL; +#line 4785 "scanner.c" } +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp5_ = regex; +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp6_ = replacement; +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp7_ = g_regex_replace_literal (_tmp5_, self, (gssize) (-1), 0, _tmp6_, 0, &_inner_error_); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp8_ = _tmp7_; +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" if (_inner_error_ != NULL) { +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" if (_inner_error_->domain == G_REGEX_ERROR) { - goto __catch13_g_regex_error; +#line 4801 "scanner.c" + goto __catch14_g_regex_error; } +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return NULL; +#line 4812 "scanner.c" } +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" result = _tmp8_; +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); +#line 1245 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return result; +#line 4820 "scanner.c" } - goto __finally13; - __catch13_g_regex_error: + goto __finally14; + __catch14_g_regex_error: { GError* e = NULL; +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" e = _inner_error_; +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _inner_error_ = NULL; +#line 1247 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_assert_not_reached (); +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _g_error_free0 (e); +#line 4834 "scanner.c" } - __finally13: + __finally14: +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" if (_inner_error_ != NULL) { +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); +#line 1243 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return NULL; +#line 4845 "scanner.c" } } static gpointer _scan_device_ref0 (gpointer self) { +#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? scan_device_ref (self) : NULL; +#line 4853 "scanner.c" } static gint _scanner_compare_devices_gcompare_func (gconstpointer a, gconstpointer b) { gint result; result = scanner_compare_devices (a, b); +#line 369 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 4862 "scanner.c" } @@ -3584,39 +4878,70 @@ static void scanner_do_redetect (Scanner* self) { GList* _tmp64_; NotifyUpdateDevices* _tmp65_; NotifyUpdateDevices* _tmp66_; +#line 334 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" device_list = NULL; +#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" device_list_length1 = 0; +#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _device_list_size_ = device_list_length1; +#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = sane_get_devices (&_tmp0_, FALSE); +#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" device_list = _tmp0_; +#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" device_list_length1 = -1; +#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _device_list_size_ = device_list_length1; +#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp1_; +#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = status; +#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = sane_status_to_string (_tmp2_); +#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_; - g_debug ("scanner.vala:334: sane_get_devices () -> %s", _tmp4_); +#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:338: sane_get_devices () -> %s", _tmp4_); +#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp4_); +#line 339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = status; +#line 339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp5_ != SANE_STATUS_GOOD) { +#line 4914 "scanner.c" SANE_Status _tmp6_; const gchar* _tmp7_ = NULL; +#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = status; +#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = sane_strstatus (_tmp6_); - g_warning ("scanner.vala:337: Unable to get SANE devices: %s", _tmp7_); +#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:341: Unable to get SANE devices: %s", _tmp7_); +#line 342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->need_redetect = FALSE; +#line 343 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_IDLE; +#line 344 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 4929 "scanner.c" } +#line 347 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" devices = NULL; +#line 4933 "scanner.c" { gint i; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 4938 "scanner.c" { gboolean _tmp8_; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = TRUE; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 4945 "scanner.c" gboolean _tmp9_; SANE_Device** _tmp11_; gint _tmp11__length1; @@ -3673,95 +4998,182 @@ static void scanner_do_redetect (Scanner* self) { gchar* _tmp54_; ScanDevice* _tmp55_; ScanDevice* _tmp56_; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = _tmp8_; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp9_) { +#line 5006 "scanner.c" gint _tmp10_; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = i; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp10_ + 1; +#line 5012 "scanner.c" } +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = FALSE; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = device_list; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11__length1 = device_list_length1; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = i; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = _tmp11_[_tmp12_]; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp13_ != NULL)) { +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 5028 "scanner.c" } +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = device_list; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14__length1 = device_list_length1; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = i; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp14_[_tmp15_]; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _tmp16_->name; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = device_list; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18__length1 = device_list_length1; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = i; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = _tmp18_[_tmp19_]; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = _tmp20_->vendor; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = device_list; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22__length1 = device_list_length1; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = i; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = _tmp22_[_tmp23_]; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = _tmp24_->model; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = device_list; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26__length1 = device_list_length1; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = i; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = _tmp26_[_tmp27_]; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = _tmp28_->type; - g_debug ("scanner.vala:346: Device: name=\"%s\" vendor=\"%s\" model=\"%s\" type=" \ +#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:350: Device: name=\"%s\" vendor=\"%s\" model=\"%s\" type=" \ "\"%s\"", _tmp17_, _tmp21_, _tmp25_, _tmp29_); +#line 353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = scan_device_new (); +#line 353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scan_device = _tmp30_; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = scan_device; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = device_list; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32__length1 = device_list_length1; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = i; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = _tmp32_[_tmp33_]; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _tmp34_->name; +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = g_strdup (_tmp35_); +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp31_->name); +#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_->name = _tmp36_; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = device_list; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37__length1 = device_list_length1; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = i; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = _tmp37_[_tmp38_]; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = _tmp39_->vendor; +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = g_strdup (_tmp40_); +#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" vendor = _tmp41_; +#line 358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = vendor; +#line 358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp42_, "Hewlett-Packard") == 0) { +#line 5112 "scanner.c" gchar* _tmp43_; +#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = g_strdup ("HP"); +#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (vendor); +#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" vendor = _tmp43_; +#line 5120 "scanner.c" } +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = scan_device; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = vendor; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = device_list; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46__length1 = device_list_length1; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = i; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = _tmp46_[_tmp47_]; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = _tmp48_->model; +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = g_strdup_printf ("%s %s", _tmp45_, _tmp49_); +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp44_->label); +#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_->label = _tmp50_; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = scan_device; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = _tmp51_->label; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = string_replace (_tmp52_, "_", " "); +#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_ = _tmp53_; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp54_); +#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp55_ = scan_device; +#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_ = _scan_device_ref0 (_tmp55_); +#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" devices = g_list_append (devices, _tmp56_); +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (vendor); +#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_device_unref0 (scan_device); +#line 5162 "scanner.c" } } } +#line 369 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" devices = g_list_sort (devices, _scanner_compare_devices_gcompare_func); +#line 371 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->need_redetect = FALSE; +#line 372 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_IDLE; +#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = devices; +#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp57_ != NULL) { +#line 5176 "scanner.c" GList* _tmp58_; gconstpointer _tmp59_ = NULL; ScanDevice* _tmp60_; @@ -3769,27 +5181,213 @@ static void scanner_do_redetect (Scanner* self) { ScanDevice* _tmp61_; const gchar* _tmp62_; gchar* _tmp63_; +#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp58_ = devices; +#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_ = g_list_nth_data (_tmp58_, (guint) 0); +#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60_ = _scan_device_ref0 ((ScanDevice*) _tmp59_); +#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" device = _tmp60_; +#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp61_ = device; +#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp62_ = _tmp61_->name; +#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp63_ = g_strdup (_tmp62_); +#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->default_device); +#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->default_device = _tmp63_; +#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_device_unref0 (device); +#line 5204 "scanner.c" } else { +#line 380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->default_device); +#line 380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->default_device = NULL; +#line 5210 "scanner.c" } +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp64_ = devices; +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" devices = NULL; +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp65_ = notify_update_devices_new (_tmp64_); +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp66_ = _tmp65_; +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp66_); +#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp66_); +#line 334 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_device_unref0_0 (devices); +#line 5226 "scanner.c" +} + + +static gint scanner_scale_int (Scanner* self, gint source_min, gint source_max, SANE_Option_Descriptor* option, gint value) { + gint result = 0; + gint _tmp0_; + gint v; + SANE_Option_Descriptor* _tmp1_; + SANE_Value_Type _tmp2_; + gint _tmp3_; + gboolean _tmp4_ = FALSE; + SANE_Option_Descriptor* _tmp5_; + SANE_Constraint_Type _tmp6_; + gboolean _tmp13_; +#line 385 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_return_val_if_fail (self != NULL, 0); +#line 385 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_return_val_if_fail (option != NULL, 0); +#line 387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp0_ = value; +#line 387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + v = _tmp0_; +#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp1_ = option; +#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp2_ = _tmp1_->type; +#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp3_ = value; +#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_return_val_if_fail (_tmp2_ == SANE_TYPE_INT, _tmp3_); +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp5_ = option; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp6_ = _tmp5_->constraint_type; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp6_ == SANE_CONSTRAINT_RANGE) { +#line 5263 "scanner.c" + SANE_Option_Descriptor* _tmp7_; + SANE_Range* _tmp8_; + SANE_Word _tmp9_; + SANE_Option_Descriptor* _tmp10_; + SANE_Range* _tmp11_; + SANE_Word _tmp12_; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp7_ = option; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp8_ = _tmp7_->constraint.range; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp9_ = _tmp8_->max; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp10_ = option; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp11_ = _tmp10_->constraint.range; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp12_ = _tmp11_->min; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp4_ = _tmp9_ != _tmp12_; +#line 5284 "scanner.c" + } else { +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp4_ = FALSE; +#line 5288 "scanner.c" + } +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp13_ = _tmp4_; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp13_) { +#line 5294 "scanner.c" + gint _tmp14_; + gint _tmp15_; + gint _tmp16_; + SANE_Option_Descriptor* _tmp17_; + SANE_Range* _tmp18_; + SANE_Word _tmp19_; + SANE_Option_Descriptor* _tmp20_; + SANE_Range* _tmp21_; + SANE_Word _tmp22_; + gint _tmp23_; + gint _tmp24_; + gint _tmp25_; + gint _tmp26_; + SANE_Option_Descriptor* _tmp27_; + SANE_Range* _tmp28_; + SANE_Word _tmp29_; + gint _tmp30_; + gint _tmp31_; + gint _tmp32_; + gint _tmp33_; + SANE_Option_Descriptor* _tmp34_; + SANE_Range* _tmp35_; + SANE_Word _tmp36_; + SANE_Option_Descriptor* _tmp37_; + SANE_Range* _tmp38_; + SANE_Word _tmp39_; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp14_ = v; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp15_ = source_min; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + v = _tmp14_ - _tmp15_; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp16_ = v; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp17_ = option; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp18_ = _tmp17_->constraint.range; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp19_ = _tmp18_->max; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp20_ = option; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp21_ = _tmp20_->constraint.range; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp22_ = _tmp21_->min; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + v = _tmp16_ * ((gint) (_tmp19_ - _tmp22_)); +#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp23_ = v; +#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp24_ = source_max; +#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp25_ = source_min; +#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + v = _tmp23_ / (_tmp24_ - _tmp25_); +#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp26_ = v; +#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp27_ = option; +#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp28_ = _tmp27_->constraint.range; +#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_ = _tmp28_->min; +#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + v = _tmp26_ + ((gint) _tmp29_); +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp30_ = value; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp31_ = source_min; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp32_ = source_max; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp33_ = v; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp34_ = option; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp35_ = _tmp34_->constraint.range; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp36_ = _tmp35_->min; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_ = option; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp38_ = _tmp37_->constraint.range; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp39_ = _tmp38_->max; +#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:397: scale_int: scaling %d [min: %d, max: %d] to %d [min:" \ +" %d, max: %d]", _tmp30_, _tmp31_, _tmp32_, _tmp33_, (gint) _tmp36_, (gint) _tmp39_); +#line 5383 "scanner.c" + } +#line 401 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + result = v; +#line 401 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + return result; +#line 5389 "scanner.c" } @@ -3807,39 +5405,70 @@ static gboolean scanner_set_default_option (Scanner* self, SANE_Handle handle, S gchar* _tmp8_; SANE_Status _tmp9_; SANE_Status _tmp14_; +#line 404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (option != NULL, FALSE); +#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = option; +#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->cap; +#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp1_ & SANE_CAP_AUTOMATIC) == ((SANE_Int) 0)) { +#line 408 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = FALSE; +#line 408 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 5421 "scanner.c" } +#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = handle; +#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = option_index; +#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = sane_control_option (_tmp2_, _tmp3_, SANE_ACTION_SET_AUTO, NULL, NULL); +#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp4_; +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = option_index; +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = status; +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = sane_status_to_string (_tmp6_); +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp7_; - g_debug ("scanner.vala:388: sane_control_option (%d, SANE_ACTION_SET_AUTO) -> %s", (gint) _tmp5_, _tmp8_); +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:411: sane_control_option (%d, SANE_ACTION_SET_AUTO) -> %s", (gint) _tmp5_, _tmp8_); +#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp8_); +#line 412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = status; +#line 412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp9_ != SANE_STATUS_GOOD) { +#line 5447 "scanner.c" SANE_Option_Descriptor* _tmp10_; const gchar* _tmp11_; SANE_Status _tmp12_; const gchar* _tmp13_ = NULL; +#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = option; +#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->name; +#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = status; +#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = sane_strstatus (_tmp12_); - g_warning ("scanner.vala:390: Error setting default option %s: %s", _tmp11_, _tmp13_); +#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:413: Error setting default option %s: %s", _tmp11_, _tmp13_); +#line 5462 "scanner.c" } +#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = status; +#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp14_ == SANE_STATUS_GOOD; +#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 5470 "scanner.c" } @@ -3864,42 +5493,78 @@ static void scanner_set_bool_option (Scanner* self, SANE_Handle handle, SANE_Opt gchar* _tmp14_ = NULL; gchar* _tmp15_; const gchar* _tmp16_; +#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (option != NULL); +#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = option; +#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->type; +#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (_tmp1_ == SANE_TYPE_BOOL); +#line 422 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = value; +#line 422 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = (SANE_Bool) _tmp2_; +#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = handle; +#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = option_index; +#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = sane_control_option (_tmp3_, _tmp4_, SANE_ACTION_SET_VALUE, &v, NULL); +#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp5_; +#line 424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = v; +#line 424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = (gboolean) _tmp6_; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = value; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp8_) { +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = "SANE_TRUE"; +#line 5527 "scanner.c" } else { +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = "SANE_FALSE"; +#line 5531 "scanner.c" } +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = _vala_result; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp10_) { +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = "SANE_TRUE"; +#line 5539 "scanner.c" } else { +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = "SANE_FALSE"; +#line 5543 "scanner.c" } +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = option_index; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp7_; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = status; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = sane_status_to_string (_tmp13_); +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = _tmp14_; +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp9_; - g_debug ("scanner.vala:402: sane_control_option (%d, SANE_ACTION_SET_VALUE, %s) " \ +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:425: sane_control_option (%d, SANE_ACTION_SET_VALUE, %s) " \ "-> (%s, %s)", (gint) _tmp11_, _tmp12_, _tmp15_, _tmp16_); +#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp15_); +#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 5565 "scanner.c" } } @@ -3922,16 +5587,27 @@ static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Opti gchar* _tmp55_; SANE_Int _tmp56_; SANE_Int _tmp57_; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (option != NULL); +#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = option; +#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->type; +#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (_tmp1_ == SANE_TYPE_INT); +#line 432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = value; +#line 432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = (SANE_Int) _tmp2_; +#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = option; +#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_->constraint_type; +#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp4_ == SANE_CONSTRAINT_RANGE) { +#line 5608 "scanner.c" SANE_Option_Descriptor* _tmp5_; SANE_Range* _tmp6_; SANE_Word _tmp7_; @@ -3943,66 +5619,112 @@ static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Opti SANE_Option_Descriptor* _tmp20_; SANE_Range* _tmp21_; SANE_Word _tmp22_; +#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = option; +#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->constraint.range; +#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp6_->quant; +#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp7_ != ((SANE_Word) 0)) { +#line 5628 "scanner.c" SANE_Int _tmp8_; SANE_Option_Descriptor* _tmp9_; SANE_Range* _tmp10_; SANE_Word _tmp11_; +#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = v; +#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = option; +#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = _tmp9_->constraint.range; +#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->quant; +#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = _tmp8_ * _tmp11_; +#line 5643 "scanner.c" } +#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = v; +#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = option; +#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _tmp13_->constraint.range; +#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = _tmp14_->min; +#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp12_ < ((SANE_Int) _tmp15_)) { +#line 5655 "scanner.c" SANE_Option_Descriptor* _tmp16_; SANE_Range* _tmp17_; SANE_Word _tmp18_; +#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = option; +#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _tmp16_->constraint.range; +#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = _tmp17_->min; +#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = (SANE_Int) _tmp18_; +#line 5667 "scanner.c" } +#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = v; +#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = option; +#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = _tmp20_->constraint.range; +#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = _tmp21_->max; +#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp19_ > ((SANE_Int) _tmp22_)) { +#line 5679 "scanner.c" SANE_Option_Descriptor* _tmp23_; SANE_Range* _tmp24_; SANE_Word _tmp25_; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = option; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = _tmp23_->constraint.range; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = _tmp24_->max; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = (SANE_Int) _tmp25_; +#line 5691 "scanner.c" } } else { SANE_Option_Descriptor* _tmp26_; SANE_Constraint_Type _tmp27_; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = option; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp26_->constraint_type; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp27_ == SANE_CONSTRAINT_WORD_LIST) { +#line 5702 "scanner.c" gint _tmp28_; gint distance; gint nearest; gint _tmp48_; +#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = G_MAXINT; +#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" distance = _tmp28_; +#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" nearest = 0; +#line 5713 "scanner.c" { gint i; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 5718 "scanner.c" { gboolean _tmp29_; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = TRUE; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 5725 "scanner.c" gboolean _tmp30_; gint _tmp32_; SANE_Option_Descriptor* _tmp33_; @@ -4022,66 +5744,121 @@ static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Opti gint _tmp43_ = 0; gint _tmp44_; gint _tmp45_; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = _tmp29_; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp30_) { +#line 5749 "scanner.c" gint _tmp31_; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = i; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp31_ + 1; +#line 5755 "scanner.c" } +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = FALSE; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = i; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = option; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = _tmp33_->constraint.word_list; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34__length1 = -1; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _tmp34_[0]; +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(((SANE_Word) _tmp32_) < _tmp35_)) { +#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 5773 "scanner.c" } +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = option; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = _tmp36_->constraint.word_list; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37__length1 = -1; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = i; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = _tmp37_[_tmp38_ + 1]; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" x = (gint) _tmp39_; +#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = x; +#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = v; +#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" d = (gint) (_tmp40_ - _tmp41_); +#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = d; +#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = abs (_tmp42_); +#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" d = _tmp43_; +#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = d; +#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = distance; +#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp44_ < _tmp45_) { +#line 5805 "scanner.c" gint _tmp46_; gint _tmp47_; +#line 454 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = d; +#line 454 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" distance = _tmp46_; +#line 455 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = x; +#line 455 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" nearest = _tmp47_; +#line 5816 "scanner.c" } } } } +#line 458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = nearest; +#line 458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = (SANE_Int) _tmp48_; +#line 5825 "scanner.c" } } +#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = handle; +#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = option_index; +#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = sane_control_option (_tmp49_, _tmp50_, SANE_ACTION_SET_VALUE, &v, NULL); +#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp51_; +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = option_index; +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = value; +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_ = sane_status_to_string (status); +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp55_ = _tmp54_; +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_ = v; - g_debug ("scanner.vala:439: sane_control_option (%d, SANE_ACTION_SET_VALUE, %d) " \ +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:462: sane_control_option (%d, SANE_ACTION_SET_VALUE, %d) " \ "-> (%s, %d)", (gint) _tmp52_, _tmp53_, _tmp55_, (gint) _tmp56_); +#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp55_); +#line 463 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = v; +#line 463 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = (gint) _tmp57_; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 5858 "scanner.c" } } @@ -4107,16 +5884,27 @@ static void scanner_set_fixed_option (Scanner* self, SANE_Handle handle, SANE_Op gchar* _tmp51_; gdouble _tmp52_ = 0.0; gdouble _tmp53_ = 0.0; +#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (option != NULL); +#line 468 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = value; +#line 468 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = _tmp0_; +#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = option; +#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _tmp1_->type; +#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (_tmp2_ == SANE_TYPE_FIXED); +#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = option; +#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_->constraint_type; +#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp4_ == SANE_CONSTRAINT_RANGE) { +#line 5904 "scanner.c" SANE_Option_Descriptor* _tmp5_; SANE_Range* _tmp6_; SANE_Word _tmp7_; @@ -4131,50 +5919,87 @@ static void scanner_set_fixed_option (Scanner* self, SANE_Handle handle, SANE_Op gdouble _tmp14_; gdouble _tmp16_; gdouble _tmp17_; +#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = option; +#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->constraint.range; +#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp6_->min; +#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = SANE_UNFIX ((SANE_Fixed) _tmp7_); +#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" min = _tmp8_; +#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = option; +#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = _tmp9_->constraint.range; +#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->max; +#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = SANE_UNFIX ((SANE_Fixed) _tmp11_); +#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" max = _tmp12_; +#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = v; +#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = min; +#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp13_ < _tmp14_) { +#line 5945 "scanner.c" gdouble _tmp15_; +#line 479 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = min; +#line 479 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = _tmp15_; +#line 5951 "scanner.c" } +#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = v; +#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = max; +#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp16_ > _tmp17_) { +#line 5959 "scanner.c" gdouble _tmp18_; +#line 481 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = max; +#line 481 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = _tmp18_; +#line 5965 "scanner.c" } } else { SANE_Option_Descriptor* _tmp19_; SANE_Constraint_Type _tmp20_; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = option; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = _tmp19_->constraint_type; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp20_ == SANE_CONSTRAINT_WORD_LIST) { +#line 5976 "scanner.c" gdouble _tmp21_; gdouble distance; gdouble nearest; gdouble _tmp42_; +#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = DBL_MAX; +#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" distance = _tmp21_; +#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" nearest = 0.0; +#line 5987 "scanner.c" { gint i; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 5992 "scanner.c" { gboolean _tmp22_; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = TRUE; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 5999 "scanner.c" gboolean _tmp23_; gint _tmp25_; SANE_Option_Descriptor* _tmp26_; @@ -4192,70 +6017,127 @@ static void scanner_set_fixed_option (Scanner* self, SANE_Handle handle, SANE_Op gdouble _tmp35_; gdouble _tmp36_ = 0.0; gdouble _tmp37_; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = _tmp22_; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp23_) { +#line 6021 "scanner.c" gint _tmp24_; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = i; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp24_ + 1; +#line 6027 "scanner.c" } +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = FALSE; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = i; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = option; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp26_->constraint.word_list; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27__length1 = -1; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = _tmp27_[0]; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(((SANE_Word) _tmp25_) < _tmp28_)) { +#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6045 "scanner.c" } +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = option; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = _tmp29_->constraint.word_list; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30__length1 = -1; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = i; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = _tmp30_[_tmp31_ + 1]; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = SANE_UNFIX ((SANE_Fixed) _tmp32_); +#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" x = _tmp33_; +#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = x; +#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = v; +#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = fabs (_tmp34_ - _tmp35_); +#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = distance; +#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp36_ < _tmp37_) { +#line 6071 "scanner.c" gdouble _tmp38_; gdouble _tmp39_; gdouble _tmp40_ = 0.0; gdouble _tmp41_; +#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = x; +#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = v; +#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = fabs (_tmp38_ - _tmp39_); +#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" distance = _tmp40_; +#line 494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = x; +#line 494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" nearest = _tmp41_; +#line 6088 "scanner.c" } } } } +#line 497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = nearest; +#line 497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v = _tmp42_; +#line 6097 "scanner.c" } } +#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = v; +#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = SANE_FIX (_tmp43_); +#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" v_fixed = _tmp44_; +#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = handle; +#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = option_index; +#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = sane_control_option (_tmp45_, _tmp46_, SANE_ACTION_SET_VALUE, &v_fixed, NULL); +#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp47_; +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = option_index; +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = value; +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = sane_status_to_string (status); +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = _tmp50_; +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = SANE_UNFIX (v_fixed); - g_debug ("scanner.vala:479: sane_control_option (%d, SANE_ACTION_SET_VALUE, %f) " \ +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:502: sane_control_option (%d, SANE_ACTION_SET_VALUE, %f) " \ "-> (%s, %f)", (gint) _tmp48_, _tmp49_, _tmp51_, _tmp52_); +#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp51_); +#line 504 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = SANE_UNFIX (v_fixed); +#line 504 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = _tmp53_; +#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 6136 "scanner.c" } } @@ -4264,11 +6146,17 @@ static gchar string_get (const gchar* self, glong index) { gchar result = '\0'; glong _tmp0_; gchar _tmp1_; +#line 965 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, '\0'); +#line 966 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp0_ = index; +#line 966 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" _tmp1_ = ((gchar*) self)[_tmp0_]; +#line 966 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" result = _tmp1_; +#line 966 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" return result; +#line 6155 "scanner.c" } @@ -4303,26 +6191,46 @@ static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SA gchar* _tmp34_ = NULL; gchar* _tmp35_; const gchar* _tmp36_; +#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (option != NULL, FALSE); +#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (value != NULL, FALSE); +#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = g_strdup (""); +#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = _tmp0_; +#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = option; +#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _tmp1_->type; +#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (_tmp2_ == SANE_TYPE_STRING, FALSE); +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = option; +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_->size; +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = g_new0 (gchar, _tmp4_); +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp5_; +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s_length1 = _tmp4_; +#line 513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _s_size_ = s_length1; +#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 6222 "scanner.c" { gboolean _tmp6_; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = TRUE; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 6229 "scanner.c" gboolean _tmp7_; gboolean _tmp9_ = FALSE; gint _tmp10_; @@ -4336,73 +6244,137 @@ static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SA gint _tmp20_; gchar _tmp21_ = '\0'; gchar _tmp22_; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp6_; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp7_) { +#line 6247 "scanner.c" gint _tmp8_; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = i; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp8_ + 1; +#line 6253 "scanner.c" } +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = FALSE; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = i; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = option; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_->size; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (((SANE_Int) _tmp10_) < (_tmp12_ - 1)) { +#line 6265 "scanner.c" const gchar* _tmp13_; gint _tmp14_; gchar _tmp15_ = '\0'; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = value; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = i; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = string_get (_tmp13_, (glong) _tmp14_); +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = _tmp15_ != '\0'; +#line 6277 "scanner.c" } else { +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = FALSE; +#line 6281 "scanner.c" } +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp9_; +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp16_) { +#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6289 "scanner.c" } +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = s; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17__length1 = s_length1; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = i; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = value; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = i; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = string_get (_tmp19_, (glong) _tmp20_); +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_[_tmp18_] = _tmp21_; +#line 516 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = _tmp17_[_tmp18_]; +#line 6307 "scanner.c" } } +#line 517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = s; +#line 517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23__length1 = s_length1; +#line 517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = i; +#line 517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_[_tmp24_] = '\0'; +#line 517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = _tmp23_[_tmp24_]; +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = handle; +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = option_index; +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = s; +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28__length1 = s_length1; +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = sane_control_option (_tmp26_, _tmp27_, SANE_ACTION_SET_VALUE, _tmp28_, NULL); +#line 518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp29_; +#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = s; +#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30__length1 = s_length1; +#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = g_strdup ((const gchar*) _tmp30_); +#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = _tmp31_; +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = option_index; +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = value; +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = sane_status_to_string (status); +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _tmp34_; +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = _vala_result; - g_debug ("scanner.vala:497: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \ +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:520: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \ "\") -> (%s, \"%s\")", (gint) _tmp32_, _tmp33_, _tmp35_, _tmp36_); +#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp35_); +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = status == SANE_STATUS_GOOD; +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = (g_free (s), NULL); +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 6364 "scanner.c" } else { +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 6368 "scanner.c" } +#line 522 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 6372 "scanner.c" } @@ -4414,21 +6386,35 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl SANE_Option_Descriptor* _tmp2_; SANE_Constraint_Type _tmp3_; gchar* _tmp36_; +#line 525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (option != NULL, FALSE); +#line 527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = option; +#line 527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->type; +#line 527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (_tmp1_ == SANE_TYPE_STRING, FALSE); +#line 528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = option; +#line 528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->constraint_type; +#line 528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (_tmp3_ == SANE_CONSTRAINT_STRING_LIST, FALSE); +#line 6400 "scanner.c" { gint i; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 6405 "scanner.c" { gboolean _tmp4_; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = TRUE; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 6412 "scanner.c" gboolean _tmp5_; gchar** _tmp7_; gint _tmp7__length1; @@ -4440,25 +6426,44 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl gint _tmp25__length1; gint _tmp26_; const gchar* _tmp27_; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp4_; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp5_) { +#line 6428 "scanner.c" gint _tmp6_; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = i; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp6_ + 1; +#line 6434 "scanner.c" } +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = FALSE; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = values; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7__length1 = values_length1; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = i; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = _tmp7_[_tmp8_]; +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp9_ != NULL)) { +#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6450 "scanner.c" } +#line 532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" j = 0; +#line 6454 "scanner.c" { gboolean _tmp10_; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = TRUE; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 6461 "scanner.c" gboolean _tmp11_; SANE_Option_Descriptor* _tmp13_; gchar** _tmp14_; @@ -4474,41 +6479,75 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl gint _tmp21__length1; gint _tmp22_; const gchar* _tmp23_; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp11_) { +#line 6481 "scanner.c" gint _tmp12_; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = j; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" j = _tmp12_ + 1; +#line 6487 "scanner.c" } +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = FALSE; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = option; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _tmp13_->constraint.string_list; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14__length1 = -1; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = j; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp14_[_tmp15_]; +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp16_ != NULL)) { +#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6505 "scanner.c" } +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = values; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17__length1 = values_length1; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = i; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = _tmp17_[_tmp18_]; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = option; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = _tmp20_->constraint.string_list; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21__length1 = -1; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = j; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = _tmp21_[_tmp22_]; +#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp19_, _tmp23_) == 0) { +#line 536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6529 "scanner.c" } } } +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = option; +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = _tmp24_->constraint.string_list; +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25__length1 = -1; +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = j; +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp25_[_tmp26_]; +#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp27_ != NULL) { +#line 6545 "scanner.c" SANE_Handle _tmp28_; SANE_Option_Descriptor* _tmp29_; SANE_Int _tmp30_; @@ -4518,37 +6557,66 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl const gchar* _tmp33_; gchar* _tmp34_ = NULL; gboolean _tmp35_ = FALSE; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = handle; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = option; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = option_index; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = values; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31__length1 = values_length1; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = i; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = _tmp31_[_tmp32_]; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = scanner_set_string_option (self, _tmp28_, _tmp29_, _tmp30_, _tmp33_, &_tmp34_); +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = _tmp34_; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp35_; +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 6581 "scanner.c" } else { +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 6585 "scanner.c" } +#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 6589 "scanner.c" } } } } +#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = g_strdup (""); +#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_result = _tmp36_; +#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = FALSE; +#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_result_) { +#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *_result_ = _vala_result; +#line 6606 "scanner.c" } else { +#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_vala_result); +#line 6610 "scanner.c" } +#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 6614 "scanner.c" } @@ -4579,111 +6647,195 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr const gchar* _tmp214_; SANE_Option_Descriptor* _tmp215_; const gchar* _tmp216_; +#line 547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (option != NULL); +#line 549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = index; +#line 549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_strdup_printf ("Option %d:", (gint) _tmp0_); +#line 549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp1_; +#line 551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = option; +#line 551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->name; +#line 551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp3_, "") != 0) { +#line 6661 "scanner.c" const gchar* _tmp4_; SANE_Option_Descriptor* _tmp5_; const gchar* _tmp6_; gchar* _tmp7_ = NULL; gchar* _tmp8_; gchar* _tmp9_; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = s; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = option; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_->name; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = g_strdup_printf (" name='%s'", _tmp6_); +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp7_; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = g_strconcat (_tmp4_, _tmp8_, NULL); +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp9_; +#line 552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp8_); +#line 6686 "scanner.c" } +#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = option; +#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->title; +#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp11_, "") != 0) { +#line 6694 "scanner.c" const gchar* _tmp12_; SANE_Option_Descriptor* _tmp13_; const gchar* _tmp14_; gchar* _tmp15_ = NULL; gchar* _tmp16_; gchar* _tmp17_; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = s; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = option; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _tmp13_->title; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = g_strdup_printf (" title='%s'", _tmp14_); +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp15_; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = g_strconcat (_tmp12_, _tmp16_, NULL); +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp17_; +#line 555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp16_); +#line 6719 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = option; +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = _tmp18_->type; +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp19_) { +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_BOOL: +#line 6729 "scanner.c" { const gchar* _tmp20_; gchar* _tmp21_; +#line 560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = s; +#line 560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = g_strconcat (_tmp20_, " type=bool", NULL); +#line 560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp21_; +#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6743 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_INT: +#line 6747 "scanner.c" { const gchar* _tmp22_; gchar* _tmp23_; +#line 563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = s; +#line 563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = g_strconcat (_tmp22_, " type=int", NULL); +#line 563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp23_; +#line 564 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6761 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_FIXED: +#line 6765 "scanner.c" { const gchar* _tmp24_; gchar* _tmp25_; +#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = s; +#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = g_strconcat (_tmp24_, " type=fixed", NULL); +#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp25_; +#line 567 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6779 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_STRING: +#line 6783 "scanner.c" { const gchar* _tmp26_; gchar* _tmp27_; +#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = s; +#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = g_strconcat (_tmp26_, " type=string", NULL); +#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp27_; +#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6797 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_BUTTON: +#line 6801 "scanner.c" { const gchar* _tmp28_; gchar* _tmp29_; +#line 572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = s; +#line 572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = g_strconcat (_tmp28_, " type=button", NULL); +#line 572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp29_; +#line 573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6815 "scanner.c" } +#line 557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_TYPE_GROUP: +#line 6819 "scanner.c" { const gchar* _tmp30_; gchar* _tmp31_; +#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = s; +#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = g_strconcat (_tmp30_, " type=group", NULL); +#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp31_; +#line 576 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6833 "scanner.c" } default: { @@ -4693,93 +6845,168 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp35_ = NULL; gchar* _tmp36_; gchar* _tmp37_; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = s; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = option; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = _tmp33_->type; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = g_strdup_printf (" type=%d", (gint) _tmp34_); +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = _tmp35_; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = g_strconcat (_tmp32_, _tmp36_, NULL); +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp37_; +#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp36_); +#line 579 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6863 "scanner.c" } } +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = s; +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = option; +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = _tmp39_->size; +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = g_strdup_printf (" size=%d", (gint) _tmp40_); +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = _tmp41_; +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = g_strconcat (_tmp38_, _tmp42_, NULL); +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp43_; +#line 582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp42_); +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = option; +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = _tmp44_->unit; +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp45_) { +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_NONE: +#line 6892 "scanner.c" { +#line 587 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6896 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_PIXEL: +#line 6900 "scanner.c" { const gchar* _tmp46_; gchar* _tmp47_; +#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = s; +#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = g_strconcat (_tmp46_, " unit=pixels", NULL); +#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp47_; +#line 590 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6914 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_BIT: +#line 6918 "scanner.c" { const gchar* _tmp48_; gchar* _tmp49_; +#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = s; +#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = g_strconcat (_tmp48_, " unit=bits", NULL); +#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp49_; +#line 593 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6932 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_MM: +#line 6936 "scanner.c" { const gchar* _tmp50_; gchar* _tmp51_; +#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = s; +#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = g_strconcat (_tmp50_, " unit=mm", NULL); +#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp51_; +#line 596 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6950 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_DPI: +#line 6954 "scanner.c" { const gchar* _tmp52_; gchar* _tmp53_; +#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = s; +#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = g_strconcat (_tmp52_, " unit=dpi", NULL); +#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp53_; +#line 599 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6968 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_PERCENT: +#line 6972 "scanner.c" { const gchar* _tmp54_; gchar* _tmp55_; +#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_ = s; +#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp55_ = g_strconcat (_tmp54_, " unit=percent", NULL); +#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp55_; +#line 602 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 6986 "scanner.c" } +#line 584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_UNIT_MICROSECOND: +#line 6990 "scanner.c" { const gchar* _tmp56_; gchar* _tmp57_; +#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_ = s; +#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = g_strconcat (_tmp56_, " unit=microseconds", NULL); +#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp57_; +#line 605 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7004 "scanner.c" } default: { @@ -4789,28 +7016,48 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp61_ = NULL; gchar* _tmp62_; gchar* _tmp63_; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp58_ = s; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_ = option; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60_ = _tmp59_->unit; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp61_ = g_strdup_printf (" unit=%d", (gint) _tmp60_); +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp62_ = _tmp61_; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp63_ = g_strconcat (_tmp58_, _tmp62_, NULL); +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp63_; +#line 607 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp62_); +#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7034 "scanner.c" } } +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp64_ = option; +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp65_ = _tmp64_->constraint_type; +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp65_) { +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_CONSTRAINT_RANGE: +#line 7045 "scanner.c" { SANE_Option_Descriptor* _tmp66_; SANE_Value_Type _tmp67_; +#line 614 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp66_ = option; +#line 614 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp67_ = _tmp66_->type; +#line 614 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp67_ == SANE_TYPE_FIXED) { +#line 7055 "scanner.c" const gchar* _tmp68_; SANE_Option_Descriptor* _tmp69_; SANE_Range* _tmp70_; @@ -4826,24 +7073,43 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp80_ = NULL; gchar* _tmp81_; gchar* _tmp82_; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp68_ = s; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp69_ = option; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp70_ = _tmp69_->constraint.range; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp71_ = _tmp70_->min; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp72_ = SANE_UNFIX ((SANE_Fixed) _tmp71_); +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp73_ = option; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp74_ = _tmp73_->constraint.range; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp75_ = _tmp74_->max; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp76_ = SANE_UNFIX ((SANE_Fixed) _tmp75_); +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp77_ = option; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp78_ = _tmp77_->constraint.range; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp79_ = _tmp78_->quant; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp80_ = g_strdup_printf (" min=%f, max=%f, quant=%d", _tmp72_, _tmp76_, (gint) _tmp79_); +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp81_ = _tmp80_; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp82_ = g_strconcat (_tmp68_, _tmp81_, NULL); +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp82_; +#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp81_); +#line 7107 "scanner.c" } else { const gchar* _tmp83_; SANE_Option_Descriptor* _tmp84_; @@ -4858,42 +7124,73 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp93_ = NULL; gchar* _tmp94_; gchar* _tmp95_; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp83_ = s; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp84_ = option; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp85_ = _tmp84_->constraint.range; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp86_ = _tmp85_->min; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp87_ = option; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp88_ = _tmp87_->constraint.range; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp89_ = _tmp88_->max; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp90_ = option; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp91_ = _tmp90_->constraint.range; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp92_ = _tmp91_->quant; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp93_ = g_strdup_printf (" min=%d, max=%d, quant=%d", (gint) _tmp86_, (gint) _tmp89_, (gint) _tmp92_); +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp94_ = _tmp93_; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp95_ = g_strconcat (_tmp83_, _tmp94_, NULL); +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp95_; +#line 617 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp94_); +#line 7154 "scanner.c" } +#line 618 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7158 "scanner.c" } +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_CONSTRAINT_WORD_LIST: +#line 7162 "scanner.c" { const gchar* _tmp96_; gchar* _tmp97_; const gchar* _tmp127_; gchar* _tmp128_; +#line 620 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp96_ = s; +#line 620 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp97_ = g_strconcat (_tmp96_, " values=[", NULL); +#line 620 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 620 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp97_; +#line 7176 "scanner.c" { gint i; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 7181 "scanner.c" { gboolean _tmp98_; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp98_ = TRUE; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 7188 "scanner.c" gboolean _tmp99_; gint _tmp101_; SANE_Option_Descriptor* _tmp102_; @@ -4903,33 +7200,60 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gint _tmp105_; SANE_Option_Descriptor* _tmp108_; SANE_Value_Type _tmp109_; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp99_ = _tmp98_; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp99_) { +#line 7202 "scanner.c" gint _tmp100_; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp100_ = i; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp100_ + 1; +#line 7208 "scanner.c" } +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp98_ = FALSE; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp101_ = i; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp102_ = option; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp103_ = _tmp102_->constraint.word_list; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp103__length1 = -1; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp104_ = _tmp103_[0]; +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(((SANE_Word) _tmp101_) < _tmp104_)) { +#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7226 "scanner.c" } +#line 623 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp105_ = i; +#line 623 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp105_ != 0) { +#line 7232 "scanner.c" const gchar* _tmp106_; gchar* _tmp107_; +#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp106_ = s; +#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp107_ = g_strconcat (_tmp106_, ", ", NULL); +#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp107_; +#line 7243 "scanner.c" } +#line 625 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp108_ = option; +#line 625 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp109_ = _tmp108_->type; +#line 625 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp109_ == SANE_TYPE_INT) { +#line 7251 "scanner.c" const gchar* _tmp110_; SANE_Option_Descriptor* _tmp111_; SANE_Word* _tmp112_; @@ -4939,18 +7263,31 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp115_ = NULL; gchar* _tmp116_; gchar* _tmp117_; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp110_ = s; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp111_ = option; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp112_ = _tmp111_->constraint.word_list; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp112__length1 = -1; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp113_ = i; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp114_ = _tmp112_[_tmp113_ + 1]; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp115_ = g_strdup_printf ("%d", (gint) _tmp114_); +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp116_ = _tmp115_; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp117_ = g_strconcat (_tmp110_, _tmp116_, NULL); +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp117_; +#line 626 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp116_); +#line 7285 "scanner.c" } else { const gchar* _tmp118_; SANE_Option_Descriptor* _tmp119_; @@ -4962,46 +7299,78 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp124_ = NULL; gchar* _tmp125_; gchar* _tmp126_; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp118_ = s; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp119_ = option; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp120_ = _tmp119_->constraint.word_list; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp120__length1 = -1; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp121_ = i; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp122_ = _tmp120_[_tmp121_ + 1]; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp123_ = SANE_UNFIX ((SANE_Fixed) _tmp122_); +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp124_ = g_strdup_printf ("%f", _tmp123_); +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp125_ = _tmp124_; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp126_ = g_strconcat (_tmp118_, _tmp125_, NULL); +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp126_; +#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp125_); +#line 7323 "scanner.c" } } } } +#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp127_ = s; +#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp128_ = g_strconcat (_tmp127_, "]", NULL); +#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp128_; +#line 631 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7338 "scanner.c" } +#line 611 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_CONSTRAINT_STRING_LIST: +#line 7342 "scanner.c" { const gchar* _tmp129_; gchar* _tmp130_; const gchar* _tmp149_; gchar* _tmp150_; +#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp129_ = s; +#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp130_ = g_strconcat (_tmp129_, " values=[", NULL); +#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp130_; +#line 7356 "scanner.c" { gint i; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 7361 "scanner.c" { gboolean _tmp131_; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp131_ = TRUE; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 7368 "scanner.c" gboolean _tmp132_; SANE_Option_Descriptor* _tmp134_; gchar** _tmp135_; @@ -5018,61 +7387,111 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr gchar* _tmp146_ = NULL; gchar* _tmp147_; gchar* _tmp148_; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp132_ = _tmp131_; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp132_) { +#line 7389 "scanner.c" gint _tmp133_; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp133_ = i; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp133_ + 1; +#line 7395 "scanner.c" } +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp131_ = FALSE; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp134_ = option; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp135_ = _tmp134_->constraint.string_list; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp135__length1 = -1; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp136_ = i; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp137_ = _tmp135_[_tmp136_]; +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp137_ != NULL)) { +#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7413 "scanner.c" } +#line 636 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp138_ = i; +#line 636 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp138_ != 0) { +#line 7419 "scanner.c" const gchar* _tmp139_; gchar* _tmp140_; +#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp139_ = s; +#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp140_ = g_strconcat (_tmp139_, ", ", NULL); +#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp140_; +#line 7430 "scanner.c" } +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp141_ = s; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp142_ = option; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp143_ = _tmp142_->constraint.string_list; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp143__length1 = -1; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp144_ = i; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp145_ = _tmp143_[_tmp144_]; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp146_ = g_strdup_printf ("\"%s\"", _tmp145_); +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp147_ = _tmp146_; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp148_ = g_strconcat (_tmp141_, _tmp147_, NULL); +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp148_; +#line 638 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp147_); +#line 7456 "scanner.c" } } } +#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp149_ = s; +#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp150_ = g_strconcat (_tmp149_, "]", NULL); +#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp150_; +#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7470 "scanner.c" } default: { +#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7476 "scanner.c" } } +#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp151_ = option; +#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp152_ = _tmp151_->cap; +#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp152_; +#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp153_ = cap; +#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp153_ != ((SANE_Int) 0)) { +#line 7489 "scanner.c" const gchar* _tmp154_; gchar* _tmp155_; SANE_Int _tmp156_; @@ -5083,203 +7502,365 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr SANE_Int _tmp191_; SANE_Int _tmp198_; SANE_Int _tmp205_; +#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp154_ = s; +#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp155_ = g_strconcat (_tmp154_, " cap=", NULL); +#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp155_; +#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp156_ = cap; +#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp156_ & SANE_CAP_SOFT_SELECT) != ((SANE_Int) 0)) { +#line 7512 "scanner.c" const gchar* _tmp157_; const gchar* _tmp160_; gchar* _tmp161_; SANE_Int _tmp162_; +#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp157_ = s; +#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp157_, "") != 0) { +#line 7521 "scanner.c" const gchar* _tmp158_; gchar* _tmp159_; +#line 653 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp158_ = s; +#line 653 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp159_ = g_strconcat (_tmp158_, ",", NULL); +#line 653 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 653 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp159_; +#line 7532 "scanner.c" } +#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp160_ = s; +#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp161_ = g_strconcat (_tmp160_, "soft-select", NULL); +#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp161_; +#line 655 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp162_ = cap; +#line 655 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp162_ & (~SANE_CAP_SOFT_SELECT); +#line 7546 "scanner.c" } +#line 657 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp163_ = cap; +#line 657 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp163_ & SANE_CAP_HARD_SELECT) != ((SANE_Int) 0)) { +#line 7552 "scanner.c" const gchar* _tmp164_; const gchar* _tmp167_; gchar* _tmp168_; SANE_Int _tmp169_; +#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp164_ = s; +#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp164_, "") != 0) { +#line 7561 "scanner.c" const gchar* _tmp165_; gchar* _tmp166_; +#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp165_ = s; +#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp166_ = g_strconcat (_tmp165_, ",", NULL); +#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp166_; +#line 7572 "scanner.c" } +#line 661 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp167_ = s; +#line 661 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp168_ = g_strconcat (_tmp167_, "hard-select", NULL); +#line 661 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 661 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp168_; +#line 662 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp169_ = cap; +#line 662 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp169_ & (~SANE_CAP_HARD_SELECT); +#line 7586 "scanner.c" } +#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp170_ = cap; +#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp170_ & SANE_CAP_SOFT_DETECT) != ((SANE_Int) 0)) { +#line 7592 "scanner.c" const gchar* _tmp171_; const gchar* _tmp174_; gchar* _tmp175_; SANE_Int _tmp176_; +#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp171_ = s; +#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp171_, "") != 0) { +#line 7601 "scanner.c" const gchar* _tmp172_; gchar* _tmp173_; +#line 667 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp172_ = s; +#line 667 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp173_ = g_strconcat (_tmp172_, ",", NULL); +#line 667 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 667 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp173_; +#line 7612 "scanner.c" } +#line 668 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp174_ = s; +#line 668 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp175_ = g_strconcat (_tmp174_, "soft-detect", NULL); +#line 668 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 668 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp175_; +#line 669 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp176_ = cap; +#line 669 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp176_ & (~SANE_CAP_SOFT_DETECT); +#line 7626 "scanner.c" } +#line 671 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp177_ = cap; +#line 671 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp177_ & SANE_CAP_EMULATED) != ((SANE_Int) 0)) { +#line 7632 "scanner.c" const gchar* _tmp178_; const gchar* _tmp181_; gchar* _tmp182_; SANE_Int _tmp183_; +#line 673 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp178_ = s; +#line 673 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp178_, "") != 0) { +#line 7641 "scanner.c" const gchar* _tmp179_; gchar* _tmp180_; +#line 674 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp179_ = s; +#line 674 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp180_ = g_strconcat (_tmp179_, ",", NULL); +#line 674 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 674 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp180_; +#line 7652 "scanner.c" } +#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp181_ = s; +#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp182_ = g_strconcat (_tmp181_, "emulated", NULL); +#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp182_; +#line 676 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp183_ = cap; +#line 676 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp183_ & (~SANE_CAP_EMULATED); +#line 7666 "scanner.c" } +#line 678 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp184_ = cap; +#line 678 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp184_ & SANE_CAP_AUTOMATIC) != ((SANE_Int) 0)) { +#line 7672 "scanner.c" const gchar* _tmp185_; const gchar* _tmp188_; gchar* _tmp189_; SANE_Int _tmp190_; +#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp185_ = s; +#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp185_, "") != 0) { +#line 7681 "scanner.c" const gchar* _tmp186_; gchar* _tmp187_; +#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp186_ = s; +#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp187_ = g_strconcat (_tmp186_, ",", NULL); +#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp187_; +#line 7692 "scanner.c" } +#line 682 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp188_ = s; +#line 682 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp189_ = g_strconcat (_tmp188_, "automatic", NULL); +#line 682 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 682 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp189_; +#line 683 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp190_ = cap; +#line 683 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp190_ & (~SANE_CAP_AUTOMATIC); +#line 7706 "scanner.c" } +#line 685 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp191_ = cap; +#line 685 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp191_ & SANE_CAP_INACTIVE) != ((SANE_Int) 0)) { +#line 7712 "scanner.c" const gchar* _tmp192_; const gchar* _tmp195_; gchar* _tmp196_; SANE_Int _tmp197_; +#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp192_ = s; +#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp192_, "") != 0) { +#line 7721 "scanner.c" const gchar* _tmp193_; gchar* _tmp194_; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp193_ = s; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp194_ = g_strconcat (_tmp193_, ",", NULL); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp194_; +#line 7732 "scanner.c" } +#line 689 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp195_ = s; +#line 689 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp196_ = g_strconcat (_tmp195_, "inactive", NULL); +#line 689 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 689 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp196_; +#line 690 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp197_ = cap; +#line 690 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp197_ & (~SANE_CAP_INACTIVE); +#line 7746 "scanner.c" } +#line 692 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp198_ = cap; +#line 692 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if ((_tmp198_ & SANE_CAP_ADVANCED) != ((SANE_Int) 0)) { +#line 7752 "scanner.c" const gchar* _tmp199_; const gchar* _tmp202_; gchar* _tmp203_; SANE_Int _tmp204_; +#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp199_ = s; +#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp199_, "") != 0) { +#line 7761 "scanner.c" const gchar* _tmp200_; gchar* _tmp201_; +#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp200_ = s; +#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp201_ = g_strconcat (_tmp200_, ",", NULL); +#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp201_; +#line 7772 "scanner.c" } +#line 696 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp202_ = s; +#line 696 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp203_ = g_strconcat (_tmp202_, "advanced", NULL); +#line 696 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 696 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp203_; +#line 697 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp204_ = cap; +#line 697 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" cap = _tmp204_ & (~SANE_CAP_ADVANCED); +#line 7786 "scanner.c" } +#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp205_ = cap; +#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp205_ != ((SANE_Int) 0)) { +#line 7792 "scanner.c" const gchar* _tmp206_; const gchar* _tmp209_; SANE_Int _tmp210_; gchar* _tmp211_ = NULL; gchar* _tmp212_; gchar* _tmp213_; +#line 702 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp206_ = s; +#line 702 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp206_, "") != 0) { +#line 7803 "scanner.c" const gchar* _tmp207_; gchar* _tmp208_; +#line 703 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp207_ = s; +#line 703 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp208_ = g_strconcat (_tmp207_, ",", NULL); +#line 703 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 703 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp208_; +#line 7814 "scanner.c" } +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp209_ = s; +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp210_ = cap; +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp211_ = g_strdup_printf ("%x", (guint) ((gint) _tmp210_)); +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp212_ = _tmp211_; +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp213_ = g_strconcat (_tmp209_, _tmp212_, NULL); +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" s = _tmp213_; +#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp212_); +#line 7832 "scanner.c" } } +#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp214_ = s; - g_debug ("scanner.vala:685: %s", _tmp214_); +#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:708: %s", _tmp214_); +#line 710 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp215_ = option; +#line 710 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp216_ = _tmp215_->desc; +#line 710 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp216_ != NULL) { +#line 7845 "scanner.c" SANE_Option_Descriptor* _tmp217_; const gchar* _tmp218_; +#line 711 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp217_ = option; +#line 711 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp218_ = _tmp217_->desc; - g_debug ("scanner.vala:688: Description: %s", _tmp218_); +#line 711 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:711: Description: %s", _tmp218_); +#line 7854 "scanner.c" } +#line 547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (s); +#line 7858 "scanner.c" } @@ -5292,24 +7873,41 @@ static void scanner_authorization_cb (const gchar* resource, gchar* username, in GAsyncQueue* _tmp5_; gpointer _tmp6_ = NULL; Credentials* credentials; +#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (resource != NULL); +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = scanner_scanner_object; +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = resource; +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = notify_request_authorization_new (_tmp1_); +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_; +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (_tmp0_, (Notify*) _tmp3_); +#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp3_); +#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = scanner_scanner_object; +#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp4_->priv->authorize_queue; +#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = g_async_queue_pop (_tmp5_); +#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials = (Credentials*) _tmp6_; +#line 7893 "scanner.c" { gint i; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 7898 "scanner.c" { gboolean _tmp7_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = TRUE; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 7905 "scanner.c" gboolean _tmp8_; gboolean _tmp10_ = FALSE; Credentials* _tmp11_; @@ -5325,49 +7923,87 @@ static void scanner_authorization_cb (const gchar* resource, gchar* username, in gint _tmp22_; gchar _tmp23_ = '\0'; gchar _tmp24_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp7_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp8_) { +#line 7925 "scanner.c" gint _tmp9_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = i; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp9_ + 1; +#line 7931 "scanner.c" } +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = FALSE; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = credentials; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_->username; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = i; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = string_get (_tmp12_, (glong) _tmp13_); +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp14_ != '\0') { +#line 7945 "scanner.c" gint _tmp15_; gint _tmp16_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = i; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = SANE_MAX_USERNAME_LEN; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = _tmp15_ < _tmp16_; +#line 7954 "scanner.c" } else { +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = FALSE; +#line 7958 "scanner.c" } +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _tmp10_; +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp17_) { +#line 719 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 7966 "scanner.c" } +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = username; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18__length1 = username_length1; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = i; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = credentials; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = _tmp20_->username; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = i; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = string_get (_tmp21_, (glong) _tmp22_); +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_[_tmp19_] = _tmp23_; +#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = _tmp18_[_tmp19_]; +#line 7986 "scanner.c" } } } { gint i; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 7994 "scanner.c" { gboolean _tmp25_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = TRUE; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 8001 "scanner.c" gboolean _tmp26_; gboolean _tmp28_ = FALSE; Credentials* _tmp29_; @@ -5383,48 +8019,85 @@ static void scanner_authorization_cb (const gchar* resource, gchar* username, in gint _tmp40_; gchar _tmp41_ = '\0'; gchar _tmp42_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = _tmp25_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp26_) { +#line 8021 "scanner.c" gint _tmp27_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = i; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp27_ + 1; +#line 8027 "scanner.c" } +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = FALSE; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = credentials; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = _tmp29_->password; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = i; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = string_get (_tmp30_, (glong) _tmp31_); +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp32_ != '\0') { +#line 8041 "scanner.c" gint _tmp33_; gint _tmp34_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = i; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = SANE_MAX_USERNAME_LEN; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = _tmp33_ < _tmp34_; +#line 8050 "scanner.c" } else { +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = FALSE; +#line 8054 "scanner.c" } +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _tmp28_; +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp35_) { +#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 8062 "scanner.c" } +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = password; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36__length1 = password_length1; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = i; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = credentials; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = _tmp38_->password; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = i; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = string_get (_tmp39_, (glong) _tmp40_); +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_[_tmp37_] = _tmp41_; +#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = _tmp36_[_tmp37_]; +#line 8082 "scanner.c" } } } +#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _credentials_unref0 (credentials); +#line 8088 "scanner.c" } static gpointer _credentials_ref0 (gpointer self) { +#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? credentials_ref (self) : NULL; +#line 8095 "scanner.c" } @@ -5437,50 +8110,90 @@ void scanner_authorize (Scanner* self, const gchar* username, const gchar* passw gchar* _tmp4_; GAsyncQueue* _tmp5_; Credentials* _tmp6_; +#line 725 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 725 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (username != NULL); +#line 725 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (password != NULL); +#line 727 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = credentials_new (); +#line 727 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials = _tmp0_; +#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = username; +#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_strdup (_tmp1_); +#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (credentials->username); +#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials->username = _tmp2_; +#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = password; +#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = g_strdup (_tmp3_); +#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (credentials->password); +#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" credentials->password = _tmp4_; +#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = self->priv->authorize_queue; +#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _credentials_ref0 (credentials); +#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_async_queue_push (_tmp5_, _tmp6_); +#line 725 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _credentials_unref0 (credentials); +#line 8142 "scanner.c" } static void scanner_close_device (Scanner* self) { gboolean _tmp0_; +#line 733 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 735 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->have_handle; +#line 735 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp0_) { +#line 8154 "scanner.c" SANE_Handle _tmp1_; SANE_Handle _tmp2_; +#line 737 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->handle; +#line 737 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sane_cancel (_tmp1_); - g_debug ("scanner.vala:715: sane_cancel ()"); +#line 738 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:738: sane_cancel ()"); +#line 740 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->handle; +#line 740 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sane_close (_tmp2_); - g_debug ("scanner.vala:718: sane_close ()"); +#line 741 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:741: sane_close ()"); +#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->have_handle = FALSE; +#line 743 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_hash_table_unref0 (self->priv->options); +#line 743 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->options = NULL; +#line 8175 "scanner.c" } +#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = (g_free (self->priv->buffer), NULL); +#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = NULL; +#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer_length1 = 0; +#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->_buffer_size_ = self->priv->buffer_length1; +#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_job_unref0_0 (self->priv->job_queue); +#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_queue = NULL; +#line 749 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_set_scanning (self, FALSE); +#line 8191 "scanner.c" } @@ -5489,26 +8202,41 @@ static void scanner_fail_scan (Scanner* self, gint error_code, const gchar* erro const gchar* _tmp1_; NotifyScanFailed* _tmp2_; NotifyScanFailed* _tmp3_; +#line 752 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 752 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (error_string != NULL); +#line 754 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_close_device (self); +#line 755 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_IDLE; +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = error_code; +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = error_string; +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = notify_scan_failed_new (_tmp0_, _tmp1_); +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_; +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp3_); +#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp3_); +#line 8220 "scanner.c" } static gpointer _request_ref0 (gpointer self) { +#line 781 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? request_ref (self) : NULL; +#line 8227 "scanner.c" } static gpointer _scan_job_ref0 (gpointer self) { +#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return self ? scan_job_ref (self) : NULL; +#line 8234 "scanner.c" } @@ -5518,21 +8246,37 @@ static gboolean scanner_handle_requests (Scanner* self) { ScanState _tmp1_; gboolean _tmp3_; gint request_count; +#line 759 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->state; +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_ == SCAN_STATE_IDLE) { +#line 8250 "scanner.c" gboolean _tmp2_; +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->need_redetect; +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp2_; +#line 8256 "scanner.c" } else { +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = FALSE; +#line 8260 "scanner.c" } +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp0_; +#line 762 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp3_) { +#line 763 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_REDETECT; +#line 8268 "scanner.c" } +#line 766 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_count = 0; +#line 767 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 8274 "scanner.c" Request* request = NULL; gboolean _tmp4_ = FALSE; gboolean _tmp5_ = FALSE; @@ -5541,79 +8285,137 @@ static gboolean scanner_handle_requests (Scanner* self) { gboolean _tmp11_; gint _tmp14_; Request* _tmp15_; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = self->priv->state; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp6_ == SCAN_STATE_IDLE) { +#line 8287 "scanner.c" gint _tmp7_; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = request_count; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp7_ == 0; +#line 8293 "scanner.c" } else { +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = FALSE; +#line 8297 "scanner.c" } +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp5_; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp8_) { +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = TRUE; +#line 8305 "scanner.c" } else { GAsyncQueue* _tmp9_; gint _tmp10_ = 0; +#line 771 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = self->priv->request_queue; +#line 771 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = g_async_queue_length (_tmp9_); +#line 771 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp10_ > 0; +#line 8315 "scanner.c" } +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp4_; +#line 770 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp11_) { +#line 8321 "scanner.c" GAsyncQueue* _tmp12_; gpointer _tmp13_ = NULL; +#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = self->priv->request_queue; +#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = g_async_queue_pop (_tmp12_); +#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (request); +#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request = (Request*) _tmp13_; +#line 8332 "scanner.c" } else { +#line 774 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = TRUE; +#line 774 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (request); +#line 774 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 8340 "scanner.c" } - g_debug ("scanner.vala:753: Processing request"); +#line 776 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:776: Processing request"); +#line 777 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = request_count; +#line 777 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" request_count = _tmp14_ + 1; +#line 779 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = request; +#line 779 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, TYPE_REQUEST_START_SCAN)) { +#line 8352 "scanner.c" Request* _tmp16_; RequestStartScan* _tmp17_; RequestStartScan* r; RequestStartScan* _tmp18_; ScanJob* _tmp19_; ScanJob* _tmp20_; +#line 781 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = request; +#line 781 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _request_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_REQUEST_START_SCAN, RequestStartScan)); +#line 781 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" r = _tmp17_; +#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = r; +#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = _tmp18_->job; +#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = _scan_job_ref0 (_tmp19_); +#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_queue = g_list_append (self->priv->job_queue, _tmp20_); +#line 779 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (r); +#line 8375 "scanner.c" } else { Request* _tmp21_; +#line 784 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = request; +#line 784 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, TYPE_REQUEST_CANCEL)) { +#line 786 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, (gint) SANE_STATUS_CANCELLED, "Scan cancelled - do not report this error"); +#line 8384 "scanner.c" } else { Request* _tmp22_; +#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = request; +#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, TYPE_REQUEST_QUIT)) { +#line 790 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_close_device (self); +#line 791 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = FALSE; +#line 791 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (request); +#line 791 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 8399 "scanner.c" } } } +#line 767 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (request); +#line 8405 "scanner.c" } } static void _g_free0_ (gpointer var) { +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" var = (g_free (var), NULL); +#line 8413 "scanner.c" } @@ -5646,108 +8448,203 @@ static void scanner_do_open (Scanner* self) { ScanJob* _tmp36_; const gchar* _tmp37_; gchar* _tmp38_; +#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->job_queue; +#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->data; +#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob)); +#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" job = _tmp2_; +#line 800 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->line_count = 0; +#line 801 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->pass_number = 0; +#line 802 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->page_number = 0; +#line 803 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->notified_page = -1; +#line 804 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->option_index = (SANE_Int) 0; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = job; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp4_->device; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp5_ == NULL) { +#line 8472 "scanner.c" const gchar* _tmp6_; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = self->priv->default_device; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp6_ != NULL; +#line 8478 "scanner.c" } else { +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = FALSE; +#line 8482 "scanner.c" } +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp3_; +#line 806 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp7_) { +#line 8488 "scanner.c" ScanJob* _tmp8_; const gchar* _tmp9_; gchar* _tmp10_; +#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = job; +#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = self->priv->default_device; +#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = g_strdup (_tmp9_); +#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp8_->device); +#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_->device = _tmp10_; +#line 8502 "scanner.c" } +#line 809 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = job; +#line 809 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_->device; +#line 809 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp12_ == NULL) { +#line 8510 "scanner.c" const gchar* _tmp13_ = NULL; - g_warning ("scanner.vala:788: No scan device available"); +#line 811 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:811: No scan device available"); +#line 812 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = _ ("No scanners available. Please connect a scanner."); +#line 812 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, 0, _tmp13_); +#line 815 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 815 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 8522 "scanner.c" } +#line 819 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = self->priv->have_handle; +#line 819 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp14_) { +#line 8528 "scanner.c" const gchar* _tmp15_; ScanJob* _tmp16_; const gchar* _tmp17_; SANE_Handle _tmp18_; +#line 821 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = self->priv->current_device; +#line 821 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = job; +#line 821 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _tmp16_->device; +#line 821 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_strcmp0 (_tmp15_, _tmp17_) == 0) { +#line 823 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_GET_OPTION; +#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 8547 "scanner.c" } +#line 827 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = self->priv->handle; +#line 827 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sane_close (_tmp18_); - g_debug ("scanner.vala:805: sane_close ()"); +#line 828 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:828: sane_close ()"); +#line 829 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->have_handle = FALSE; +#line 8557 "scanner.c" } +#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->current_device); +#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->current_device = NULL; +#line 834 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->have_handle = FALSE; +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = g_str_hash; +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = g_str_equal; +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = g_hash_table_new_full (_tmp19_, _tmp20_, _g_free0_, NULL); +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_hash_table_unref0 (self->priv->options); +#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->options = _tmp21_; +#line 836 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = job; +#line 836 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = _tmp22_->device; +#line 836 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = sane_open (_tmp23_, &_tmp24_); +#line 836 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->handle = _tmp24_; +#line 836 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp25_; +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = job; +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp26_->device; +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = status; +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = sane_status_to_string (_tmp28_); +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = _tmp29_; - g_debug ("scanner.vala:814: sane_open (\"%s\") -> %s", _tmp27_, _tmp30_); +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:837: sane_open (\"%s\") -> %s", _tmp27_, _tmp30_); +#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp30_); +#line 839 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = status; +#line 839 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp31_ != SANE_STATUS_GOOD) { +#line 8603 "scanner.c" SANE_Status _tmp32_; const gchar* _tmp33_ = NULL; SANE_Status _tmp34_; const gchar* _tmp35_ = NULL; +#line 841 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = status; +#line 841 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = sane_strstatus (_tmp32_); - g_warning ("scanner.vala:818: Unable to get open device: %s", _tmp33_); +#line 841 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:841: Unable to get open device: %s", _tmp33_); +#line 842 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = status; +#line 842 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _ ("Unable to connect to scanner"); +#line 842 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, (gint) _tmp34_, _tmp35_); +#line 845 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 845 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 8624 "scanner.c" } +#line 847 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->have_handle = TRUE; +#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = job; +#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = _tmp36_->device; +#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = g_strdup (_tmp37_); +#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->current_device); +#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->current_device = _tmp38_; +#line 850 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_GET_OPTION; +#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 8642 "scanner.c" } @@ -5765,50 +8662,65 @@ static void scanner_do_get_option (Scanner* self) { SANE_Int index; SANE_Int _tmp8_; SANE_Option_Descriptor* _tmp9_; - SANE_Int _tmp332_; - SANE_Option_Descriptor* _tmp333_; - SANE_Option_Descriptor* _tmp334_; - SANE_Value_Type _tmp335_; - SANE_Option_Descriptor* _tmp336_; - SANE_Int _tmp337_; - SANE_Option_Descriptor* _tmp338_; - const gchar* _tmp339_; - GHashTable* _tmp340_; - SANE_Option_Descriptor* _tmp341_; - const gchar* _tmp342_; - gchar* _tmp343_; - SANE_Int _tmp344_; + SANE_Int _tmp373_; + SANE_Option_Descriptor* _tmp374_; + SANE_Option_Descriptor* _tmp375_; + SANE_Value_Type _tmp376_; + SANE_Option_Descriptor* _tmp377_; + SANE_Int _tmp378_; + SANE_Option_Descriptor* _tmp379_; + const gchar* _tmp380_; + GHashTable* _tmp381_; + SANE_Option_Descriptor* _tmp382_; + const gchar* _tmp383_; + gchar* _tmp384_; + SANE_Int _tmp385_; +#line 853 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 855 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->job_queue; +#line 855 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->data; +#line 855 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob)); +#line 855 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" job = _tmp2_; +#line 857 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = self->priv->handle; +#line 857 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->option_index; +#line 857 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = sane_get_option_descriptor (_tmp3_, _tmp4_); +#line 857 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" option = _tmp5_; +#line 858 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = self->priv->option_index; - g_debug ("scanner.vala:835: sane_get_option_descriptor (%d)", (gint) _tmp6_); +#line 858 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:858: sane_get_option_descriptor (%d)", (gint) _tmp6_); +#line 859 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = self->priv->option_index; +#line 859 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" index = _tmp7_; +#line 860 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = self->priv->option_index; +#line 860 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->option_index = _tmp8_ + 1; +#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = option; +#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp9_ == NULL) { +#line 8707 "scanner.c" SANE_Handle _tmp10_; const gchar* _tmp11_; gint _tmp12_ = 0; SANE_Option_Descriptor* _tmp13_ = NULL; SANE_Option_Descriptor* _tmp14_; - SANE_Handle _tmp86_; - const gchar* _tmp87_; - gint _tmp88_ = 0; - SANE_Option_Descriptor* _tmp89_ = NULL; - SANE_Option_Descriptor* _tmp90_; - SANE_Handle _tmp142_; - gint _tmp143_ = 0; - SANE_Option_Descriptor* _tmp144_ = NULL; - SANE_Option_Descriptor* _tmp145_; + SANE_Option_Descriptor* _tmp18_; + SANE_Handle _tmp93_; + const gchar* _tmp94_; + gint _tmp95_ = 0; + SANE_Option_Descriptor* _tmp96_ = NULL; + SANE_Option_Descriptor* _tmp97_; SANE_Handle _tmp153_; gint _tmp154_ = 0; SANE_Option_Descriptor* _tmp155_ = NULL; @@ -5817,315 +8729,527 @@ static void scanner_do_get_option (Scanner* self) { gint _tmp165_ = 0; SANE_Option_Descriptor* _tmp166_ = NULL; SANE_Option_Descriptor* _tmp167_; - SANE_Handle _tmp180_; - const gchar* _tmp181_; - gint _tmp182_ = 0; - SANE_Option_Descriptor* _tmp183_ = NULL; - SANE_Option_Descriptor* _tmp184_; - SANE_Handle _tmp214_; - const gchar* _tmp215_; - gint _tmp216_ = 0; - SANE_Option_Descriptor* _tmp217_ = NULL; - SANE_Option_Descriptor* _tmp218_; - SANE_Handle _tmp236_; - const gchar* _tmp237_; - gint _tmp238_ = 0; - SANE_Option_Descriptor* _tmp239_ = NULL; - SANE_Option_Descriptor* _tmp240_; - SANE_Handle _tmp258_; - const gchar* _tmp259_; - gint _tmp260_ = 0; - SANE_Option_Descriptor* _tmp261_ = NULL; - SANE_Option_Descriptor* _tmp262_; - SANE_Handle _tmp277_; - const gchar* _tmp278_; - gint _tmp279_ = 0; - SANE_Option_Descriptor* _tmp280_ = NULL; - SANE_Option_Descriptor* _tmp281_; - const gchar* _tmp296_; + SANE_Handle _tmp175_; + gint _tmp176_ = 0; + SANE_Option_Descriptor* _tmp177_ = NULL; + SANE_Option_Descriptor* _tmp178_; + SANE_Handle _tmp191_; + const gchar* _tmp192_; + gint _tmp193_ = 0; + SANE_Option_Descriptor* _tmp194_ = NULL; + SANE_Option_Descriptor* _tmp195_; + SANE_Handle _tmp225_; + const gchar* _tmp226_; + gint _tmp227_ = 0; + SANE_Option_Descriptor* _tmp228_ = NULL; + SANE_Option_Descriptor* _tmp229_; + SANE_Handle _tmp247_; + const gchar* _tmp248_; + gint _tmp249_ = 0; + SANE_Option_Descriptor* _tmp250_ = NULL; + SANE_Option_Descriptor* _tmp251_; + SANE_Handle _tmp269_; + const gchar* _tmp270_; + gint _tmp271_ = 0; + SANE_Option_Descriptor* _tmp272_ = NULL; + SANE_Option_Descriptor* _tmp273_; + SANE_Handle _tmp288_; + const gchar* _tmp289_; + gint _tmp290_ = 0; + SANE_Option_Descriptor* _tmp291_ = NULL; + SANE_Option_Descriptor* _tmp292_; + SANE_Handle _tmp307_; + const gchar* _tmp308_; + gint _tmp309_ = 0; + SANE_Option_Descriptor* _tmp310_ = NULL; + SANE_Option_Descriptor* _tmp311_; + SANE_Handle _tmp322_; + const gchar* _tmp323_; + gint _tmp324_ = 0; + SANE_Option_Descriptor* _tmp325_ = NULL; + SANE_Option_Descriptor* _tmp326_; + const gchar* _tmp337_; +#line 866 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = self->priv->handle; +#line 866 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = SANE_NAME_SCAN_SOURCE; +#line 866 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = scanner_get_option_by_name (self, _tmp10_, _tmp11_, &_tmp12_); +#line 866 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" index = (SANE_Int) _tmp12_; +#line 866 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" option = _tmp13_; +#line 867 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = option; - if (_tmp14_ != NULL) { - gchar* _tmp15_; - const gchar* _tmp16_ = NULL; - gchar* _tmp17_; - gchar* _tmp18_; - const gchar* _tmp19_ = NULL; - gchar* _tmp20_; +#line 867 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp14_ == NULL) { +#line 8781 "scanner.c" + SANE_Handle _tmp15_; + gint _tmp16_ = 0; + SANE_Option_Descriptor* _tmp17_ = NULL; +#line 869 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:869: SCAN_SOURCE not available, trying alternative \"doc-" \ +"source\""); +#line 870 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp15_ = self->priv->handle; +#line 870 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp17_ = scanner_get_option_by_name (self, _tmp15_, "doc-source", &_tmp16_); +#line 870 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp16_; +#line 870 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp17_; +#line 8795 "scanner.c" + } +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp18_ = option; +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp18_ != NULL) { +#line 8801 "scanner.c" + gchar* _tmp19_; + const gchar* _tmp20_ = NULL; gchar* _tmp21_; gchar* _tmp22_; const gchar* _tmp23_ = NULL; gchar* _tmp24_; - gchar** _tmp25_ = NULL; - gchar** flatbed_sources; - gint flatbed_sources_length1; - gint _flatbed_sources_size_; + gchar* _tmp25_; gchar* _tmp26_; const gchar* _tmp27_ = NULL; gchar* _tmp28_; - gchar* _tmp29_; + gchar** _tmp29_ = NULL; + gchar** flatbed_sources; + gint flatbed_sources_length1; + gint _flatbed_sources_size_; gchar* _tmp30_; - gchar* _tmp31_; - gchar** _tmp32_ = NULL; + const gchar* _tmp31_ = NULL; + gchar* _tmp32_; + gchar* _tmp33_; + gchar* _tmp34_; + gchar* _tmp35_; + gchar* _tmp36_; + gchar** _tmp37_ = NULL; gchar** adf_sources; gint adf_sources_length1; gint _adf_sources_size_; - gchar* _tmp33_; - const gchar* _tmp34_ = NULL; - gchar* _tmp35_; - gchar** _tmp36_ = NULL; + gchar* _tmp38_; + const gchar* _tmp39_ = NULL; + gchar* _tmp40_; + gchar** _tmp41_ = NULL; gchar** adf_front_sources; gint adf_front_sources_length1; gint _adf_front_sources_size_; - gchar* _tmp37_; - const gchar* _tmp38_ = NULL; - gchar* _tmp39_; - gchar** _tmp40_ = NULL; + gchar* _tmp42_; + const gchar* _tmp43_ = NULL; + gchar* _tmp44_; + gchar** _tmp45_ = NULL; gchar** adf_back_sources; gint adf_back_sources_length1; gint _adf_back_sources_size_; - gchar* _tmp41_; - const gchar* _tmp42_ = NULL; - gchar* _tmp43_; - gchar** _tmp44_ = NULL; + gchar* _tmp46_; + const gchar* _tmp47_ = NULL; + gchar* _tmp48_; + gchar* _tmp49_; + gchar* _tmp50_; + gchar** _tmp51_ = NULL; gchar** adf_duplex_sources; gint adf_duplex_sources_length1; gint _adf_duplex_sources_size_; - ScanJob* _tmp45_; - ScanType _tmp46_; - _tmp15_ = g_strdup ("Auto"); - _tmp16_ = SANE_I18N ("Auto"); - _tmp17_ = g_strdup (_tmp16_); - _tmp18_ = g_strdup ("Flatbed"); - _tmp19_ = SANE_I18N ("Flatbed"); - _tmp20_ = g_strdup (_tmp19_); - _tmp21_ = g_strdup ("FlatBed"); - _tmp22_ = g_strdup ("Normal"); - _tmp23_ = SANE_I18N ("Normal"); + ScanJob* _tmp52_; + ScanType _tmp53_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp19_ = g_strdup ("Auto"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp20_ = SANE_I18N ("Auto"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp21_ = g_strdup (_tmp20_); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp22_ = g_strdup ("Flatbed"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp23_ = SANE_I18N ("Flatbed"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = g_strdup (_tmp23_); - _tmp25_ = g_new0 (gchar*, 7 + 1); - _tmp25_[0] = _tmp15_; - _tmp25_[1] = _tmp17_; - _tmp25_[2] = _tmp18_; - _tmp25_[3] = _tmp20_; - _tmp25_[4] = _tmp21_; - _tmp25_[5] = _tmp22_; - _tmp25_[6] = _tmp24_; - flatbed_sources = _tmp25_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp25_ = g_strdup ("FlatBed"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp26_ = g_strdup ("Normal"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp27_ = SANE_I18N ("Normal"); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp28_ = g_strdup (_tmp27_); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_ = g_new0 (gchar*, 7 + 1); +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[0] = _tmp19_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[1] = _tmp21_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[2] = _tmp22_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[3] = _tmp24_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[4] = _tmp25_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[5] = _tmp26_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_[6] = _tmp28_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + flatbed_sources = _tmp29_; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" flatbed_sources_length1 = 7; +#line 874 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _flatbed_sources_size_ = flatbed_sources_length1; - _tmp26_ = g_strdup ("Automatic Document Feeder"); - _tmp27_ = SANE_I18N ("Automatic Document Feeder"); - _tmp28_ = g_strdup (_tmp27_); - _tmp29_ = g_strdup ("ADF"); - _tmp30_ = g_strdup ("Automatic Document Feeder(left aligned)"); - _tmp31_ = g_strdup ("Automatic Document Feeder(centrally aligned)"); - _tmp32_ = g_new0 (gchar*, 5 + 1); - _tmp32_[0] = _tmp26_; - _tmp32_[1] = _tmp28_; - _tmp32_[2] = _tmp29_; - _tmp32_[3] = _tmp30_; - _tmp32_[4] = _tmp31_; - adf_sources = _tmp32_; - adf_sources_length1 = 5; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp30_ = g_strdup ("Automatic Document Feeder"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp31_ = SANE_I18N ("Automatic Document Feeder"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp32_ = g_strdup (_tmp31_); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp33_ = g_strdup ("ADF"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp34_ = g_strdup ("Automatic Document Feeder(left aligned)"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp35_ = g_strdup ("Automatic Document Feeder(centrally aligned)"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp36_ = g_strdup ("ADF Simplex"); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_ = g_new0 (gchar*, 6 + 1); +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[0] = _tmp30_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[1] = _tmp32_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[2] = _tmp33_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[3] = _tmp34_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[4] = _tmp35_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_[5] = _tmp36_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_sources = _tmp37_; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_sources_length1 = 6; +#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _adf_sources_size_ = adf_sources_length1; - _tmp33_ = g_strdup ("ADF Front"); - _tmp34_ = SANE_I18N ("ADF Front"); - _tmp35_ = g_strdup (_tmp34_); - _tmp36_ = g_new0 (gchar*, 2 + 1); - _tmp36_[0] = _tmp33_; - _tmp36_[1] = _tmp35_; - adf_front_sources = _tmp36_; +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp38_ = g_strdup ("ADF Front"); +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp39_ = SANE_I18N ("ADF Front"); +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp40_ = g_strdup (_tmp39_); +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp41_ = g_new0 (gchar*, 2 + 1); +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp41_[0] = _tmp38_; +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp41_[1] = _tmp40_; +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_front_sources = _tmp41_; +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_front_sources_length1 = 2; +#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _adf_front_sources_size_ = adf_front_sources_length1; - _tmp37_ = g_strdup ("ADF Back"); - _tmp38_ = SANE_I18N ("ADF Back"); - _tmp39_ = g_strdup (_tmp38_); - _tmp40_ = g_new0 (gchar*, 2 + 1); - _tmp40_[0] = _tmp37_; - _tmp40_[1] = _tmp39_; - adf_back_sources = _tmp40_; +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp42_ = g_strdup ("ADF Back"); +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp43_ = SANE_I18N ("ADF Back"); +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp44_ = g_strdup (_tmp43_); +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp45_ = g_new0 (gchar*, 2 + 1); +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp45_[0] = _tmp42_; +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp45_[1] = _tmp44_; +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_back_sources = _tmp45_; +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_back_sources_length1 = 2; +#line 901 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _adf_back_sources_size_ = adf_back_sources_length1; - _tmp41_ = g_strdup ("ADF Duplex"); - _tmp42_ = SANE_I18N ("ADF Duplex"); - _tmp43_ = g_strdup (_tmp42_); - _tmp44_ = g_new0 (gchar*, 2 + 1); - _tmp44_[0] = _tmp41_; - _tmp44_[1] = _tmp43_; - adf_duplex_sources = _tmp44_; - adf_duplex_sources_length1 = 2; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp46_ = g_strdup ("ADF Duplex"); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp47_ = SANE_I18N ("ADF Duplex"); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp48_ = g_strdup (_tmp47_); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp49_ = g_strdup ("ADF Duplex - Long-Edge Binding"); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp50_ = g_strdup ("ADF Duplex - Short-Edge Binding"); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_ = g_new0 (gchar*, 4 + 1); +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_[0] = _tmp46_; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_[1] = _tmp48_; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_[2] = _tmp49_; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_[3] = _tmp50_; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_duplex_sources = _tmp51_; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + adf_duplex_sources_length1 = 4; +#line 907 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _adf_duplex_sources_size_ = adf_duplex_sources_length1; - _tmp45_ = job; - _tmp46_ = _tmp45_->type; - switch (_tmp46_) { +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp52_ = job; +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp53_ = _tmp52_->type; +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + switch (_tmp53_) { +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_SINGLE: +#line 8998 "scanner.c" { - SANE_Handle _tmp47_; - SANE_Option_Descriptor* _tmp48_; - SANE_Int _tmp49_; - gboolean _tmp50_ = FALSE; - _tmp47_ = self->priv->handle; - _tmp48_ = option; - _tmp49_ = index; - _tmp50_ = scanner_set_default_option (self, _tmp47_, _tmp48_, _tmp49_); - if (!_tmp50_) { - SANE_Handle _tmp51_; - SANE_Option_Descriptor* _tmp52_; - SANE_Int _tmp53_; - gchar** _tmp54_; - gint _tmp54__length1; - gboolean _tmp55_ = FALSE; - _tmp51_ = self->priv->handle; - _tmp52_ = option; - _tmp53_ = index; - _tmp54_ = flatbed_sources; - _tmp54__length1 = flatbed_sources_length1; - _tmp55_ = scanner_set_constrained_string_option (self, _tmp51_, _tmp52_, _tmp53_, _tmp54_, _tmp54__length1, NULL); - if (!_tmp55_) { - g_warning ("scanner.vala:889: Unable to set single page source, please file a bug"); + SANE_Handle _tmp54_; + SANE_Option_Descriptor* _tmp55_; + SANE_Int _tmp56_; + gboolean _tmp57_ = FALSE; +#line 918 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp54_ = self->priv->handle; +#line 918 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp55_ = option; +#line 918 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp56_ = index; +#line 918 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp57_ = scanner_set_default_option (self, _tmp54_, _tmp55_, _tmp56_); +#line 918 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp57_) { +#line 9014 "scanner.c" + SANE_Handle _tmp58_; + SANE_Option_Descriptor* _tmp59_; + SANE_Int _tmp60_; + gchar** _tmp61_; + gint _tmp61__length1; + gboolean _tmp62_ = FALSE; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp58_ = self->priv->handle; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp59_ = option; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp60_ = index; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp61_ = flatbed_sources; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp61__length1 = flatbed_sources_length1; +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp62_ = scanner_set_constrained_string_option (self, _tmp58_, _tmp59_, _tmp60_, _tmp61_, _tmp61__length1, NULL); +#line 919 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp62_) { +#line 920 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:920: Unable to set single page source, please file a bug"); +#line 9037 "scanner.c" } } +#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9042 "scanner.c" } +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_FRONT: +#line 9046 "scanner.c" { - SANE_Handle _tmp56_; - SANE_Option_Descriptor* _tmp57_; - SANE_Int _tmp58_; - gchar** _tmp59_; - gint _tmp59__length1; - gboolean _tmp60_ = FALSE; - _tmp56_ = self->priv->handle; - _tmp57_ = option; - _tmp58_ = index; - _tmp59_ = adf_front_sources; - _tmp59__length1 = adf_front_sources_length1; - _tmp60_ = scanner_set_constrained_string_option (self, _tmp56_, _tmp57_, _tmp58_, _tmp59_, _tmp59__length1, NULL); - if (!_tmp60_) { - SANE_Handle _tmp61_; - SANE_Option_Descriptor* _tmp62_; - SANE_Int _tmp63_; - gchar** _tmp64_; - gint _tmp64__length1; - gboolean _tmp65_ = FALSE; - _tmp61_ = self->priv->handle; - _tmp62_ = option; - _tmp63_ = index; - _tmp64_ = adf_sources; - _tmp64__length1 = adf_sources_length1; - _tmp65_ = scanner_set_constrained_string_option (self, _tmp61_, _tmp62_, _tmp63_, _tmp64_, _tmp64__length1, NULL); - if (!_tmp65_) { - g_warning ("scanner.vala:894: Unable to set front ADF source, please file a bug"); + SANE_Handle _tmp63_; + SANE_Option_Descriptor* _tmp64_; + SANE_Int _tmp65_; + gchar** _tmp66_; + gint _tmp66__length1; + gboolean _tmp67_ = FALSE; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp63_ = self->priv->handle; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp64_ = option; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp65_ = index; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp66_ = adf_front_sources; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp66__length1 = adf_front_sources_length1; +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp67_ = scanner_set_constrained_string_option (self, _tmp63_, _tmp64_, _tmp65_, _tmp66_, _tmp66__length1, NULL); +#line 923 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp67_) { +#line 9068 "scanner.c" + SANE_Handle _tmp68_; + SANE_Option_Descriptor* _tmp69_; + SANE_Int _tmp70_; + gchar** _tmp71_; + gint _tmp71__length1; + gboolean _tmp72_ = FALSE; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp68_ = self->priv->handle; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp69_ = option; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp70_ = index; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp71_ = adf_sources; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp71__length1 = adf_sources_length1; +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp72_ = scanner_set_constrained_string_option (self, _tmp68_, _tmp69_, _tmp70_, _tmp71_, _tmp71__length1, NULL); +#line 924 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp72_) { +#line 925 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:925: Unable to set front ADF source, please file a bug"); +#line 9091 "scanner.c" } } +#line 926 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9096 "scanner.c" } +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_BACK: +#line 9100 "scanner.c" { - SANE_Handle _tmp66_; - SANE_Option_Descriptor* _tmp67_; - SANE_Int _tmp68_; - gchar** _tmp69_; - gint _tmp69__length1; - gboolean _tmp70_ = FALSE; - _tmp66_ = self->priv->handle; - _tmp67_ = option; - _tmp68_ = index; - _tmp69_ = adf_back_sources; - _tmp69__length1 = adf_back_sources_length1; - _tmp70_ = scanner_set_constrained_string_option (self, _tmp66_, _tmp67_, _tmp68_, _tmp69_, _tmp69__length1, NULL); - if (!_tmp70_) { - SANE_Handle _tmp71_; - SANE_Option_Descriptor* _tmp72_; - SANE_Int _tmp73_; - gchar** _tmp74_; - gint _tmp74__length1; - gboolean _tmp75_ = FALSE; - _tmp71_ = self->priv->handle; - _tmp72_ = option; - _tmp73_ = index; - _tmp74_ = adf_sources; - _tmp74__length1 = adf_sources_length1; - _tmp75_ = scanner_set_constrained_string_option (self, _tmp71_, _tmp72_, _tmp73_, _tmp74_, _tmp74__length1, NULL); - if (!_tmp75_) { - g_warning ("scanner.vala:899: Unable to set back ADF source, please file a bug"); + SANE_Handle _tmp73_; + SANE_Option_Descriptor* _tmp74_; + SANE_Int _tmp75_; + gchar** _tmp76_; + gint _tmp76__length1; + gboolean _tmp77_ = FALSE; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp73_ = self->priv->handle; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp74_ = option; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp75_ = index; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp76_ = adf_back_sources; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp76__length1 = adf_back_sources_length1; +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp77_ = scanner_set_constrained_string_option (self, _tmp73_, _tmp74_, _tmp75_, _tmp76_, _tmp76__length1, NULL); +#line 928 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp77_) { +#line 9122 "scanner.c" + SANE_Handle _tmp78_; + SANE_Option_Descriptor* _tmp79_; + SANE_Int _tmp80_; + gchar** _tmp81_; + gint _tmp81__length1; + gboolean _tmp82_ = FALSE; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp78_ = self->priv->handle; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp79_ = option; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp80_ = index; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp81_ = adf_sources; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp81__length1 = adf_sources_length1; +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp82_ = scanner_set_constrained_string_option (self, _tmp78_, _tmp79_, _tmp80_, _tmp81_, _tmp81__length1, NULL); +#line 929 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp82_) { +#line 930 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:930: Unable to set back ADF source, please file a bug"); +#line 9145 "scanner.c" } } +#line 931 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9150 "scanner.c" } +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_BOTH: +#line 9154 "scanner.c" { - SANE_Handle _tmp76_; - SANE_Option_Descriptor* _tmp77_; - SANE_Int _tmp78_; - gchar** _tmp79_; - gint _tmp79__length1; - gboolean _tmp80_ = FALSE; - _tmp76_ = self->priv->handle; - _tmp77_ = option; - _tmp78_ = index; - _tmp79_ = adf_duplex_sources; - _tmp79__length1 = adf_duplex_sources_length1; - _tmp80_ = scanner_set_constrained_string_option (self, _tmp76_, _tmp77_, _tmp78_, _tmp79_, _tmp79__length1, NULL); - if (!_tmp80_) { - SANE_Handle _tmp81_; - SANE_Option_Descriptor* _tmp82_; - SANE_Int _tmp83_; - gchar** _tmp84_; - gint _tmp84__length1; - gboolean _tmp85_ = FALSE; - _tmp81_ = self->priv->handle; - _tmp82_ = option; - _tmp83_ = index; - _tmp84_ = adf_sources; - _tmp84__length1 = adf_sources_length1; - _tmp85_ = scanner_set_constrained_string_option (self, _tmp81_, _tmp82_, _tmp83_, _tmp84_, _tmp84__length1, NULL); - if (!_tmp85_) { - g_warning ("scanner.vala:904: Unable to set duplex ADF source, please file a bug"); + SANE_Handle _tmp83_; + SANE_Option_Descriptor* _tmp84_; + SANE_Int _tmp85_; + gchar** _tmp86_; + gint _tmp86__length1; + gboolean _tmp87_ = FALSE; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp83_ = self->priv->handle; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp84_ = option; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp85_ = index; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp86_ = adf_duplex_sources; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp86__length1 = adf_duplex_sources_length1; +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp87_ = scanner_set_constrained_string_option (self, _tmp83_, _tmp84_, _tmp85_, _tmp86_, _tmp86__length1, NULL); +#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp87_) { +#line 9176 "scanner.c" + SANE_Handle _tmp88_; + SANE_Option_Descriptor* _tmp89_; + SANE_Int _tmp90_; + gchar** _tmp91_; + gint _tmp91__length1; + gboolean _tmp92_ = FALSE; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp88_ = self->priv->handle; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp89_ = option; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp90_ = index; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp91_ = adf_sources; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp91__length1 = adf_sources_length1; +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp92_ = scanner_set_constrained_string_option (self, _tmp88_, _tmp89_, _tmp90_, _tmp91_, _tmp91__length1, NULL); +#line 934 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp92_) { +#line 935 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:935: Unable to set duplex ADF source, please file a bug"); +#line 9199 "scanner.c" } } +#line 936 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9204 "scanner.c" } default: +#line 915 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9209 "scanner.c" } +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_duplex_sources = (_vala_array_free (adf_duplex_sources, adf_duplex_sources_length1, (GDestroyNotify) g_free), NULL); +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_back_sources = (_vala_array_free (adf_back_sources, adf_back_sources_length1, (GDestroyNotify) g_free), NULL); +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_front_sources = (_vala_array_free (adf_front_sources, adf_front_sources_length1, (GDestroyNotify) g_free), NULL); +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" adf_sources = (_vala_array_free (adf_sources, adf_sources_length1, (GDestroyNotify) g_free), NULL); +#line 872 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" flatbed_sources = (_vala_array_free (flatbed_sources, flatbed_sources_length1, (GDestroyNotify) g_free), NULL); +#line 9221 "scanner.c" } - _tmp86_ = self->priv->handle; - _tmp87_ = SANE_NAME_SCAN_MODE; - _tmp89_ = scanner_get_option_by_name (self, _tmp86_, _tmp87_, &_tmp88_); - index = (SANE_Int) _tmp88_; - option = _tmp89_; - _tmp90_ = option; - if (_tmp90_ != NULL) { - const gchar* _tmp91_; - gchar* _tmp92_; - gchar* _tmp93_; - gchar* _tmp94_; - gchar** _tmp95_ = NULL; - gchar** color_scan_modes; - gint color_scan_modes_length1; - gint _color_scan_modes_size_; - const gchar* _tmp96_; - gchar* _tmp97_; - gchar* _tmp98_; +#line 941 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp93_ = self->priv->handle; +#line 941 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp94_ = SANE_NAME_SCAN_MODE; +#line 941 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp96_ = scanner_get_option_by_name (self, _tmp93_, _tmp94_, &_tmp95_); +#line 941 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp95_; +#line 941 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp96_; +#line 942 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp97_ = option; +#line 942 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp97_ != NULL) { +#line 9237 "scanner.c" + const gchar* _tmp98_; gchar* _tmp99_; - const gchar* _tmp100_ = NULL; + gchar* _tmp100_; gchar* _tmp101_; gchar* _tmp102_; gchar** _tmp103_ = NULL; - gchar** gray_scan_modes; - gint gray_scan_modes_length1; - gint _gray_scan_modes_size_; + gchar** color_scan_modes; + gint color_scan_modes_length1; + gint _color_scan_modes_size_; const gchar* _tmp104_; gchar* _tmp105_; gchar* _tmp106_; @@ -6133,642 +9257,1238 @@ static void scanner_do_get_option (Scanner* self) { const gchar* _tmp108_ = NULL; gchar* _tmp109_; gchar* _tmp110_; - const gchar* _tmp111_ = NULL; - gchar* _tmp112_; - gchar* _tmp113_; - const gchar* _tmp114_ = NULL; + gchar* _tmp111_; + gchar** _tmp112_ = NULL; + gchar** gray_scan_modes; + gint gray_scan_modes_length1; + gint _gray_scan_modes_size_; + const gchar* _tmp113_; + gchar* _tmp114_; gchar* _tmp115_; gchar* _tmp116_; - const gchar* _tmp117_; + const gchar* _tmp117_ = NULL; gchar* _tmp118_; gchar* _tmp119_; - gchar* _tmp120_; - const gchar* _tmp121_ = NULL; + const gchar* _tmp120_ = NULL; + gchar* _tmp121_; gchar* _tmp122_; - gchar* _tmp123_; - gchar** _tmp124_ = NULL; + const gchar* _tmp123_ = NULL; + gchar* _tmp124_; + gchar* _tmp125_; + const gchar* _tmp126_; + gchar* _tmp127_; + gchar* _tmp128_; + gchar* _tmp129_; + const gchar* _tmp130_ = NULL; + gchar* _tmp131_; + gchar* _tmp132_; + gchar* _tmp133_; + gchar* _tmp134_; + gchar** _tmp135_ = NULL; gchar** lineart_scan_modes; gint lineart_scan_modes_length1; gint _lineart_scan_modes_size_; - ScanJob* _tmp125_; - ScanMode _tmp126_; - _tmp91_ = SANE_VALUE_SCAN_MODE_COLOR; - _tmp92_ = g_strdup (_tmp91_); - _tmp93_ = g_strdup ("Color"); - _tmp94_ = g_strdup ("24bit Color"); - _tmp95_ = g_new0 (gchar*, 3 + 1); - _tmp95_[0] = _tmp92_; - _tmp95_[1] = _tmp93_; - _tmp95_[2] = _tmp94_; - color_scan_modes = _tmp95_; - color_scan_modes_length1 = 3; + ScanJob* _tmp136_; + ScanMode _tmp137_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp98_ = SANE_VALUE_SCAN_MODE_COLOR; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp99_ = g_strdup (_tmp98_); +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp100_ = g_strdup ("Color"); +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp101_ = g_strdup ("24bit Color"); +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp102_ = g_strdup ("Color - 16 Million Colors"); +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp103_ = g_new0 (gchar*, 4 + 1); +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp103_[0] = _tmp99_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp103_[1] = _tmp100_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp103_[2] = _tmp101_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp103_[3] = _tmp102_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + color_scan_modes = _tmp103_; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + color_scan_modes_length1 = 4; +#line 945 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _color_scan_modes_size_ = color_scan_modes_length1; - _tmp96_ = SANE_VALUE_SCAN_MODE_GRAY; - _tmp97_ = g_strdup (_tmp96_); - _tmp98_ = g_strdup ("Gray"); - _tmp99_ = g_strdup ("Grayscale"); - _tmp100_ = SANE_I18N ("Grayscale"); - _tmp101_ = g_strdup (_tmp100_); - _tmp102_ = g_strdup ("True Gray"); - _tmp103_ = g_new0 (gchar*, 5 + 1); - _tmp103_[0] = _tmp97_; - _tmp103_[1] = _tmp98_; - _tmp103_[2] = _tmp99_; - _tmp103_[3] = _tmp101_; - _tmp103_[4] = _tmp102_; - gray_scan_modes = _tmp103_; - gray_scan_modes_length1 = 5; - _gray_scan_modes_size_ = gray_scan_modes_length1; - _tmp104_ = SANE_VALUE_SCAN_MODE_LINEART; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp104_ = SANE_VALUE_SCAN_MODE_GRAY; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp105_ = g_strdup (_tmp104_); - _tmp106_ = g_strdup ("Lineart"); - _tmp107_ = g_strdup ("LineArt"); - _tmp108_ = SANE_I18N ("LineArt"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp106_ = g_strdup ("Gray"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp107_ = g_strdup ("Grayscale"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp108_ = SANE_I18N ("Grayscale"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp109_ = g_strdup (_tmp108_); - _tmp110_ = g_strdup ("Black & White"); - _tmp111_ = SANE_I18N ("Black & White"); - _tmp112_ = g_strdup (_tmp111_); - _tmp113_ = g_strdup ("Binary"); - _tmp114_ = SANE_I18N ("Binary"); - _tmp115_ = g_strdup (_tmp114_); - _tmp116_ = g_strdup ("Thresholded"); - _tmp117_ = SANE_VALUE_SCAN_MODE_GRAY; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp110_ = g_strdup ("True Gray"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp111_ = g_strdup ("Grayscale - 256 Levels"); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_ = g_new0 (gchar*, 6 + 1); +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[0] = _tmp105_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[1] = _tmp106_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[2] = _tmp107_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[3] = _tmp109_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[4] = _tmp110_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp112_[5] = _tmp111_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + gray_scan_modes = _tmp112_; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + gray_scan_modes_length1 = 6; +#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _gray_scan_modes_size_ = gray_scan_modes_length1; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp113_ = SANE_VALUE_SCAN_MODE_LINEART; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp114_ = g_strdup (_tmp113_); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp115_ = g_strdup ("Lineart"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp116_ = g_strdup ("LineArt"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp117_ = SANE_I18N ("LineArt"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp118_ = g_strdup (_tmp117_); - _tmp119_ = g_strdup ("Gray"); - _tmp120_ = g_strdup ("Grayscale"); - _tmp121_ = SANE_I18N ("Grayscale"); - _tmp122_ = g_strdup (_tmp121_); - _tmp123_ = g_strdup ("True Gray"); - _tmp124_ = g_new0 (gchar*, 14 + 1); - _tmp124_[0] = _tmp105_; - _tmp124_[1] = _tmp106_; - _tmp124_[2] = _tmp107_; - _tmp124_[3] = _tmp109_; - _tmp124_[4] = _tmp110_; - _tmp124_[5] = _tmp112_; - _tmp124_[6] = _tmp113_; - _tmp124_[7] = _tmp115_; - _tmp124_[8] = _tmp116_; - _tmp124_[9] = _tmp118_; - _tmp124_[10] = _tmp119_; - _tmp124_[11] = _tmp120_; - _tmp124_[12] = _tmp122_; - _tmp124_[13] = _tmp123_; - lineart_scan_modes = _tmp124_; - lineart_scan_modes_length1 = 14; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp119_ = g_strdup ("Black & White"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp120_ = SANE_I18N ("Black & White"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp121_ = g_strdup (_tmp120_); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp122_ = g_strdup ("Binary"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp123_ = SANE_I18N ("Binary"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp124_ = g_strdup (_tmp123_); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp125_ = g_strdup ("Thresholded"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp126_ = SANE_VALUE_SCAN_MODE_GRAY; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp127_ = g_strdup (_tmp126_); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp128_ = g_strdup ("Gray"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp129_ = g_strdup ("Grayscale"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp130_ = SANE_I18N ("Grayscale"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp131_ = g_strdup (_tmp130_); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp132_ = g_strdup ("True Gray"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp133_ = g_strdup ("Black and White - Line Art"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp134_ = g_strdup ("Black and White - Halftone"); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_ = g_new0 (gchar*, 16 + 1); +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[0] = _tmp114_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[1] = _tmp115_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[2] = _tmp116_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[3] = _tmp118_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[4] = _tmp119_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[5] = _tmp121_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[6] = _tmp122_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[7] = _tmp124_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[8] = _tmp125_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[9] = _tmp127_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[10] = _tmp128_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[11] = _tmp129_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[12] = _tmp131_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[13] = _tmp132_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[14] = _tmp133_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp135_[15] = _tmp134_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + lineart_scan_modes = _tmp135_; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + lineart_scan_modes_length1 = 16; +#line 961 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _lineart_scan_modes_size_ = lineart_scan_modes_length1; - _tmp125_ = job; - _tmp126_ = _tmp125_->scan_mode; - switch (_tmp126_) { +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp136_ = job; +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp137_ = _tmp136_->scan_mode; +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + switch (_tmp137_) { +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_COLOR: +#line 9441 "scanner.c" { - SANE_Handle _tmp127_; - SANE_Option_Descriptor* _tmp128_; - SANE_Int _tmp129_; - gchar** _tmp130_; - gint _tmp130__length1; - gboolean _tmp131_ = FALSE; - _tmp127_ = self->priv->handle; - _tmp128_ = option; - _tmp129_ = index; - _tmp130_ = color_scan_modes; - _tmp130__length1 = color_scan_modes_length1; - _tmp131_ = scanner_set_constrained_string_option (self, _tmp127_, _tmp128_, _tmp129_, _tmp130_, _tmp130__length1, NULL); - if (!_tmp131_) { - g_warning ("scanner.vala:950: Unable to set Color mode, please file a bug"); + SANE_Handle _tmp138_; + SANE_Option_Descriptor* _tmp139_; + SANE_Int _tmp140_; + gchar** _tmp141_; + gint _tmp141__length1; + gboolean _tmp142_ = FALSE; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp138_ = self->priv->handle; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp139_ = option; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp140_ = index; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp141_ = color_scan_modes; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp141__length1 = color_scan_modes_length1; +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp142_ = scanner_set_constrained_string_option (self, _tmp138_, _tmp139_, _tmp140_, _tmp141_, _tmp141__length1, NULL); +#line 984 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp142_) { +#line 985 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:985: Unable to set Color mode, please file a bug"); +#line 9465 "scanner.c" } +#line 986 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9469 "scanner.c" } +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_GRAY: +#line 9473 "scanner.c" { - SANE_Handle _tmp132_; - SANE_Option_Descriptor* _tmp133_; - SANE_Int _tmp134_; - gchar** _tmp135_; - gint _tmp135__length1; - gboolean _tmp136_ = FALSE; - _tmp132_ = self->priv->handle; - _tmp133_ = option; - _tmp134_ = index; - _tmp135_ = gray_scan_modes; - _tmp135__length1 = gray_scan_modes_length1; - _tmp136_ = scanner_set_constrained_string_option (self, _tmp132_, _tmp133_, _tmp134_, _tmp135_, _tmp135__length1, NULL); - if (!_tmp136_) { - g_warning ("scanner.vala:954: Unable to set Gray mode, please file a bug"); + SANE_Handle _tmp143_; + SANE_Option_Descriptor* _tmp144_; + SANE_Int _tmp145_; + gchar** _tmp146_; + gint _tmp146__length1; + gboolean _tmp147_ = FALSE; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp143_ = self->priv->handle; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp144_ = option; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp145_ = index; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp146_ = gray_scan_modes; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp146__length1 = gray_scan_modes_length1; +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp147_ = scanner_set_constrained_string_option (self, _tmp143_, _tmp144_, _tmp145_, _tmp146_, _tmp146__length1, NULL); +#line 988 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp147_) { +#line 989 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:989: Unable to set Gray mode, please file a bug"); +#line 9497 "scanner.c" } +#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9501 "scanner.c" } +#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_LINEART: +#line 9505 "scanner.c" { - SANE_Handle _tmp137_; - SANE_Option_Descriptor* _tmp138_; - SANE_Int _tmp139_; - gchar** _tmp140_; - gint _tmp140__length1; - gboolean _tmp141_ = FALSE; - _tmp137_ = self->priv->handle; - _tmp138_ = option; - _tmp139_ = index; - _tmp140_ = lineart_scan_modes; - _tmp140__length1 = lineart_scan_modes_length1; - _tmp141_ = scanner_set_constrained_string_option (self, _tmp137_, _tmp138_, _tmp139_, _tmp140_, _tmp140__length1, NULL); - if (!_tmp141_) { - g_warning ("scanner.vala:958: Unable to set Lineart mode, please file a bug"); + SANE_Handle _tmp148_; + SANE_Option_Descriptor* _tmp149_; + SANE_Int _tmp150_; + gchar** _tmp151_; + gint _tmp151__length1; + gboolean _tmp152_ = FALSE; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp148_ = self->priv->handle; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp149_ = option; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp150_ = index; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp151_ = lineart_scan_modes; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp151__length1 = lineart_scan_modes_length1; +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp152_ = scanner_set_constrained_string_option (self, _tmp148_, _tmp149_, _tmp150_, _tmp151_, _tmp151__length1, NULL); +#line 992 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp152_) { +#line 993 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:993: Unable to set Lineart mode, please file a bug"); +#line 9529 "scanner.c" } +#line 994 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9533 "scanner.c" } default: { +#line 996 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 9539 "scanner.c" } } +#line 942 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" lineart_scan_modes = (_vala_array_free (lineart_scan_modes, lineart_scan_modes_length1, (GDestroyNotify) g_free), NULL); +#line 942 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" gray_scan_modes = (_vala_array_free (gray_scan_modes, gray_scan_modes_length1, (GDestroyNotify) g_free), NULL); +#line 942 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" color_scan_modes = (_vala_array_free (color_scan_modes, color_scan_modes_length1, (GDestroyNotify) g_free), NULL); +#line 9548 "scanner.c" } - _tmp142_ = self->priv->handle; - _tmp144_ = scanner_get_option_by_name (self, _tmp142_, "duplex", &_tmp143_); - index = (SANE_Int) _tmp143_; - option = _tmp144_; - _tmp145_ = option; - if (_tmp145_ != NULL) { - SANE_Option_Descriptor* _tmp146_; - SANE_Value_Type _tmp147_; - _tmp146_ = option; - _tmp147_ = _tmp146_->type; - if (_tmp147_ == SANE_TYPE_BOOL) { - SANE_Handle _tmp148_; - SANE_Option_Descriptor* _tmp149_; - SANE_Int _tmp150_; - ScanJob* _tmp151_; - ScanType _tmp152_; - _tmp148_ = self->priv->handle; - _tmp149_ = option; - _tmp150_ = index; - _tmp151_ = job; - _tmp152_ = _tmp151_->type; - scanner_set_bool_option (self, _tmp148_, _tmp149_, _tmp150_, _tmp152_ == SCAN_TYPE_ADF_BOTH, NULL); - } - } +#line 1001 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp153_ = self->priv->handle; - _tmp155_ = scanner_get_option_by_name (self, _tmp153_, "batch-scan", &_tmp154_); +#line 1001 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp155_ = scanner_get_option_by_name (self, _tmp153_, "duplex", &_tmp154_); +#line 1001 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" index = (SANE_Int) _tmp154_; +#line 1001 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" option = _tmp155_; +#line 1002 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp156_ = option; +#line 1002 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp156_ != NULL) { +#line 9562 "scanner.c" SANE_Option_Descriptor* _tmp157_; SANE_Value_Type _tmp158_; +#line 1004 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp157_ = option; +#line 1004 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp158_ = _tmp157_->type; +#line 1004 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp158_ == SANE_TYPE_BOOL) { +#line 9571 "scanner.c" SANE_Handle _tmp159_; SANE_Option_Descriptor* _tmp160_; SANE_Int _tmp161_; ScanJob* _tmp162_; ScanType _tmp163_; +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp159_ = self->priv->handle; +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp160_ = option; +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp161_ = index; +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp162_ = job; +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp163_ = _tmp162_->type; - scanner_set_bool_option (self, _tmp159_, _tmp160_, _tmp161_, _tmp163_ != SCAN_TYPE_SINGLE, NULL); +#line 1005 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_bool_option (self, _tmp159_, _tmp160_, _tmp161_, _tmp163_ == SCAN_TYPE_ADF_BOTH, NULL); +#line 9589 "scanner.c" } } +#line 1009 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp164_ = self->priv->handle; - _tmp166_ = scanner_get_option_by_name (self, _tmp164_, "compression", &_tmp165_); +#line 1009 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp166_ = scanner_get_option_by_name (self, _tmp164_, "batch-scan", &_tmp165_); +#line 1009 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" index = (SANE_Int) _tmp165_; +#line 1009 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" option = _tmp166_; +#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp167_ = option; +#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp167_ != NULL) { - const gchar* _tmp168_ = NULL; - gchar* _tmp169_; - const gchar* _tmp170_ = NULL; - gchar* _tmp171_; - gchar* _tmp172_; - gchar* _tmp173_; - gchar** _tmp174_ = NULL; +#line 9604 "scanner.c" + SANE_Option_Descriptor* _tmp168_; + SANE_Value_Type _tmp169_; +#line 1012 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp168_ = option; +#line 1012 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp169_ = _tmp168_->type; +#line 1012 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp169_ == SANE_TYPE_BOOL) { +#line 9613 "scanner.c" + SANE_Handle _tmp170_; + SANE_Option_Descriptor* _tmp171_; + SANE_Int _tmp172_; + ScanJob* _tmp173_; + ScanType _tmp174_; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp170_ = self->priv->handle; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp171_ = option; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp172_ = index; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp173_ = job; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp174_ = _tmp173_->type; +#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_bool_option (self, _tmp170_, _tmp171_, _tmp172_, _tmp174_ != SCAN_TYPE_SINGLE, NULL); +#line 9631 "scanner.c" + } + } +#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp175_ = self->priv->handle; +#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp177_ = scanner_get_option_by_name (self, _tmp175_, "compression", &_tmp176_); +#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp176_; +#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp177_; +#line 1018 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp178_ = option; +#line 1018 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp178_ != NULL) { +#line 9646 "scanner.c" + const gchar* _tmp179_ = NULL; + gchar* _tmp180_; + const gchar* _tmp181_ = NULL; + gchar* _tmp182_; + gchar* _tmp183_; + gchar* _tmp184_; + gchar** _tmp185_ = NULL; gchar** disable_compression_names; gint disable_compression_names_length1; gint _disable_compression_names_size_; - SANE_Handle _tmp175_; - SANE_Option_Descriptor* _tmp176_; - SANE_Int _tmp177_; - gchar** _tmp178_; - gint _tmp178__length1; - gboolean _tmp179_ = FALSE; - _tmp168_ = SANE_I18N ("None"); - _tmp169_ = g_strdup (_tmp168_); - _tmp170_ = SANE_I18N ("none"); - _tmp171_ = g_strdup (_tmp170_); - _tmp172_ = g_strdup ("None"); - _tmp173_ = g_strdup ("none"); - _tmp174_ = g_new0 (gchar*, 4 + 1); - _tmp174_[0] = _tmp169_; - _tmp174_[1] = _tmp171_; - _tmp174_[2] = _tmp172_; - _tmp174_[3] = _tmp173_; - disable_compression_names = _tmp174_; + SANE_Handle _tmp186_; + SANE_Option_Descriptor* _tmp187_; + SANE_Int _tmp188_; + gchar** _tmp189_; + gint _tmp189__length1; + gboolean _tmp190_ = FALSE; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp179_ = SANE_I18N ("None"); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp180_ = g_strdup (_tmp179_); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp181_ = SANE_I18N ("none"); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp182_ = g_strdup (_tmp181_); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp183_ = g_strdup ("None"); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp184_ = g_strdup ("none"); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp185_ = g_new0 (gchar*, 4 + 1); +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp185_[0] = _tmp180_; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp185_[1] = _tmp182_; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp185_[2] = _tmp183_; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp185_[3] = _tmp184_; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + disable_compression_names = _tmp185_; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" disable_compression_names_length1 = 4; +#line 1020 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _disable_compression_names_size_ = disable_compression_names_length1; - _tmp175_ = self->priv->handle; - _tmp176_ = option; - _tmp177_ = index; - _tmp178_ = disable_compression_names; - _tmp178__length1 = disable_compression_names_length1; - _tmp179_ = scanner_set_constrained_string_option (self, _tmp175_, _tmp176_, _tmp177_, _tmp178_, _tmp178__length1, NULL); - if (!_tmp179_) { - g_warning ("scanner.vala:994: Unable to disable compression, please file a bug"); +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp186_ = self->priv->handle; +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp187_ = option; +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp188_ = index; +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp189_ = disable_compression_names; +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp189__length1 = disable_compression_names_length1; +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp190_ = scanner_set_constrained_string_option (self, _tmp186_, _tmp187_, _tmp188_, _tmp189_, _tmp189__length1, NULL); +#line 1028 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (!_tmp190_) { +#line 1029 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1029: Unable to disable compression, please file a bug"); +#line 9707 "scanner.c" } +#line 1018 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" disable_compression_names = (_vala_array_free (disable_compression_names, disable_compression_names_length1, (GDestroyNotify) g_free), NULL); +#line 9711 "scanner.c" } - _tmp180_ = self->priv->handle; - _tmp181_ = SANE_NAME_SCAN_RESOLUTION; - _tmp183_ = scanner_get_option_by_name (self, _tmp180_, _tmp181_, &_tmp182_); - index = (SANE_Int) _tmp182_; - option = _tmp183_; - _tmp184_ = option; - if (_tmp184_ != NULL) { - SANE_Option_Descriptor* _tmp185_; - SANE_Value_Type _tmp186_; - SANE_Handle _tmp202_; - const gchar* _tmp203_; - gint _tmp204_ = 0; - SANE_Option_Descriptor* _tmp205_ = NULL; - SANE_Option_Descriptor* _tmp206_; - _tmp185_ = option; - _tmp186_ = _tmp185_->type; - if (_tmp186_ == SANE_TYPE_FIXED) { - SANE_Handle _tmp187_; - SANE_Option_Descriptor* _tmp188_; - SANE_Int _tmp189_; - ScanJob* _tmp190_; - gdouble _tmp191_; - ScanJob* _tmp192_; - gdouble _tmp193_ = 0.0; - _tmp187_ = self->priv->handle; - _tmp188_ = option; - _tmp189_ = index; - _tmp190_ = job; - _tmp191_ = _tmp190_->dpi; - _tmp192_ = job; - scanner_set_fixed_option (self, _tmp187_, _tmp188_, _tmp189_, _tmp191_, &_tmp193_); - _tmp192_->dpi = _tmp193_; +#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp191_ = self->priv->handle; +#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp192_ = SANE_NAME_SCAN_RESOLUTION; +#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp194_ = scanner_get_option_by_name (self, _tmp191_, _tmp192_, &_tmp193_); +#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp193_; +#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp194_; +#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp195_ = option; +#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp195_ != NULL) { +#line 9727 "scanner.c" + SANE_Option_Descriptor* _tmp196_; + SANE_Value_Type _tmp197_; + SANE_Handle _tmp213_; + const gchar* _tmp214_; + gint _tmp215_ = 0; + SANE_Option_Descriptor* _tmp216_ = NULL; + SANE_Option_Descriptor* _tmp217_; +#line 1036 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp196_ = option; +#line 1036 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp197_ = _tmp196_->type; +#line 1036 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp197_ == SANE_TYPE_FIXED) { +#line 9741 "scanner.c" + SANE_Handle _tmp198_; + SANE_Option_Descriptor* _tmp199_; + SANE_Int _tmp200_; + ScanJob* _tmp201_; + gdouble _tmp202_; + ScanJob* _tmp203_; + gdouble _tmp204_ = 0.0; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp198_ = self->priv->handle; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp199_ = option; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp200_ = index; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp201_ = job; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp202_ = _tmp201_->dpi; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp203_ = job; +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_fixed_option (self, _tmp198_, _tmp199_, _tmp200_, _tmp202_, &_tmp204_); +#line 1037 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp203_->dpi = _tmp204_; +#line 9765 "scanner.c" } else { gint dpi = 0; - SANE_Handle _tmp194_; - SANE_Option_Descriptor* _tmp195_; - SANE_Int _tmp196_; - ScanJob* _tmp197_; - gdouble _tmp198_; - gint _tmp199_ = 0; - ScanJob* _tmp200_; - gint _tmp201_; - _tmp194_ = self->priv->handle; - _tmp195_ = option; - _tmp196_ = index; - _tmp197_ = job; - _tmp198_ = _tmp197_->dpi; - scanner_set_int_option (self, _tmp194_, _tmp195_, _tmp196_, (gint) _tmp198_, &_tmp199_); - dpi = _tmp199_; - _tmp200_ = job; - _tmp201_ = dpi; - _tmp200_->dpi = (gdouble) _tmp201_; + SANE_Handle _tmp205_; + SANE_Option_Descriptor* _tmp206_; + SANE_Int _tmp207_; + ScanJob* _tmp208_; + gdouble _tmp209_; + gint _tmp210_ = 0; + ScanJob* _tmp211_; + gint _tmp212_; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp205_ = self->priv->handle; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp206_ = option; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp207_ = index; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp208_ = job; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp209_ = _tmp208_->dpi; +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp205_, _tmp206_, _tmp207_, (gint) _tmp209_, &_tmp210_); +#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + dpi = _tmp210_; +#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp211_ = job; +#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp212_ = dpi; +#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp211_->dpi = (gdouble) _tmp212_; +#line 9796 "scanner.c" } - _tmp202_ = self->priv->handle; - _tmp203_ = SANE_NAME_BIT_DEPTH; - _tmp205_ = scanner_get_option_by_name (self, _tmp202_, _tmp203_, &_tmp204_); - index = (SANE_Int) _tmp204_; - option = _tmp205_; - _tmp206_ = option; - if (_tmp206_ != NULL) { - ScanJob* _tmp207_; - gint _tmp208_; - _tmp207_ = job; - _tmp208_ = _tmp207_->depth; - if (_tmp208_ > 0) { - SANE_Handle _tmp209_; - SANE_Option_Descriptor* _tmp210_; - SANE_Int _tmp211_; - ScanJob* _tmp212_; - gint _tmp213_; - _tmp209_ = self->priv->handle; - _tmp210_ = option; - _tmp211_ = index; - _tmp212_ = job; - _tmp213_ = _tmp212_->depth; - scanner_set_int_option (self, _tmp209_, _tmp210_, _tmp211_, _tmp213_, NULL); +#line 1044 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp213_ = self->priv->handle; +#line 1044 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp214_ = SANE_NAME_BIT_DEPTH; +#line 1044 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp216_ = scanner_get_option_by_name (self, _tmp213_, _tmp214_, &_tmp215_); +#line 1044 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp215_; +#line 1044 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp216_; +#line 1045 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp217_ = option; +#line 1045 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp217_ != NULL) { +#line 9812 "scanner.c" + ScanJob* _tmp218_; + gint _tmp219_; +#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp218_ = job; +#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp219_ = _tmp218_->depth; +#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp219_ > 0) { +#line 9821 "scanner.c" + SANE_Handle _tmp220_; + SANE_Option_Descriptor* _tmp221_; + SANE_Int _tmp222_; + ScanJob* _tmp223_; + gint _tmp224_; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp220_ = self->priv->handle; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp221_ = option; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp222_ = index; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp223_ = job; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp224_ = _tmp223_->depth; +#line 1048 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp220_, _tmp221_, _tmp222_, _tmp224_, NULL); +#line 9839 "scanner.c" } } } - _tmp214_ = self->priv->handle; - _tmp215_ = SANE_NAME_SCAN_BR_X; - _tmp217_ = scanner_get_option_by_name (self, _tmp214_, _tmp215_, &_tmp216_); - index = (SANE_Int) _tmp216_; - option = _tmp217_; - _tmp218_ = option; - if (_tmp218_ != NULL) { - SANE_Option_Descriptor* _tmp219_; - SANE_Constraint_Type _tmp220_; - _tmp219_ = option; - _tmp220_ = _tmp219_->constraint_type; - if (_tmp220_ == SANE_CONSTRAINT_RANGE) { - SANE_Option_Descriptor* _tmp221_; - SANE_Value_Type _tmp222_; - _tmp221_ = option; - _tmp222_ = _tmp221_->type; - if (_tmp222_ == SANE_TYPE_FIXED) { - SANE_Handle _tmp223_; - SANE_Option_Descriptor* _tmp224_; - SANE_Int _tmp225_; - SANE_Option_Descriptor* _tmp226_; - SANE_Range* _tmp227_; - SANE_Word _tmp228_; - gdouble _tmp229_ = 0.0; - _tmp223_ = self->priv->handle; - _tmp224_ = option; - _tmp225_ = index; - _tmp226_ = option; - _tmp227_ = _tmp226_->constraint.range; - _tmp228_ = _tmp227_->max; - _tmp229_ = SANE_UNFIX ((SANE_Fixed) _tmp228_); - scanner_set_fixed_option (self, _tmp223_, _tmp224_, _tmp225_, _tmp229_, NULL); +#line 1053 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp225_ = self->priv->handle; +#line 1053 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp226_ = SANE_NAME_SCAN_BR_X; +#line 1053 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp228_ = scanner_get_option_by_name (self, _tmp225_, _tmp226_, &_tmp227_); +#line 1053 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp227_; +#line 1053 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp228_; +#line 1054 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp229_ = option; +#line 1054 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp229_ != NULL) { +#line 9857 "scanner.c" + SANE_Option_Descriptor* _tmp230_; + SANE_Constraint_Type _tmp231_; +#line 1056 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp230_ = option; +#line 1056 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp231_ = _tmp230_->constraint_type; +#line 1056 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp231_ == SANE_CONSTRAINT_RANGE) { +#line 9866 "scanner.c" + SANE_Option_Descriptor* _tmp232_; + SANE_Value_Type _tmp233_; +#line 1058 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp232_ = option; +#line 1058 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp233_ = _tmp232_->type; +#line 1058 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp233_ == SANE_TYPE_FIXED) { +#line 9875 "scanner.c" + SANE_Handle _tmp234_; + SANE_Option_Descriptor* _tmp235_; + SANE_Int _tmp236_; + SANE_Option_Descriptor* _tmp237_; + SANE_Range* _tmp238_; + SANE_Word _tmp239_; + gdouble _tmp240_ = 0.0; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp234_ = self->priv->handle; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp235_ = option; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp236_ = index; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp237_ = option; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp238_ = _tmp237_->constraint.range; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp239_ = _tmp238_->max; +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp240_ = SANE_UNFIX ((SANE_Fixed) _tmp239_); +#line 1059 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_fixed_option (self, _tmp234_, _tmp235_, _tmp236_, _tmp240_, NULL); +#line 9899 "scanner.c" } else { - SANE_Handle _tmp230_; - SANE_Option_Descriptor* _tmp231_; - SANE_Int _tmp232_; - SANE_Option_Descriptor* _tmp233_; - SANE_Range* _tmp234_; - SANE_Word _tmp235_; - _tmp230_ = self->priv->handle; - _tmp231_ = option; - _tmp232_ = index; - _tmp233_ = option; - _tmp234_ = _tmp233_->constraint.range; - _tmp235_ = _tmp234_->max; - scanner_set_int_option (self, _tmp230_, _tmp231_, _tmp232_, (gint) _tmp235_, NULL); + SANE_Handle _tmp241_; + SANE_Option_Descriptor* _tmp242_; + SANE_Int _tmp243_; + SANE_Option_Descriptor* _tmp244_; + SANE_Range* _tmp245_; + SANE_Word _tmp246_; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp241_ = self->priv->handle; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp242_ = option; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp243_ = index; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp244_ = option; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp245_ = _tmp244_->constraint.range; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp246_ = _tmp245_->max; +#line 1061 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp241_, _tmp242_, _tmp243_, (gint) _tmp246_, NULL); +#line 9921 "scanner.c" } } } - _tmp236_ = self->priv->handle; - _tmp237_ = SANE_NAME_SCAN_BR_Y; - _tmp239_ = scanner_get_option_by_name (self, _tmp236_, _tmp237_, &_tmp238_); - index = (SANE_Int) _tmp238_; - option = _tmp239_; - _tmp240_ = option; - if (_tmp240_ != NULL) { - SANE_Option_Descriptor* _tmp241_; - SANE_Constraint_Type _tmp242_; - _tmp241_ = option; - _tmp242_ = _tmp241_->constraint_type; - if (_tmp242_ == SANE_CONSTRAINT_RANGE) { - SANE_Option_Descriptor* _tmp243_; - SANE_Value_Type _tmp244_; - _tmp243_ = option; - _tmp244_ = _tmp243_->type; - if (_tmp244_ == SANE_TYPE_FIXED) { - SANE_Handle _tmp245_; - SANE_Option_Descriptor* _tmp246_; - SANE_Int _tmp247_; - SANE_Option_Descriptor* _tmp248_; - SANE_Range* _tmp249_; - SANE_Word _tmp250_; - gdouble _tmp251_ = 0.0; - _tmp245_ = self->priv->handle; - _tmp246_ = option; - _tmp247_ = index; - _tmp248_ = option; - _tmp249_ = _tmp248_->constraint.range; - _tmp250_ = _tmp249_->max; - _tmp251_ = SANE_UNFIX ((SANE_Fixed) _tmp250_); - scanner_set_fixed_option (self, _tmp245_, _tmp246_, _tmp247_, _tmp251_, NULL); +#line 1064 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp247_ = self->priv->handle; +#line 1064 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp248_ = SANE_NAME_SCAN_BR_Y; +#line 1064 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp250_ = scanner_get_option_by_name (self, _tmp247_, _tmp248_, &_tmp249_); +#line 1064 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp249_; +#line 1064 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp250_; +#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp251_ = option; +#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp251_ != NULL) { +#line 9939 "scanner.c" + SANE_Option_Descriptor* _tmp252_; + SANE_Constraint_Type _tmp253_; +#line 1067 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp252_ = option; +#line 1067 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp253_ = _tmp252_->constraint_type; +#line 1067 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp253_ == SANE_CONSTRAINT_RANGE) { +#line 9948 "scanner.c" + SANE_Option_Descriptor* _tmp254_; + SANE_Value_Type _tmp255_; +#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp254_ = option; +#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp255_ = _tmp254_->type; +#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp255_ == SANE_TYPE_FIXED) { +#line 9957 "scanner.c" + SANE_Handle _tmp256_; + SANE_Option_Descriptor* _tmp257_; + SANE_Int _tmp258_; + SANE_Option_Descriptor* _tmp259_; + SANE_Range* _tmp260_; + SANE_Word _tmp261_; + gdouble _tmp262_ = 0.0; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp256_ = self->priv->handle; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp257_ = option; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp258_ = index; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp259_ = option; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp260_ = _tmp259_->constraint.range; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp261_ = _tmp260_->max; +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp262_ = SANE_UNFIX ((SANE_Fixed) _tmp261_); +#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_fixed_option (self, _tmp256_, _tmp257_, _tmp258_, _tmp262_, NULL); +#line 9981 "scanner.c" } else { - SANE_Handle _tmp252_; - SANE_Option_Descriptor* _tmp253_; - SANE_Int _tmp254_; - SANE_Option_Descriptor* _tmp255_; - SANE_Range* _tmp256_; - SANE_Word _tmp257_; - _tmp252_ = self->priv->handle; - _tmp253_ = option; - _tmp254_ = index; - _tmp255_ = option; - _tmp256_ = _tmp255_->constraint.range; - _tmp257_ = _tmp256_->max; - scanner_set_int_option (self, _tmp252_, _tmp253_, _tmp254_, (gint) _tmp257_, NULL); + SANE_Handle _tmp263_; + SANE_Option_Descriptor* _tmp264_; + SANE_Int _tmp265_; + SANE_Option_Descriptor* _tmp266_; + SANE_Range* _tmp267_; + SANE_Word _tmp268_; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp263_ = self->priv->handle; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp264_ = option; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp265_ = index; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp266_ = option; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp267_ = _tmp266_->constraint.range; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp268_ = _tmp267_->max; +#line 1072 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp263_, _tmp264_, _tmp265_, (gint) _tmp268_, NULL); +#line 10003 "scanner.c" } } } - _tmp258_ = self->priv->handle; - _tmp259_ = SANE_NAME_PAGE_WIDTH; - _tmp261_ = scanner_get_option_by_name (self, _tmp258_, _tmp259_, &_tmp260_); - index = (SANE_Int) _tmp260_; - option = _tmp261_; - _tmp262_ = option; - if (_tmp262_ != NULL) { - ScanJob* _tmp263_; - gint _tmp264_; - _tmp263_ = job; - _tmp264_ = _tmp263_->page_width; - if (((gdouble) _tmp264_) > 0.0) { - SANE_Option_Descriptor* _tmp265_; - SANE_Value_Type _tmp266_; - _tmp265_ = option; - _tmp266_ = _tmp265_->type; - if (_tmp266_ == SANE_TYPE_FIXED) { - SANE_Handle _tmp267_; - SANE_Option_Descriptor* _tmp268_; - SANE_Int _tmp269_; - ScanJob* _tmp270_; - gint _tmp271_; - _tmp267_ = self->priv->handle; - _tmp268_ = option; - _tmp269_ = index; - _tmp270_ = job; - _tmp271_ = _tmp270_->page_width; - scanner_set_fixed_option (self, _tmp267_, _tmp268_, _tmp269_, _tmp271_ / 10.0, NULL); +#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp269_ = self->priv->handle; +#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp270_ = SANE_NAME_PAGE_WIDTH; +#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp272_ = scanner_get_option_by_name (self, _tmp269_, _tmp270_, &_tmp271_); +#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp271_; +#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp272_; +#line 1077 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp273_ = option; +#line 1077 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp273_ != NULL) { +#line 10021 "scanner.c" + ScanJob* _tmp274_; + gint _tmp275_; +#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp274_ = job; +#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp275_ = _tmp274_->page_width; +#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (((gdouble) _tmp275_) > 0.0) { +#line 10030 "scanner.c" + SANE_Option_Descriptor* _tmp276_; + SANE_Value_Type _tmp277_; +#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp276_ = option; +#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp277_ = _tmp276_->type; +#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp277_ == SANE_TYPE_FIXED) { +#line 10039 "scanner.c" + SANE_Handle _tmp278_; + SANE_Option_Descriptor* _tmp279_; + SANE_Int _tmp280_; + ScanJob* _tmp281_; + gint _tmp282_; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp278_ = self->priv->handle; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp279_ = option; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp280_ = index; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp281_ = job; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp282_ = _tmp281_->page_width; +#line 1082 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_fixed_option (self, _tmp278_, _tmp279_, _tmp280_, _tmp282_ / 10.0, NULL); +#line 10057 "scanner.c" } else { - SANE_Handle _tmp272_; - SANE_Option_Descriptor* _tmp273_; - SANE_Int _tmp274_; - ScanJob* _tmp275_; - gint _tmp276_; - _tmp272_ = self->priv->handle; - _tmp273_ = option; - _tmp274_ = index; - _tmp275_ = job; - _tmp276_ = _tmp275_->page_width; - scanner_set_int_option (self, _tmp272_, _tmp273_, _tmp274_, _tmp276_ / 10, NULL); + SANE_Handle _tmp283_; + SANE_Option_Descriptor* _tmp284_; + SANE_Int _tmp285_; + ScanJob* _tmp286_; + gint _tmp287_; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp283_ = self->priv->handle; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp284_ = option; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp285_ = index; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp286_ = job; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp287_ = _tmp286_->page_width; +#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp283_, _tmp284_, _tmp285_, _tmp287_ / 10, NULL); +#line 10076 "scanner.c" } } } - _tmp277_ = self->priv->handle; - _tmp278_ = SANE_NAME_PAGE_HEIGHT; - _tmp280_ = scanner_get_option_by_name (self, _tmp277_, _tmp278_, &_tmp279_); - index = (SANE_Int) _tmp279_; - option = _tmp280_; - _tmp281_ = option; - if (_tmp281_ != NULL) { - ScanJob* _tmp282_; - gint _tmp283_; - _tmp282_ = job; - _tmp283_ = _tmp282_->page_height; - if (((gdouble) _tmp283_) > 0.0) { - SANE_Option_Descriptor* _tmp284_; - SANE_Value_Type _tmp285_; - _tmp284_ = option; - _tmp285_ = _tmp284_->type; - if (_tmp285_ == SANE_TYPE_FIXED) { - SANE_Handle _tmp286_; - SANE_Option_Descriptor* _tmp287_; - SANE_Int _tmp288_; - ScanJob* _tmp289_; - gint _tmp290_; - _tmp286_ = self->priv->handle; - _tmp287_ = option; - _tmp288_ = index; - _tmp289_ = job; - _tmp290_ = _tmp289_->page_height; - scanner_set_fixed_option (self, _tmp286_, _tmp287_, _tmp288_, _tmp290_ / 10.0, NULL); +#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp288_ = self->priv->handle; +#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp289_ = SANE_NAME_PAGE_HEIGHT; +#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp291_ = scanner_get_option_by_name (self, _tmp288_, _tmp289_, &_tmp290_); +#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp290_; +#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp291_; +#line 1088 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp292_ = option; +#line 1088 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp292_ != NULL) { +#line 10094 "scanner.c" + ScanJob* _tmp293_; + gint _tmp294_; +#line 1090 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp293_ = job; +#line 1090 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp294_ = _tmp293_->page_height; +#line 1090 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (((gdouble) _tmp294_) > 0.0) { +#line 10103 "scanner.c" + SANE_Option_Descriptor* _tmp295_; + SANE_Value_Type _tmp296_; +#line 1092 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp295_ = option; +#line 1092 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp296_ = _tmp295_->type; +#line 1092 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp296_ == SANE_TYPE_FIXED) { +#line 10112 "scanner.c" + SANE_Handle _tmp297_; + SANE_Option_Descriptor* _tmp298_; + SANE_Int _tmp299_; + ScanJob* _tmp300_; + gint _tmp301_; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp297_ = self->priv->handle; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp298_ = option; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp299_ = index; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp300_ = job; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp301_ = _tmp300_->page_height; +#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_fixed_option (self, _tmp297_, _tmp298_, _tmp299_, _tmp301_ / 10.0, NULL); +#line 10130 "scanner.c" } else { - SANE_Handle _tmp291_; - SANE_Option_Descriptor* _tmp292_; - SANE_Int _tmp293_; - ScanJob* _tmp294_; - gint _tmp295_; - _tmp291_ = self->priv->handle; - _tmp292_ = option; - _tmp293_ = index; - _tmp294_ = job; - _tmp295_ = _tmp294_->page_height; - scanner_set_int_option (self, _tmp291_, _tmp292_, _tmp293_, _tmp295_ / 10, NULL); + SANE_Handle _tmp302_; + SANE_Option_Descriptor* _tmp303_; + SANE_Int _tmp304_; + ScanJob* _tmp305_; + gint _tmp306_; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp302_ = self->priv->handle; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp303_ = option; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp304_ = index; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp305_ = job; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp306_ = _tmp305_->page_height; +#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp302_, _tmp303_, _tmp304_, _tmp306_ / 10, NULL); +#line 10149 "scanner.c" } } } - _tmp296_ = self->priv->current_device; - if (g_strcmp0 (_tmp296_, "test") == 0) { - SANE_Handle _tmp297_; - gint _tmp298_ = 0; - SANE_Option_Descriptor* _tmp299_ = NULL; - SANE_Option_Descriptor* _tmp300_; - SANE_Handle _tmp304_; - gint _tmp305_ = 0; - SANE_Option_Descriptor* _tmp306_ = NULL; - SANE_Option_Descriptor* _tmp307_; - SANE_Handle _tmp311_; - gint _tmp312_ = 0; - SANE_Option_Descriptor* _tmp313_ = NULL; - SANE_Option_Descriptor* _tmp314_; - SANE_Handle _tmp318_; - gint _tmp319_ = 0; - SANE_Option_Descriptor* _tmp320_ = NULL; - SANE_Option_Descriptor* _tmp321_; - SANE_Handle _tmp325_; - gint _tmp326_ = 0; - SANE_Option_Descriptor* _tmp327_ = NULL; - SANE_Option_Descriptor* _tmp328_; - _tmp297_ = self->priv->handle; - _tmp299_ = scanner_get_option_by_name (self, _tmp297_, "hand-scanner", &_tmp298_); - index = (SANE_Int) _tmp298_; - option = _tmp299_; - _tmp300_ = option; - if (_tmp300_ != NULL) { - SANE_Handle _tmp301_; - SANE_Option_Descriptor* _tmp302_; - SANE_Int _tmp303_; - _tmp301_ = self->priv->handle; - _tmp302_ = option; - _tmp303_ = index; - scanner_set_bool_option (self, _tmp301_, _tmp302_, _tmp303_, FALSE, NULL); +#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp307_ = self->priv->handle; +#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp308_ = SANE_NAME_BRIGHTNESS; +#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp310_ = scanner_get_option_by_name (self, _tmp307_, _tmp308_, &_tmp309_); +#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp309_; +#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp310_; +#line 1099 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp311_ = option; +#line 1099 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp311_ != NULL) { +#line 10167 "scanner.c" + ScanJob* _tmp312_; + gint _tmp313_; +#line 1101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp312_ = job; +#line 1101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp313_ = _tmp312_->brightness; +#line 1101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp313_ != 0) { +#line 10176 "scanner.c" + SANE_Option_Descriptor* _tmp314_; + ScanJob* _tmp315_; + gint _tmp316_; + gint _tmp317_ = 0; + gint brightness; + SANE_Handle _tmp318_; + SANE_Option_Descriptor* _tmp319_; + SANE_Int _tmp320_; + gint _tmp321_; +#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp314_ = option; +#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp315_ = job; +#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp316_ = _tmp315_->brightness; +#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp317_ = scanner_scale_int (self, -100, 100, _tmp314_, _tmp316_); +#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + brightness = _tmp317_; +#line 1104 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp318_ = self->priv->handle; +#line 1104 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp319_ = option; +#line 1104 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp320_ = index; +#line 1104 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp321_ = brightness; +#line 1104 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp318_, _tmp319_, _tmp320_, _tmp321_, NULL); +#line 10206 "scanner.c" } - _tmp304_ = self->priv->handle; - _tmp306_ = scanner_get_option_by_name (self, _tmp304_, "three-pass", &_tmp305_); - index = (SANE_Int) _tmp305_; - option = _tmp306_; - _tmp307_ = option; - if (_tmp307_ != NULL) { - SANE_Handle _tmp308_; - SANE_Option_Descriptor* _tmp309_; - SANE_Int _tmp310_; - _tmp308_ = self->priv->handle; - _tmp309_ = option; - _tmp310_ = index; - scanner_set_bool_option (self, _tmp308_, _tmp309_, _tmp310_, FALSE, NULL); + } +#line 1107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp322_ = self->priv->handle; +#line 1107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp323_ = SANE_NAME_CONTRAST; +#line 1107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp325_ = scanner_get_option_by_name (self, _tmp322_, _tmp323_, &_tmp324_); +#line 1107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp324_; +#line 1107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp325_; +#line 1108 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp326_ = option; +#line 1108 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp326_ != NULL) { +#line 10223 "scanner.c" + ScanJob* _tmp327_; + gint _tmp328_; +#line 1110 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp327_ = job; +#line 1110 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp328_ = _tmp327_->contrast; +#line 1110 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp328_ != 0) { +#line 10232 "scanner.c" + SANE_Option_Descriptor* _tmp329_; + ScanJob* _tmp330_; + gint _tmp331_; + gint _tmp332_ = 0; + gint contrast; + SANE_Handle _tmp333_; + SANE_Option_Descriptor* _tmp334_; + SANE_Int _tmp335_; + gint _tmp336_; +#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp329_ = option; +#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp330_ = job; +#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp331_ = _tmp330_->contrast; +#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp332_ = scanner_scale_int (self, -100, 100, _tmp329_, _tmp331_); +#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + contrast = _tmp332_; +#line 1113 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp333_ = self->priv->handle; +#line 1113 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp334_ = option; +#line 1113 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp335_ = index; +#line 1113 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp336_ = contrast; +#line 1113 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp333_, _tmp334_, _tmp335_, _tmp336_, NULL); +#line 10262 "scanner.c" + } + } +#line 1118 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp337_ = self->priv->current_device; +#line 1118 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (g_strcmp0 (_tmp337_, "test") == 0) { +#line 10269 "scanner.c" + SANE_Handle _tmp338_; + gint _tmp339_ = 0; + SANE_Option_Descriptor* _tmp340_ = NULL; + SANE_Option_Descriptor* _tmp341_; + SANE_Handle _tmp345_; + gint _tmp346_ = 0; + SANE_Option_Descriptor* _tmp347_ = NULL; + SANE_Option_Descriptor* _tmp348_; + SANE_Handle _tmp352_; + gint _tmp353_ = 0; + SANE_Option_Descriptor* _tmp354_ = NULL; + SANE_Option_Descriptor* _tmp355_; + SANE_Handle _tmp359_; + gint _tmp360_ = 0; + SANE_Option_Descriptor* _tmp361_ = NULL; + SANE_Option_Descriptor* _tmp362_; + SANE_Handle _tmp366_; + gint _tmp367_ = 0; + SANE_Option_Descriptor* _tmp368_ = NULL; + SANE_Option_Descriptor* _tmp369_; +#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp338_ = self->priv->handle; +#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp340_ = scanner_get_option_by_name (self, _tmp338_, "hand-scanner", &_tmp339_); +#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp339_; +#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp340_; +#line 1121 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp341_ = option; +#line 1121 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp341_ != NULL) { +#line 10302 "scanner.c" + SANE_Handle _tmp342_; + SANE_Option_Descriptor* _tmp343_; + SANE_Int _tmp344_; +#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp342_ = self->priv->handle; +#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp343_ = option; +#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp344_ = index; +#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_bool_option (self, _tmp342_, _tmp343_, _tmp344_, FALSE, NULL); +#line 10314 "scanner.c" } - _tmp311_ = self->priv->handle; - _tmp313_ = scanner_get_option_by_name (self, _tmp311_, "test-picture", &_tmp312_); - index = (SANE_Int) _tmp312_; - option = _tmp313_; - _tmp314_ = option; - if (_tmp314_ != NULL) { - SANE_Handle _tmp315_; - SANE_Option_Descriptor* _tmp316_; - SANE_Int _tmp317_; - _tmp315_ = self->priv->handle; - _tmp316_ = option; - _tmp317_ = index; - scanner_set_string_option (self, _tmp315_, _tmp316_, _tmp317_, "Color pattern", NULL); +#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp345_ = self->priv->handle; +#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp347_ = scanner_get_option_by_name (self, _tmp345_, "three-pass", &_tmp346_); +#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp346_; +#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp347_; +#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp348_ = option; +#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp348_ != NULL) { +#line 10328 "scanner.c" + SANE_Handle _tmp349_; + SANE_Option_Descriptor* _tmp350_; + SANE_Int _tmp351_; +#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp349_ = self->priv->handle; +#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp350_ = option; +#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp351_ = index; +#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_bool_option (self, _tmp349_, _tmp350_, _tmp351_, FALSE, NULL); +#line 10340 "scanner.c" } - _tmp318_ = self->priv->handle; - _tmp320_ = scanner_get_option_by_name (self, _tmp318_, "read-delay", &_tmp319_); - index = (SANE_Int) _tmp319_; - option = _tmp320_; - _tmp321_ = option; - if (_tmp321_ != NULL) { - SANE_Handle _tmp322_; - SANE_Option_Descriptor* _tmp323_; - SANE_Int _tmp324_; - _tmp322_ = self->priv->handle; - _tmp323_ = option; - _tmp324_ = index; - scanner_set_bool_option (self, _tmp322_, _tmp323_, _tmp324_, TRUE, NULL); +#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp352_ = self->priv->handle; +#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp354_ = scanner_get_option_by_name (self, _tmp352_, "test-picture", &_tmp353_); +#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp353_; +#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp354_; +#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp355_ = option; +#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp355_ != NULL) { +#line 10354 "scanner.c" + SANE_Handle _tmp356_; + SANE_Option_Descriptor* _tmp357_; + SANE_Int _tmp358_; +#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp356_ = self->priv->handle; +#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp357_ = option; +#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp358_ = index; +#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_string_option (self, _tmp356_, _tmp357_, _tmp358_, "Color pattern", NULL); +#line 10366 "scanner.c" } - _tmp325_ = self->priv->handle; - _tmp327_ = scanner_get_option_by_name (self, _tmp325_, "read-delay-duration", &_tmp326_); - index = (SANE_Int) _tmp326_; - option = _tmp327_; - _tmp328_ = option; - if (_tmp328_ != NULL) { - SANE_Handle _tmp329_; - SANE_Option_Descriptor* _tmp330_; - SANE_Int _tmp331_; - _tmp329_ = self->priv->handle; - _tmp330_ = option; - _tmp331_ = index; - scanner_set_int_option (self, _tmp329_, _tmp330_, _tmp331_, 200000, NULL); +#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp359_ = self->priv->handle; +#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp361_ = scanner_get_option_by_name (self, _tmp359_, "read-delay", &_tmp360_); +#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp360_; +#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp361_; +#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp362_ = option; +#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp362_ != NULL) { +#line 10380 "scanner.c" + SANE_Handle _tmp363_; + SANE_Option_Descriptor* _tmp364_; + SANE_Int _tmp365_; +#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp363_ = self->priv->handle; +#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp364_ = option; +#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp365_ = index; +#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_bool_option (self, _tmp363_, _tmp364_, _tmp365_, TRUE, NULL); +#line 10392 "scanner.c" + } +#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp366_ = self->priv->handle; +#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp368_ = scanner_get_option_by_name (self, _tmp366_, "read-delay-duration", &_tmp367_); +#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + index = (SANE_Int) _tmp367_; +#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + option = _tmp368_; +#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp369_ = option; +#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp369_ != NULL) { +#line 10406 "scanner.c" + SANE_Handle _tmp370_; + SANE_Option_Descriptor* _tmp371_; + SANE_Int _tmp372_; +#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp370_ = self->priv->handle; +#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp371_ = option; +#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp372_ = index; +#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_set_int_option (self, _tmp370_, _tmp371_, _tmp372_, 200000, NULL); +#line 10418 "scanner.c" } } +#line 1137 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_START; +#line 1138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; - } - _tmp332_ = index; - _tmp333_ = option; - scanner_log_option (self, _tmp332_, _tmp333_); - _tmp334_ = option; - _tmp335_ = _tmp334_->type; - if (_tmp335_ == SANE_TYPE_GROUP) { +#line 10427 "scanner.c" + } +#line 1141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp373_ = index; +#line 1141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp374_ = option; +#line 1141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + scanner_log_option (self, _tmp373_, _tmp374_); +#line 1144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp375_ = option; +#line 1144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp376_ = _tmp375_->type; +#line 1144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp376_ == SANE_TYPE_GROUP) { +#line 1145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; - } - _tmp336_ = option; - _tmp337_ = _tmp336_->cap; - if ((_tmp337_ & SANE_CAP_INACTIVE) != ((SANE_Int) 0)) { +#line 10445 "scanner.c" + } +#line 1148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp377_ = option; +#line 1148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp378_ = _tmp377_->cap; +#line 1148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if ((_tmp378_ & SANE_CAP_INACTIVE) != ((SANE_Int) 0)) { +#line 1149 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1149 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; - } - _tmp338_ = option; - _tmp339_ = _tmp338_->name; - if (_tmp339_ == NULL) { +#line 10457 "scanner.c" + } +#line 1152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp379_ = option; +#line 1152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp380_ = _tmp379_->name; +#line 1152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + if (_tmp380_ == NULL) { +#line 1153 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1153 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; - } - _tmp340_ = self->priv->options; - _tmp341_ = option; - _tmp342_ = _tmp341_->name; - _tmp343_ = g_strdup (_tmp342_); - _tmp344_ = index; - g_hash_table_insert (_tmp340_, _tmp343_, (gpointer) ((gintptr) ((gint) _tmp344_))); +#line 10469 "scanner.c" + } +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp381_ = self->priv->options; +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp382_ = option; +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp383_ = _tmp382_->name; +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp384_ = g_strdup (_tmp383_); +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp385_ = index; +#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_hash_table_insert (_tmp381_, _tmp384_, (gpointer) ((gintptr) ((gint) _tmp385_))); +#line 853 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 10485 "scanner.c" } @@ -6782,28 +10502,51 @@ static SANE_Option_Descriptor* scanner_get_option_by_name (Scanner* self, SANE_H SANE_Handle _tmp4_; gint _tmp5_; SANE_Option_Descriptor* _tmp6_ = NULL; +#line 1158 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, NULL); +#line 1158 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (name != NULL, NULL); +#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->options; +#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = name; +#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_); +#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _vala_index = (gint) ((gintptr) _tmp2_); +#line 1161 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _vala_index; +#line 1161 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp3_ == 0) { +#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = NULL; +#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (index) { +#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *index = _vala_index; +#line 10521 "scanner.c" } +#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 10525 "scanner.c" } +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = handle; +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _vala_index; +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = sane_get_option_descriptor (_tmp4_, (SANE_Int) _tmp5_); +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp6_; +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (index) { +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *index = _vala_index; +#line 10539 "scanner.c" } +#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 10543 "scanner.c" } @@ -6813,23 +10556,41 @@ static void scanner_do_complete_document (Scanner* self) { GList* _tmp2_; NotifyDocumentDone* _tmp3_; NotifyDocumentDone* _tmp4_; +#line 1167 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1169 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->handle; +#line 1169 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sane_cancel (_tmp0_); - g_debug ("scanner.vala:1117: sane_cancel ()"); +#line 1170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1170: sane_cancel ()"); +#line 1172 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->job_queue; +#line 1172 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->job_queue = g_list_remove_link (self->priv->job_queue, _tmp1_); +#line 1174 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_IDLE; +#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->job_queue; +#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp2_ != NULL) { +#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_OPEN; +#line 1180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 10575 "scanner.c" } +#line 1186 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = notify_document_done_new (); +#line 1186 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_; +#line 1186 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp4_); +#line 1186 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp4_); +#line 1187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_set_scanning (self, FALSE); +#line 10587 "scanner.c" } @@ -6845,40 +10606,70 @@ static void scanner_do_start (Scanner* self) { gchar* _tmp7_ = NULL; gchar* _tmp8_; SANE_Status _tmp9_; +#line 1190 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1194 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = notify_expect_page_new (); +#line 1194 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_; +#line 1194 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp1_); +#line 1194 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp1_); +#line 1196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->handle; +#line 1196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = sane_start (_tmp2_); +#line 1196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp3_; +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->page_number; +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = self->priv->pass_number; +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = status; +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = sane_status_to_string (_tmp6_); +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp7_; - g_debug ("scanner.vala:1144: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_); +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1197: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_); +#line 1197 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp8_); +#line 1198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = status; +#line 1198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp9_ == SANE_STATUS_GOOD) { +#line 1199 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_GET_PARAMETERS; +#line 10639 "scanner.c" } else { SANE_Status _tmp10_; +#line 1200 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = status; +#line 1200 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp10_ == SANE_STATUS_NO_DOCS) { +#line 1201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_complete_document (self); +#line 10648 "scanner.c" } else { SANE_Status _tmp11_; const gchar* _tmp12_ = NULL; SANE_Status _tmp13_; const gchar* _tmp14_ = NULL; +#line 1204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = status; +#line 1204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = sane_strstatus (_tmp11_); - g_warning ("scanner.vala:1151: Unable to start device: %s", _tmp12_); +#line 1204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1204: Unable to start device: %s", _tmp12_); +#line 1205 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = status; +#line 1205 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _ ("Unable to start scan"); +#line 1205 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, (gint) _tmp13_, _tmp14_); +#line 10666 "scanner.c" } } } @@ -6887,51 +10678,88 @@ static void scanner_do_start (Scanner* self) { static gchar* sane_frame_to_string (SANE_Frame frame) { gchar* result = NULL; SANE_Frame _tmp0_; +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp0_ = frame; +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" switch (_tmp0_) { +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_FRAME_GRAY: +#line 10681 "scanner.c" { gchar* _tmp1_; +#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp1_ = g_strdup ("SANE_FRAME_GRAY"); +#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp1_; +#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10690 "scanner.c" } +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_FRAME_RGB: +#line 10694 "scanner.c" { gchar* _tmp2_; +#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp2_ = g_strdup ("SANE_FRAME_RGB"); +#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp2_; +#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10703 "scanner.c" } +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_FRAME_RED: +#line 10707 "scanner.c" { gchar* _tmp3_; +#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp3_ = g_strdup ("SANE_FRAME_RED"); +#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp3_; +#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10716 "scanner.c" } +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_FRAME_GREEN: +#line 10720 "scanner.c" { gchar* _tmp4_; +#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp4_ = g_strdup ("SANE_FRAME_GREEN"); +#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp4_; +#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10729 "scanner.c" } +#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" case SANE_FRAME_BLUE: +#line 10733 "scanner.c" { gchar* _tmp5_; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp5_ = g_strdup ("SANE_FRAME_BLUE"); +#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp5_; +#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10742 "scanner.c" } default: { SANE_Frame _tmp6_; gchar* _tmp7_ = NULL; +#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp6_ = frame; +#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" _tmp7_ = g_strdup_printf ("SANE_FRAME(%d)", (gint) _tmp6_); +#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" result = _tmp7_; +#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi" return result; +#line 10756 "scanner.c" } } } @@ -7003,165 +10831,311 @@ static void scanner_do_get_parameters (Scanner* self) { gint buffer_size; gint _tmp78_; guchar* _tmp79_ = NULL; +#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->handle; +#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = sane_get_parameters (_tmp0_, &_tmp1_); +#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->parameters = _tmp1_; +#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp2_; +#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = status; +#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = sane_status_to_string (_tmp3_); +#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp4_; - g_debug ("scanner.vala:1161: sane_get_parameters () -> %s", _tmp5_); +#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1214: sane_get_parameters () -> %s", _tmp5_); +#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp5_); +#line 1215 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = status; +#line 1215 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp6_ != SANE_STATUS_GOOD) { +#line 10852 "scanner.c" SANE_Status _tmp7_; const gchar* _tmp8_ = NULL; SANE_Status _tmp9_; const gchar* _tmp10_ = NULL; +#line 1217 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = status; +#line 1217 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = sane_strstatus (_tmp7_); - g_warning ("scanner.vala:1164: Unable to get device parameters: %s", _tmp8_); +#line 1217 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1217: Unable to get device parameters: %s", _tmp8_); +#line 1218 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = status; +#line 1218 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = _ ("Error communicating with scanner"); +#line 1218 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, (gint) _tmp9_, _tmp10_); +#line 1221 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 10871 "scanner.c" } +#line 1224 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = self->priv->job_queue; +#line 1224 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = _tmp11_->data; +#line 1224 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp12_, TYPE_SCAN_JOB, ScanJob)); +#line 1224 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" job = _tmp13_; +#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = self->priv->parameters; +#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp15_.last_frame; +#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp16_) { +#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = "SANE_TRUE"; +#line 10889 "scanner.c" } else { +#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = "SANE_FALSE"; +#line 10893 "scanner.c" } +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = self->priv->parameters; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = _tmp17_.format; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = sane_frame_to_string (_tmp18_); +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = _tmp19_; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = _tmp14_; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = self->priv->parameters; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = _tmp22_.bytes_per_line; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = self->priv->parameters; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = _tmp24_.pixels_per_line; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = self->priv->parameters; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp26_.lines; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = self->priv->parameters; +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = _tmp28_.depth; - g_debug ("scanner.vala:1173: Parameters: format=%s last_frame=%s bytes_per_line=" \ +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1226: Parameters: format=%s last_frame=%s bytes_per_line=" \ "%d pixels_per_line=%d lines=%d depth=%d", _tmp20_, _tmp21_, _tmp23_, _tmp25_, _tmp27_, _tmp29_); +#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp20_); +#line 1234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = scan_page_info_new (); +#line 1234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" info = _tmp30_; +#line 1235 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = info; +#line 1235 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = self->priv->parameters; +#line 1235 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = _tmp32_.pixels_per_line; +#line 1235 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_->width = _tmp33_; +#line 1236 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = info; +#line 1236 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = self->priv->parameters; +#line 1236 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = _tmp35_.lines; +#line 1236 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_->height = _tmp36_; +#line 1237 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = info; +#line 1237 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = self->priv->parameters; +#line 1237 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = _tmp38_.depth; +#line 1237 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_->depth = _tmp39_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = self->priv->parameters; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = _tmp43_.depth; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp44_ == 8) { +#line 10959 "scanner.c" SANE_Parameters _tmp45_; SANE_Frame _tmp46_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = self->priv->parameters; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = _tmp45_.format; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = _tmp46_ == SANE_FRAME_GRAY; +#line 10968 "scanner.c" } else { +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = FALSE; +#line 10972 "scanner.c" } +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = _tmp42_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp47_) { +#line 10978 "scanner.c" ScanJob* _tmp48_; gint _tmp49_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = job; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = _tmp48_->depth; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = _tmp49_ == 2; +#line 10987 "scanner.c" } else { +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = FALSE; +#line 10991 "scanner.c" } +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = _tmp41_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp50_) { +#line 10997 "scanner.c" ScanJob* _tmp51_; ScanMode _tmp52_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = job; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = _tmp51_->scan_mode; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = _tmp52_ == SCAN_MODE_GRAY; +#line 11006 "scanner.c" } else { +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = FALSE; +#line 11010 "scanner.c" } +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = _tmp40_; +#line 1240 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp53_) { +#line 11016 "scanner.c" ScanPageInfo* _tmp54_; ScanJob* _tmp55_; gint _tmp56_; +#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_ = info; +#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp55_ = job; +#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_ = _tmp55_->depth; +#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_->depth = _tmp56_; +#line 11028 "scanner.c" } +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp58_ = self->priv->parameters; +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_ = _tmp58_.format; +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp59_ == SANE_FRAME_GRAY) { +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = 1; +#line 11038 "scanner.c" } else { +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = 3; +#line 11042 "scanner.c" } +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60_ = info; +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp61_ = _tmp57_; +#line 1242 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60_->n_channels = _tmp61_; +#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp62_ = info; +#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp63_ = job; +#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp64_ = _tmp63_->dpi; +#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp62_->dpi = _tmp64_; +#line 1244 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp65_ = info; +#line 1244 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp66_ = self->priv->current_device; +#line 1244 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp67_ = g_strdup (_tmp66_); +#line 1244 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp65_->device); +#line 1244 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp65_->device = _tmp67_; +#line 1246 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp68_ = self->priv->page_number; +#line 1246 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp69_ = self->priv->notified_page; +#line 1246 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp68_ != _tmp69_) { +#line 11074 "scanner.c" ScanJob* _tmp70_; gint _tmp71_; ScanPageInfo* _tmp72_; NotifyGotPageInfo* _tmp73_; NotifyGotPageInfo* _tmp74_; gint _tmp75_; +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp70_ = job; +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp71_ = _tmp70_->id; +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp72_ = info; +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp73_ = notify_got_page_info_new (_tmp71_, _tmp72_); +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp74_ = _tmp73_; +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp74_); +#line 1248 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp74_); +#line 1249 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp75_ = self->priv->page_number; +#line 1249 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->notified_page = _tmp75_; +#line 11099 "scanner.c" } +#line 1253 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp76_ = self->priv->parameters; +#line 1253 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp77_ = _tmp76_.bytes_per_line; +#line 1253 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" buffer_size = _tmp77_ + 1; +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp78_ = buffer_size; +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp79_ = g_new0 (guchar, _tmp78_); +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = (g_free (self->priv->buffer), NULL); +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = _tmp79_; +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer_length1 = _tmp78_; +#line 1254 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->_buffer_size_ = self->priv->buffer_length1; +#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->n_used = 0; +#line 1256 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->line_count = 0; +#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->pass_number = 0; +#line 1258 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_READ; +#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_page_info_unref0 (info); +#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 11131 "scanner.c" } @@ -7178,50 +11152,91 @@ static void scanner_do_complete_page (Scanner* self) { gboolean _tmp8_; ScanJob* _tmp10_; ScanType _tmp11_; +#line 1261 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->job_queue; +#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->data; +#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob)); +#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" job = _tmp2_; +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = job; +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_->id; +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = notify_page_done_new (_tmp4_); +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = _tmp5_; +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp6_); +#line 1265 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp6_); +#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = self->priv->parameters; +#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = _tmp7_.last_frame; +#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp8_) { +#line 11176 "scanner.c" gint _tmp9_; +#line 1270 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = self->priv->pass_number; +#line 1270 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->pass_number = _tmp9_ + 1; +#line 1271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_START; +#line 1272 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1272 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 11188 "scanner.c" } +#line 1276 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = job; +#line 1276 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->type; +#line 1276 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp11_ != SCAN_TYPE_SINGLE) { +#line 11196 "scanner.c" gint _tmp12_; ScanJob* _tmp13_; gint _tmp14_; NotifyPageDone* _tmp15_; NotifyPageDone* _tmp16_; +#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = self->priv->page_number; +#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->page_number = _tmp12_ + 1; +#line 1279 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->pass_number = 0; +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = job; +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = _tmp13_->id; +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = notify_page_done_new (_tmp14_); +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = _tmp15_; +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp16_); +#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp16_); +#line 1281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_START; +#line 1282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 11226 "scanner.c" } +#line 1285 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_complete_document (self); +#line 1261 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 11232 "scanner.c" } @@ -7261,111 +11276,204 @@ static void scanner_do_read (Scanner* self) { gint _tmp42_; SANE_Parameters _tmp43_; gint _tmp44_; +#line 1288 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1290 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->job_queue; +#line 1290 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_->data; +#line 1290 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob)); +#line 1290 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" job = _tmp2_; +#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = self->priv->buffer; +#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3__length1 = self->priv->buffer_length1; +#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = self->priv->n_used; +#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" n_to_read = _tmp3__length1 - _tmp4_; +#line 1296 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = self->priv->buffer; +#line 1296 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5__length1 = self->priv->buffer_length1; +#line 1296 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" b = (guchar*) _tmp5_; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = self->priv->handle; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = b; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = self->priv->n_used; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = n_to_read; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = sane_read (_tmp6_, (guint8*) (_tmp7_ + _tmp8_), (SANE_Int) _tmp9_, &_tmp10_); +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" n_read = _tmp10_; +#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp11_; +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = n_to_read; +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = status; +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = sane_status_to_string (_tmp13_); +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = _tmp14_; +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = n_read; - g_debug ("scanner.vala:1245: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_); +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1298: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_); +#line 1298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp15_); +#line 1301 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = status; +#line 1301 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp17_ == SANE_STATUS_EOF) { +#line 11328 "scanner.c" gboolean _tmp18_ = FALSE; SANE_Parameters _tmp19_; gint _tmp20_; gboolean _tmp24_; gint _tmp28_; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = self->priv->parameters; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp20_ = _tmp19_.lines; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp20_ > 0) { +#line 11340 "scanner.c" gint _tmp21_; SANE_Parameters _tmp22_; gint _tmp23_; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp21_ = self->priv->line_count; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp22_ = self->priv->parameters; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp23_ = _tmp22_.lines; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = _tmp21_ != _tmp23_; +#line 11352 "scanner.c" } else { +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = FALSE; +#line 11356 "scanner.c" } +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp24_ = _tmp18_; +#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp24_) { +#line 11362 "scanner.c" gint _tmp25_; SANE_Parameters _tmp26_; gint _tmp27_; +#line 1304 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp25_ = self->priv->line_count; +#line 1304 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp26_ = self->priv->parameters; +#line 1304 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp27_ = _tmp26_.lines; - g_warning ("scanner.vala:1251: Scan completed with %d lines, expected %d lines", _tmp25_, _tmp27_); +#line 1304 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1304: Scan completed with %d lines, expected %d lines", _tmp25_, _tmp27_); +#line 11374 "scanner.c" } +#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp28_ = self->priv->n_used; +#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp28_ > 0) { +#line 11380 "scanner.c" gint _tmp29_; +#line 1306 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp29_ = self->priv->n_used; - g_warning ("scanner.vala:1253: Scan complete with %d bytes of unused data", _tmp29_); +#line 1306 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1306: Scan complete with %d bytes of unused data", _tmp29_); +#line 11386 "scanner.c" } +#line 1307 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_complete_page (self); +#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 11394 "scanner.c" } +#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp30_ = status; +#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp30_ != SANE_STATUS_GOOD) { +#line 11400 "scanner.c" SANE_Status _tmp31_; const gchar* _tmp32_ = NULL; SANE_Status _tmp33_; const gchar* _tmp34_ = NULL; +#line 1314 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp31_ = status; +#line 1314 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp32_ = sane_strstatus (_tmp31_); - g_warning ("scanner.vala:1261: Unable to read frame from device: %s", _tmp32_); +#line 1314 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1314: Unable to read frame from device: %s", _tmp32_); +#line 1315 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp33_ = status; +#line 1315 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp34_ = _ ("Error communicating with scanner"); +#line 1315 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_fail_scan (self, (gint) _tmp33_, _tmp34_); +#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 11421 "scanner.c" } +#line 1321 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" full_read = FALSE; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp36_ = self->priv->n_used; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp36_ == 0) { +#line 11429 "scanner.c" SANE_Int _tmp37_; guchar* _tmp38_; gint _tmp38__length1; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp37_ = n_read; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38_ = self->priv->buffer; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp38__length1 = self->priv->buffer_length1; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = _tmp37_ == ((SANE_Int) _tmp38__length1); +#line 11441 "scanner.c" } else { +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp35_ = FALSE; +#line 11445 "scanner.c" } +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp39_ = _tmp35_; +#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp39_) { +#line 1323 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" full_read = TRUE; +#line 11453 "scanner.c" } +#line 1324 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp40_ = self->priv->n_used; +#line 1324 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp41_ = n_read; +#line 1324 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->n_used = _tmp40_ + ((gint) _tmp41_); +#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp42_ = self->priv->n_used; +#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp43_ = self->priv->parameters; +#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp44_ = _tmp43_.bytes_per_line; +#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp42_ >= _tmp44_) { +#line 11469 "scanner.c" ScanLine* _tmp45_; ScanLine* line; SANE_Parameters _tmp46_; @@ -7416,113 +11524,211 @@ static void scanner_do_read (Scanner* self) { ScanLine* _tmp162_; NotifyGotLine* _tmp163_; NotifyGotLine* _tmp164_; +#line 1329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp45_ = scan_line_new (); +#line 1329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" line = _tmp45_; +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp46_ = self->priv->parameters; +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp47_ = _tmp46_.format; +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp47_) { +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_FRAME_GRAY: +#line 11532 "scanner.c" { ScanLine* _tmp48_; +#line 1333 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_ = line; +#line 1333 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp48_->channel = 0; +#line 1334 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11541 "scanner.c" } +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_FRAME_RGB: +#line 11545 "scanner.c" { ScanLine* _tmp49_; +#line 1336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_ = line; +#line 1336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp49_->channel = -1; +#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11554 "scanner.c" } +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_FRAME_RED: +#line 11558 "scanner.c" { ScanLine* _tmp50_; +#line 1339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_ = line; +#line 1339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp50_->channel = 0; +#line 1340 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11567 "scanner.c" } +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_FRAME_GREEN: +#line 11571 "scanner.c" { ScanLine* _tmp51_; +#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_ = line; +#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp51_->channel = 1; +#line 1343 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11580 "scanner.c" } +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SANE_FRAME_BLUE: +#line 11584 "scanner.c" { ScanLine* _tmp52_; +#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_ = line; +#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp52_->channel = 2; +#line 1346 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11593 "scanner.c" } default: +#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11598 "scanner.c" } +#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_ = line; +#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp54_ = self->priv->parameters; +#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp55_ = _tmp54_.pixels_per_line; +#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp53_->width = _tmp55_; +#line 1349 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_ = line; +#line 1349 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp57_ = self->priv->parameters; +#line 1349 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp58_ = _tmp57_.depth; +#line 1349 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp56_->depth = _tmp58_; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_ = line; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60_ = self->priv->buffer; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp60__length1 = self->priv->buffer_length1; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = NULL; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_->data = (g_free (_tmp59_->data), NULL); +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_->data = _tmp60_; +#line 1350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp59_->data_length1 = _tmp60__length1; +#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp61_ = line; +#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp62_ = self->priv->parameters; +#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp63_ = _tmp62_.bytes_per_line; +#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp61_->data_length = _tmp63_; +#line 1352 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp64_ = line; +#line 1352 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp65_ = self->priv->line_count; +#line 1352 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp64_->number = _tmp65_; +#line 1353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp66_ = line; +#line 1353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp67_ = self->priv->n_used; +#line 1353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp68_ = line; +#line 1353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp69_ = _tmp68_->data_length; +#line 1353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp66_->n_lines = _tmp67_ / _tmp69_; +#line 1355 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp70_ = self->priv->line_count; +#line 1355 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp71_ = line; +#line 1355 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp72_ = _tmp71_->n_lines; +#line 1355 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->line_count = _tmp70_ + _tmp72_; +#line 1358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp73_ = self->priv->buffer; +#line 1358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp73__length1 = self->priv->buffer_length1; +#line 1358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" buffer_size = _tmp73__length1; +#line 1359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp74_ = full_read; +#line 1359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp74_) { +#line 11672 "scanner.c" gint _tmp75_; SANE_Parameters _tmp76_; gint _tmp77_; +#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp75_ = buffer_size; +#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp76_ = self->priv->parameters; +#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp77_ = _tmp76_.bytes_per_line; +#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" buffer_size = _tmp75_ + _tmp77_; +#line 11684 "scanner.c" } +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp78_ = buffer_size; +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp79_ = g_new0 (guchar, _tmp78_); +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = (g_free (self->priv->buffer), NULL); +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = _tmp79_; +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer_length1 = _tmp78_; +#line 1362 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->_buffer_size_ = self->priv->buffer_length1; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp80_ = self->priv->n_used; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp81_ = line; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp82_ = _tmp81_->n_lines; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp83_ = line; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp84_ = _tmp83_->data_length; +#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" n_remaining = _tmp80_ - (_tmp82_ * _tmp84_); +#line 1364 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->n_used = 0; +#line 11712 "scanner.c" { gint i; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 11717 "scanner.c" { gboolean _tmp85_; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp85_ = TRUE; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 11724 "scanner.c" gboolean _tmp86_; gint _tmp88_; gint _tmp89_; @@ -7540,86 +11746,155 @@ static void scanner_do_read (Scanner* self) { guchar _tmp99_; guchar _tmp100_; gint _tmp101_; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp86_ = _tmp85_; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp86_) { +#line 11746 "scanner.c" gint _tmp87_; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp87_ = i; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp87_ + 1; +#line 11752 "scanner.c" } +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp85_ = FALSE; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp88_ = i; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp89_ = n_remaining; +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp88_ < _tmp89_)) { +#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11764 "scanner.c" } +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp90_ = self->priv->buffer; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp90__length1 = self->priv->buffer_length1; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp91_ = i; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp92_ = line; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp93_ = _tmp92_->data; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp93__length1 = _tmp92_->data_length1; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp94_ = i; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp95_ = line; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp96_ = _tmp95_->n_lines; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp97_ = line; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp98_ = _tmp97_->data_length; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp99_ = _tmp93_[_tmp94_ + (_tmp96_ * _tmp98_)]; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp90_[_tmp91_] = _tmp99_; +#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp100_ = _tmp90_[_tmp91_]; +#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp101_ = self->priv->n_used; +#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->n_used = _tmp101_ + 1; +#line 11798 "scanner.c" } } } +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp105_ = self->priv->parameters; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp106_ = _tmp105_.depth; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp106_ == 8) { +#line 11808 "scanner.c" SANE_Parameters _tmp107_; SANE_Frame _tmp108_; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp107_ = self->priv->parameters; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp108_ = _tmp107_.format; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp104_ = _tmp108_ == SANE_FRAME_GRAY; +#line 11817 "scanner.c" } else { +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp104_ = FALSE; +#line 11821 "scanner.c" } +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp109_ = _tmp104_; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp109_) { +#line 11827 "scanner.c" ScanJob* _tmp110_; gint _tmp111_; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp110_ = job; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp111_ = _tmp110_->depth; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp103_ = _tmp111_ == 2; +#line 11836 "scanner.c" } else { +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp103_ = FALSE; +#line 11840 "scanner.c" } +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp112_ = _tmp103_; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp112_) { +#line 11846 "scanner.c" ScanJob* _tmp113_; ScanMode _tmp114_; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp113_ = job; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp114_ = _tmp113_->scan_mode; +#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp102_ = _tmp114_ == SCAN_MODE_GRAY; +#line 11855 "scanner.c" } else { +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp102_ = FALSE; +#line 11859 "scanner.c" } +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp115_ = _tmp102_; +#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp115_) { +#line 11865 "scanner.c" guchar block; gint write_offset; gint block_shift; ScanLine* _tmp157_; ScanLine* _tmp158_; gint _tmp159_; +#line 1376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block = (guchar) 0; +#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" write_offset = 0; +#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block_shift = 6; +#line 11878 "scanner.c" { gint i; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = 0; +#line 11883 "scanner.c" { gboolean _tmp116_; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp116_ = TRUE; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 11890 "scanner.c" gboolean _tmp117_; gint _tmp119_; ScanLine* _tmp120_; @@ -7629,30 +11904,53 @@ static void scanner_do_read (Scanner* self) { gint _tmp124_; gint offset; gint _tmp150_; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp117_ = _tmp116_; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp117_) { +#line 11904 "scanner.c" gint _tmp118_; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp118_ = i; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" i = _tmp118_ + 1; +#line 11910 "scanner.c" } +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp116_ = FALSE; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp119_ = i; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp120_ = line; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp121_ = _tmp120_->n_lines; +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp119_ < _tmp121_)) { +#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11924 "scanner.c" } +#line 1381 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp122_ = i; +#line 1381 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp123_ = line; +#line 1381 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp124_ = _tmp123_->data_length; +#line 1381 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" offset = _tmp122_ * _tmp124_; +#line 11934 "scanner.c" { gint x; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" x = 0; +#line 11939 "scanner.c" { gboolean _tmp125_; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp125_ = TRUE; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 11946 "scanner.c" gboolean _tmp126_; gint _tmp128_; ScanLine* _tmp129_; @@ -7670,50 +11968,91 @@ static void scanner_do_read (Scanner* self) { guchar _tmp140_; gint _tmp141_; gint _tmp142_; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp126_ = _tmp125_; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp126_) { +#line 11968 "scanner.c" gint _tmp127_; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp127_ = x; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" x = _tmp127_ + 1; +#line 11974 "scanner.c" } +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp125_ = FALSE; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp128_ = x; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp129_ = line; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp130_ = _tmp129_->width; +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!(_tmp128_ < _tmp130_)) { +#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 11988 "scanner.c" } +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp131_ = line; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp132_ = _tmp131_->data; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp132__length1 = _tmp131_->data_length1; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp133_ = offset; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp134_ = x; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp135_ = _tmp132_[_tmp133_ + _tmp134_]; +#line 1384 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" p = _tmp135_; +#line 1387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp136_ = p; +#line 1387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (((gint) _tmp136_) >= 192) { +#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sample = (guchar) 3; +#line 12010 "scanner.c" } else { guchar _tmp137_; +#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp137_ = p; +#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (((gint) _tmp137_) >= 128) { +#line 1390 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sample = (guchar) 2; +#line 12019 "scanner.c" } else { guchar _tmp138_; +#line 1391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp138_ = p; +#line 1391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (((gint) _tmp138_) >= 64) { +#line 1392 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sample = (guchar) 1; +#line 12028 "scanner.c" } else { +#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sample = (guchar) 0; +#line 12032 "scanner.c" } } } +#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp139_ = block; +#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp140_ = sample; +#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp141_ = block_shift; +#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block = _tmp139_ | (_tmp140_ << _tmp141_); +#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp142_ = block_shift; +#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp142_ == 0) { +#line 12048 "scanner.c" ScanLine* _tmp143_; guchar* _tmp144_; gint _tmp144__length1; @@ -7721,27 +12060,45 @@ static void scanner_do_read (Scanner* self) { guchar _tmp146_; guchar _tmp147_; gint _tmp148_; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp143_ = line; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp144_ = _tmp143_->data; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp144__length1 = _tmp143_->data_length1; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp145_ = write_offset; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp146_ = block; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp144_[_tmp145_] = _tmp146_; +#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp147_ = _tmp144_[_tmp145_]; +#line 1400 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp148_ = write_offset; +#line 1400 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" write_offset = _tmp148_ + 1; +#line 1401 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block = (guchar) 0; +#line 1402 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block_shift = 6; +#line 12078 "scanner.c" } else { gint _tmp149_; +#line 1405 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp149_ = block_shift; +#line 1405 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block_shift = _tmp149_ - 2; +#line 12085 "scanner.c" } } } } +#line 1409 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp150_ = block_shift; +#line 1409 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp150_ != 6) { +#line 12094 "scanner.c" ScanLine* _tmp151_; guchar* _tmp152_; gint _tmp152__length1; @@ -7749,41 +12106,71 @@ static void scanner_do_read (Scanner* self) { guchar _tmp154_; guchar _tmp155_; gint _tmp156_; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp151_ = line; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp152_ = _tmp151_->data; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp152__length1 = _tmp151_->data_length1; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp153_ = write_offset; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp154_ = block; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp152_[_tmp153_] = _tmp154_; +#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp155_ = _tmp152_[_tmp153_]; +#line 1412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp156_ = write_offset; +#line 1412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" write_offset = _tmp156_ + 1; +#line 1413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block = (guchar) 0; +#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" block_shift = 6; +#line 12124 "scanner.c" } } } } +#line 1418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp157_ = line; +#line 1418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp158_ = line; +#line 1418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp159_ = _tmp158_->width; +#line 1418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp157_->data_length = ((_tmp159_ * 2) + 7) / 8; +#line 12137 "scanner.c" } +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp160_ = job; +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp161_ = _tmp160_->id; +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp162_ = line; +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp163_ = notify_got_line_new (_tmp161_, _tmp162_); +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp164_ = _tmp163_; +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_notify (self, (Notify*) _tmp164_); +#line 1421 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _notify_unref0 (_tmp164_); +#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_line_unref0 (line); +#line 12155 "scanner.c" } +#line 1288 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (job); +#line 12159 "scanner.c" } static void _scanner_authorization_cb_sane_authcallback (const gchar* resource, gchar* username, gchar* password) { +#line 1430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_authorization_cb (resource, username, -1, password, -1); +#line 12166 "scanner.c" } @@ -7803,131 +12190,235 @@ static void* scanner_scan_thread (Scanner* self) { gint _tmp11_ = 0; SANE_Int _tmp12_; gint _tmp13_ = 0; +#line 1425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, NULL); +#line 1427 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_IDLE; +#line 1430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = sane_init (&_tmp0_, _scanner_authorization_cb_sane_authcallback); +#line 1430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" version_code = _tmp0_; +#line 1430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" status = _tmp1_; +#line 1431 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = status; +#line 1431 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = sane_status_to_string (_tmp2_); +#line 1431 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = _tmp3_; - g_debug ("scanner.vala:1378: sane_init () -> %s", _tmp4_); +#line 1431 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1431: sane_init () -> %s", _tmp4_); +#line 1431 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp4_); +#line 1432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = status; +#line 1432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp5_ != SANE_STATUS_GOOD) { +#line 12210 "scanner.c" SANE_Status _tmp6_; const gchar* _tmp7_ = NULL; +#line 1434 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = status; +#line 1434 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = sane_strstatus (_tmp6_); - g_warning ("scanner.vala:1381: Unable to initialize SANE backend: %s", _tmp7_); +#line 1434 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_warning ("scanner.vala:1434: Unable to initialize SANE backend: %s", _tmp7_); +#line 1435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = NULL; +#line 1435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12223 "scanner.c" } +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = version_code; +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = SANE_VERSION_MAJOR (_tmp8_); +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = version_code; +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = SANE_VERSION_MINOR (_tmp10_); +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = version_code; +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = SANE_VERSION_BUILD (_tmp12_); - g_debug ("scanner.vala:1384: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_); +#line 1437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1437: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_); +#line 1443 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_redetect (self); +#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" while (TRUE) { +#line 12243 "scanner.c" gboolean _tmp14_ = FALSE; ScanState _tmp15_; +#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = scanner_handle_requests (self); +#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!_tmp14_) { +#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12252 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = self->priv->state; +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp15_) { +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_IDLE: +#line 12260 "scanner.c" { GList* _tmp16_; +#line 1450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = self->priv->job_queue; +#line 1450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp16_ != NULL) { +#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_set_scanning (self, TRUE); +#line 1453 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->state = SCAN_STATE_OPEN; +#line 12271 "scanner.c" } +#line 1455 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12275 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_REDETECT: +#line 12279 "scanner.c" { +#line 1457 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_redetect (self); +#line 1458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12285 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_OPEN: +#line 12289 "scanner.c" { +#line 1460 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_open (self); +#line 1461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12295 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_GET_OPTION: +#line 12299 "scanner.c" { +#line 1463 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_get_option (self); +#line 1464 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12305 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_START: +#line 12309 "scanner.c" { +#line 1466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_start (self); +#line 1467 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12315 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_GET_PARAMETERS: +#line 12319 "scanner.c" { +#line 1469 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_get_parameters (self); +#line 1470 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12325 "scanner.c" } +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_STATE_READ: +#line 12329 "scanner.c" { +#line 1472 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_do_read (self); +#line 1473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12335 "scanner.c" } default: +#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" break; +#line 12340 "scanner.c" } } +#line 1477 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = NULL; +#line 1477 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12347 "scanner.c" } static gpointer _scanner_scan_thread_gthread_func (gpointer self) { gpointer result; result = scanner_scan_thread (self); +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_unref (self); +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12358 "scanner.c" } void scanner_start (Scanner* self) { GError * _inner_error_ = NULL; +#line 1480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 12366 "scanner.c" { - GThread* _tmp0_ = NULL; + GThread* _tmp0_; GThread* _tmp1_; - _tmp0_ = g_thread_create (_scanner_scan_thread_gthread_func, scanner_ref (self), TRUE, &_inner_error_); +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp0_ = g_thread_try_new ("scan-thread", _scanner_scan_thread_gthread_func, scanner_ref (self), &_inner_error_); +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = _tmp0_; +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_inner_error_ != NULL) { - goto __catch14_g_error; +#line 12376 "scanner.c" + goto __catch15_g_error; } +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _g_thread_unref0 (self->priv->thread); +#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->thread = _tmp1_; +#line 12383 "scanner.c" } - goto __finally14; - __catch14_g_error: + goto __finally15; + __catch15_g_error: { GError* e = NULL; GError* _tmp2_; const gchar* _tmp3_; +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" e = _inner_error_; +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _inner_error_ = NULL; +#line 1488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = e; +#line 1488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp2_->message; - g_critical ("scanner.vala:1435: Unable to create thread: %s", _tmp3_); +#line 1488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_critical ("scanner.vala:1488: Unable to create thread: %s", _tmp3_); +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_error_free0 (e); +#line 12403 "scanner.c" } - __finally14: + __finally15: +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_inner_error_ != NULL) { +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_clear_error (&_inner_error_); +#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 12414 "scanner.c" } } @@ -7936,71 +12427,119 @@ void scanner_redetect (Scanner* self) { gboolean _tmp0_; GAsyncQueue* _tmp1_; RequestRedetect* _tmp2_; +#line 1492 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->need_redetect; +#line 1494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp0_) { +#line 1495 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return; +#line 12431 "scanner.c" } +#line 1496 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->need_redetect = TRUE; - g_debug ("scanner.vala:1445: Requesting redetection of scan devices"); +#line 1498 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1498: Requesting redetection of scan devices"); +#line 1500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->request_queue; +#line 1500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = request_redetect_new (); +#line 1500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_async_queue_push (_tmp1_, (Request*) _tmp2_); +#line 12443 "scanner.c" } gboolean scanner_is_scanning (Scanner* self) { gboolean result = FALSE; gboolean _tmp0_; +#line 1503 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, FALSE); +#line 1505 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->scanning; +#line 1505 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp0_; +#line 1505 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12458 "scanner.c" } static gchar* scanner_get_scan_mode_string (Scanner* self, ScanMode mode) { gchar* result = NULL; ScanMode _tmp0_; +#line 1508 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, NULL); +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = mode; +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp0_) { +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_DEFAULT: +#line 12473 "scanner.c" { gchar* _tmp1_; +#line 1513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_strdup ("ScanMode.DEFAULT"); +#line 1513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp1_; +#line 1513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12482 "scanner.c" } +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_COLOR: +#line 12486 "scanner.c" { gchar* _tmp2_; +#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_strdup ("ScanMode.COLOR"); +#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp2_; +#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12495 "scanner.c" } +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_GRAY: +#line 12499 "scanner.c" { gchar* _tmp3_; +#line 1517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = g_strdup ("ScanMode.GRAY"); +#line 1517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp3_; +#line 1517 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12508 "scanner.c" } +#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_MODE_LINEART: +#line 12512 "scanner.c" { gchar* _tmp4_; +#line 1519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = g_strdup ("ScanMode.LINEART"); +#line 1519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp4_; +#line 1519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12521 "scanner.c" } default: { ScanMode _tmp5_; gchar* _tmp6_ = NULL; +#line 1521 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = mode; +#line 1521 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = g_strdup_printf ("%d", (gint) _tmp5_); +#line 1521 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp6_; +#line 1521 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12535 "scanner.c" } } } @@ -8009,45 +12548,77 @@ static gchar* scanner_get_scan_mode_string (Scanner* self, ScanMode mode) { static gchar* scanner_get_scan_type_string (Scanner* self, ScanType type) { gchar* result = NULL; ScanType _tmp0_; +#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (self != NULL, NULL); +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = type; +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" switch (_tmp0_) { +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_SINGLE: +#line 12552 "scanner.c" { gchar* _tmp1_; +#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = g_strdup ("ScanType.SINGLE"); +#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp1_; +#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12561 "scanner.c" } +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_FRONT: +#line 12565 "scanner.c" { gchar* _tmp2_; +#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = g_strdup ("ScanType.ADF_FRONT"); +#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp2_; +#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12574 "scanner.c" } +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_BACK: +#line 12578 "scanner.c" { gchar* _tmp3_; +#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = g_strdup ("ScanType.ADF_BACK"); +#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp3_; +#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12587 "scanner.c" } +#line 1527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" case SCAN_TYPE_ADF_BOTH: +#line 12591 "scanner.c" { gchar* _tmp4_; +#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = g_strdup ("ScanType.ADF_BOTH"); +#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp4_; +#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12600 "scanner.c" } default: { ScanType _tmp5_; gchar* _tmp6_ = NULL; +#line 1538 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = type; +#line 1538 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = g_strdup_printf ("%d", (gint) _tmp5_); +#line 1538 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" result = _tmp6_; +#line 1538 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return result; +#line 12614 "scanner.c" } } } @@ -8073,107 +12644,215 @@ void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options) { gint _tmp17_; ScanOptions* _tmp18_; gint _tmp19_; - RequestStartScan* _tmp20_; - RequestStartScan* request; - ScanJob* _tmp21_; - ScanJob* _tmp22_; + ScanOptions* _tmp20_; + gint _tmp21_; + ScanOptions* _tmp22_; gint _tmp23_; - ScanJob* _tmp24_; - const gchar* _tmp25_; - gchar* _tmp26_; - ScanJob* _tmp27_; - ScanOptions* _tmp28_; - gint _tmp29_; - ScanJob* _tmp30_; - ScanOptions* _tmp31_; - ScanMode _tmp32_; - ScanJob* _tmp33_; - ScanOptions* _tmp34_; - gint _tmp35_; - ScanJob* _tmp36_; - ScanOptions* _tmp37_; - ScanType _tmp38_; - ScanJob* _tmp39_; - ScanOptions* _tmp40_; - gint _tmp41_; - ScanJob* _tmp42_; - ScanOptions* _tmp43_; - gint _tmp44_; - GAsyncQueue* _tmp45_; - Request* _tmp46_; + RequestStartScan* _tmp24_; + RequestStartScan* request; + ScanJob* _tmp25_; + ScanJob* _tmp26_; + gint _tmp27_; + ScanJob* _tmp28_; + const gchar* _tmp29_; + gchar* _tmp30_; + ScanJob* _tmp31_; + ScanOptions* _tmp32_; + gint _tmp33_; + ScanJob* _tmp34_; + ScanOptions* _tmp35_; + ScanMode _tmp36_; + ScanJob* _tmp37_; + ScanOptions* _tmp38_; + gint _tmp39_; + ScanJob* _tmp40_; + ScanOptions* _tmp41_; + ScanType _tmp42_; + ScanJob* _tmp43_; + ScanOptions* _tmp44_; + gint _tmp45_; + ScanJob* _tmp46_; + ScanOptions* _tmp47_; + gint _tmp48_; + ScanJob* _tmp49_; + ScanOptions* _tmp50_; + gint _tmp51_; + ScanJob* _tmp52_; + ScanOptions* _tmp53_; + gint _tmp54_; + GAsyncQueue* _tmp55_; + Request* _tmp56_; +#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (options != NULL); +#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = device; +#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp1_ != NULL) { +#line 12686 "scanner.c" const gchar* _tmp2_; +#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = device; +#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = _tmp2_; +#line 12692 "scanner.c" } else { +#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = "(null)"; +#line 12696 "scanner.c" } +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = _tmp0_; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp4_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp5_ = _tmp4_->dpi; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp6_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp7_ = _tmp6_->scan_mode; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp8_ = scanner_get_scan_mode_string (self, _tmp7_); +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp9_ = _tmp8_; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp10_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp11_ = _tmp10_->depth; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp12_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp13_ = _tmp12_->type; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp14_ = scanner_get_scan_type_string (self, _tmp13_); +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp15_ = _tmp14_; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp16_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp17_ = _tmp16_->paper_width; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp18_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp19_ = _tmp18_->paper_height; - g_debug ("scanner.vala:1491: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \ -"d, type=%s, paper_width=%d, paper_height=%d)", _tmp3_, _tmp5_, _tmp9_, _tmp11_, _tmp15_, _tmp17_, _tmp19_); +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp20_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp21_ = _tmp20_->brightness; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp22_ = options; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp23_ = _tmp22_->contrast; +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1544: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \ +"d, type=%s, paper_width=%d, paper_height=%d, brightness=%d, contrast=%" \ +"d)", _tmp3_, _tmp5_, _tmp9_, _tmp11_, _tmp15_, _tmp17_, _tmp19_, _tmp21_, _tmp23_); +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp15_); +#line 1544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (_tmp9_); - _tmp20_ = request_start_scan_new (); - request = _tmp20_; - _tmp21_ = scan_job_new (); +#line 1548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp24_ = request_start_scan_new (); +#line 1548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + request = _tmp24_; +#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp25_ = scan_job_new (); +#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _scan_job_unref0 (request->job); - request->job = _tmp21_; - _tmp22_ = request->job; - _tmp23_ = self->job_id; - self->job_id = _tmp23_ + 1; - _tmp22_->id = _tmp23_; - _tmp24_ = request->job; - _tmp25_ = device; - _tmp26_ = g_strdup (_tmp25_); - _g_free0 (_tmp24_->device); - _tmp24_->device = _tmp26_; - _tmp27_ = request->job; - _tmp28_ = options; - _tmp29_ = _tmp28_->dpi; - _tmp27_->dpi = (gdouble) _tmp29_; - _tmp30_ = request->job; - _tmp31_ = options; - _tmp32_ = _tmp31_->scan_mode; - _tmp30_->scan_mode = _tmp32_; - _tmp33_ = request->job; - _tmp34_ = options; - _tmp35_ = _tmp34_->depth; - _tmp33_->depth = _tmp35_; - _tmp36_ = request->job; - _tmp37_ = options; - _tmp38_ = _tmp37_->type; - _tmp36_->type = _tmp38_; - _tmp39_ = request->job; - _tmp40_ = options; - _tmp41_ = _tmp40_->paper_width; - _tmp39_->page_width = _tmp41_; - _tmp42_ = request->job; - _tmp43_ = options; - _tmp44_ = _tmp43_->paper_height; - _tmp42_->page_height = _tmp44_; - _tmp45_ = self->priv->request_queue; - _tmp46_ = _request_ref0 ((Request*) request); - g_async_queue_push (_tmp45_, _tmp46_); +#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + request->job = _tmp25_; +#line 1550 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp26_ = request->job; +#line 1550 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp27_ = self->job_id; +#line 1550 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + self->job_id = _tmp27_ + 1; +#line 1550 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp26_->id = _tmp27_; +#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp28_ = request->job; +#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp29_ = device; +#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp30_ = g_strdup (_tmp29_); +#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _g_free0 (_tmp28_->device); +#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp28_->device = _tmp30_; +#line 1552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp31_ = request->job; +#line 1552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp32_ = options; +#line 1552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp33_ = _tmp32_->dpi; +#line 1552 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp31_->dpi = (gdouble) _tmp33_; +#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp34_ = request->job; +#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp35_ = options; +#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp36_ = _tmp35_->scan_mode; +#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp34_->scan_mode = _tmp36_; +#line 1554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_ = request->job; +#line 1554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp38_ = options; +#line 1554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp39_ = _tmp38_->depth; +#line 1554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp37_->depth = _tmp39_; +#line 1555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp40_ = request->job; +#line 1555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp41_ = options; +#line 1555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp42_ = _tmp41_->type; +#line 1555 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp40_->type = _tmp42_; +#line 1556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp43_ = request->job; +#line 1556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp44_ = options; +#line 1556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp45_ = _tmp44_->paper_width; +#line 1556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp43_->page_width = _tmp45_; +#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp46_ = request->job; +#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp47_ = options; +#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp48_ = _tmp47_->paper_height; +#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp46_->page_height = _tmp48_; +#line 1558 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp49_ = request->job; +#line 1558 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp50_ = options; +#line 1558 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp51_ = _tmp50_->brightness; +#line 1558 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp49_->brightness = _tmp51_; +#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp52_ = request->job; +#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp53_ = options; +#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp54_ = _tmp53_->contrast; +#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp52_->contrast = _tmp54_; +#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp55_ = self->priv->request_queue; +#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _tmp56_ = _request_ref0 ((Request*) request); +#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_async_queue_push (_tmp55_, _tmp56_); +#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _request_unref0 (request); +#line 12846 "scanner.c" } @@ -8181,12 +12860,19 @@ void scanner_cancel (Scanner* self) { gint _tmp0_; GAsyncQueue* _tmp1_; RequestCancel* _tmp2_; +#line 1563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); +#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->job_id; +#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->first_job_id = _tmp0_; +#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = self->priv->request_queue; +#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = request_cancel_new (); +#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_async_queue_push (_tmp1_, (Request*) _tmp2_); +#line 12866 "scanner.c" } @@ -8194,19 +12880,37 @@ void scanner_free (Scanner* self) { GAsyncQueue* _tmp0_; RequestQuit* _tmp1_; GThread* _tmp2_; +#line 1569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (self != NULL); - g_debug ("scanner.vala:1515: Stopping scan thread"); +#line 1571 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1571: Stopping scan thread"); +#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp0_ = self->priv->request_queue; +#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp1_ = request_quit_new (); +#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_async_queue_push (_tmp0_, (Request*) _tmp1_); +#line 1575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp2_ = self->priv->thread; +#line 1575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (_tmp2_ != NULL) { +#line 12888 "scanner.c" GThread* _tmp3_; +#line 1577 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _tmp3_ = self->priv->thread; +#line 1577 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_thread_join (_tmp3_); +#line 1578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _g_thread_unref0 (self->priv->thread); +#line 1578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + self->priv->thread = NULL; +#line 12898 "scanner.c" } +#line 1581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" sane_exit (); - g_debug ("scanner.vala:1523: sane_exit ()"); +#line 1582 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + g_debug ("scanner.vala:1582: sane_exit ()"); +#line 12904 "scanner.c" } @@ -8217,16 +12921,27 @@ static void g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO (GClosure * closure, GV register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (n_param_values == 2); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = closure->data; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = param_values->data[0].v_pointer; +#line 12923 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = param_values->data[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = closure->data; +#line 12929 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback = (GMarshalFunc_VOID__SCAN_PAGE_INFO) (marshal_data ? marshal_data : cc->callback); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback (data1, value_get_scan_page_info (param_values + 1), data2); +#line 12935 "scanner.c" } @@ -8237,16 +12952,27 @@ static void g_cclosure_user_marshal_VOID__SCAN_LINE (GClosure * closure, GValue register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (n_param_values == 2); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = closure->data; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = param_values->data[0].v_pointer; +#line 12954 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = param_values->data[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = closure->data; +#line 12960 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback = (GMarshalFunc_VOID__SCAN_LINE) (marshal_data ? marshal_data : cc->callback); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback (data1, value_get_scan_line (param_values + 1), data2); +#line 12966 "scanner.c" } @@ -8257,162 +12983,271 @@ static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure, GValue register gpointer data1; register gpointer data2; cc = (GCClosure *) closure; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (n_param_values == 3); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = closure->data; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = param_values->data[0].v_pointer; +#line 12985 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data1 = param_values->data[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" data2 = closure->data; +#line 12991 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" callback (data1, g_value_get_int (param_values + 1), g_value_get_string (param_values + 2), data2); +#line 12997 "scanner.c" } static void value_scanner_init (GValue* value) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 13004 "scanner.c" } static void value_scanner_free_value (GValue* value) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (value->data[0].v_pointer) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_unref (value->data[0].v_pointer); +#line 13013 "scanner.c" } } static void value_scanner_copy_value (const GValue* src_value, GValue* dest_value) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (src_value->data[0].v_pointer) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = scanner_ref (src_value->data[0].v_pointer); +#line 13023 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" dest_value->data[0].v_pointer = NULL; +#line 13027 "scanner.c" } } static gpointer value_scanner_peek_pointer (const GValue* value) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 13035 "scanner.c" } static gchar* value_scanner_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (collect_values[0].v_pointer) { +#line 13042 "scanner.c" Scanner* object; object = collect_values[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (object->parent_instance.g_class == NULL) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 13049 "scanner.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 13053 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = scanner_ref (object); +#line 13057 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 13061 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 13065 "scanner.c" } static gchar* value_scanner_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { Scanner** object_p; object_p = collect_values[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!object_p) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 13076 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (!value->data[0].v_pointer) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = NULL; +#line 13082 "scanner.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = value->data[0].v_pointer; +#line 13086 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" *object_p = scanner_ref (value->data[0].v_pointer); +#line 13090 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return NULL; +#line 13094 "scanner.c" } GParamSpec* param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecScanner* spec; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCANNER), NULL); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" G_PARAM_SPEC (spec)->value_type = object_type; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return G_PARAM_SPEC (spec); +#line 13108 "scanner.c" } gpointer value_get_scanner (const GValue* value) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER), NULL); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return value->data[0].v_pointer; +#line 13117 "scanner.c" } void value_set_scanner (GValue* value, gpointer v_object) { Scanner* old; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER)); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCANNER)); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_ref (value->data[0].v_pointer); +#line 13137 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 13141 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_unref (old); +#line 13147 "scanner.c" } } void value_take_scanner (GValue* value, gpointer v_object) { Scanner* old; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER)); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" old = value->data[0].v_pointer; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (v_object) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCANNER)); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = v_object; +#line 13166 "scanner.c" } else { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" value->data[0].v_pointer = NULL; +#line 13170 "scanner.c" } +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (old) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_unref (old); +#line 13176 "scanner.c" } } static void scanner_class_init (ScannerClass * klass) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" scanner_parent_class = g_type_class_peek_parent (klass); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCANNER_CLASS (klass)->finalize = scanner_finalize; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_class_add_private (klass, sizeof (ScannerPrivate)); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("update_devices", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("request_authorization", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("expect_page", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("got_page_info", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO, G_TYPE_NONE, 1, TYPE_SCAN_PAGE_INFO); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("got_line", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SCAN_LINE, G_TYPE_NONE, 1, TYPE_SCAN_LINE); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("scan_failed", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("page_done", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("document_done", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_signal_new ("scanning_changed", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 13206 "scanner.c" } static void scanner_instance_init (Scanner * self) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv = SCANNER_GET_PRIVATE (self); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->ref_count = 1; +#line 13215 "scanner.c" } static void scanner_finalize (Scanner* obj) { Scanner * self; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCANNER, Scanner); +#line 214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" + _g_thread_unref0 (self->priv->thread); +#line 217 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->request_queue); +#line 220 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->notify_queue); +#line 223 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_async_queue_unref0 (self->priv->authorize_queue); +#line 229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->default_device); +#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" __g_list_free__scan_job_unref0_0 (self->priv->job_queue); +#line 239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_free0 (self->priv->current_device); +#line 247 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" _g_hash_table_unref0 (self->priv->options); +#line 250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" self->priv->buffer = (g_free (self->priv->buffer), NULL); +#line 13241 "scanner.c" } @@ -8433,17 +13268,24 @@ GType scanner_get_type (void) { gpointer scanner_ref (gpointer instance) { Scanner* self; self = instance; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_atomic_int_inc (&self->ref_count); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" return instance; +#line 13266 "scanner.c" } void scanner_unref (gpointer instance) { Scanner* self; self = instance; +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" SCANNER_GET_CLASS (self)->finalize (self); +#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala" g_type_free_instance ((GTypeInstance *) self); +#line 13279 "scanner.c" } } |