Merge branch 'master' of git://git.project-moonshot.org/moonshot-ui into HEAD
[moonshot-ui.git] / src / moonshot-identity-manager-app.c
1 /* moonshot-identity-manager-app.c generated by valac 0.16.1, the Vala compiler
2  * generated from moonshot-identity-manager-app.vala, do not modify */
3
4
5 #include <glib.h>
6 #include <glib-object.h>
7 #include <gtk/gtk.h>
8 #include <gio/gio.h>
9 #include <gee.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include <stdio.h>
13 #include <glib/gi18n-lib.h>
14 #include "config.h"
15 #include <gobject/gvaluecollector.h>
16
17
18 #define TYPE_IDENTITY_MANAGER_APP (identity_manager_app_get_type ())
19 #define IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp))
20 #define IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
21 #define IS_IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_APP))
22 #define IS_IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_APP))
23 #define IDENTITY_MANAGER_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
24
25 typedef struct _IdentityManagerApp IdentityManagerApp;
26 typedef struct _IdentityManagerAppClass IdentityManagerAppClass;
27 typedef struct _IdentityManagerAppPrivate IdentityManagerAppPrivate;
28
29 #define TYPE_IDENTITY_MANAGER_MODEL (identity_manager_model_get_type ())
30 #define IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModel))
31 #define IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
32 #define IS_IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_MODEL))
33 #define IS_IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_MODEL))
34 #define IDENTITY_MANAGER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
35
36 typedef struct _IdentityManagerModel IdentityManagerModel;
37 typedef struct _IdentityManagerModelClass IdentityManagerModelClass;
38
39 #define TYPE_ID_CARD (id_card_get_type ())
40 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
41 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
42 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
43 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
44 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
45
46 typedef struct _IdCard IdCard;
47 typedef struct _IdCardClass IdCardClass;
48
49 #define TYPE_IDENTITY_MANAGER_VIEW (identity_manager_view_get_type ())
50 #define IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerView))
51 #define IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
52 #define IS_IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_VIEW))
53 #define IS_IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_VIEW))
54 #define IDENTITY_MANAGER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
55
56 typedef struct _IdentityManagerView IdentityManagerView;
57 typedef struct _IdentityManagerViewClass IdentityManagerViewClass;
58
59 #define TYPE_MOONSHOT_SERVER (moonshot_server_get_type ())
60 #define MOONSHOT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOONSHOT_SERVER, MoonshotServer))
61 #define MOONSHOT_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOONSHOT_SERVER, MoonshotServerClass))
62 #define IS_MOONSHOT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOONSHOT_SERVER))
63 #define IS_MOONSHOT_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOONSHOT_SERVER))
64 #define MOONSHOT_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOONSHOT_SERVER, MoonshotServerClass))
65
66 typedef struct _MoonshotServer MoonshotServer;
67 typedef struct _MoonshotServerClass MoonshotServerClass;
68 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
69
70 #define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
71 #define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
72 #define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
73 #define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
74 #define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
75 #define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
76
77 typedef struct _IdentityRequest IdentityRequest;
78 typedef struct _IdentityRequestClass IdentityRequestClass;
79 typedef struct _Block1Data Block1Data;
80 #define _identity_manager_app_unref0(var) ((var == NULL) ? NULL : (var = (identity_manager_app_unref (var), NULL)))
81 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
82 #define _g_free0(var) (var = (g_free (var), NULL))
83 #define __g_slist_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_free0_ (var), NULL)))
84
85 #define TYPE_RULE (rule_get_type ())
86 typedef struct _Rule Rule;
87 #define _g_pattern_spec_free0(var) ((var == NULL) ? NULL : (var = (g_pattern_spec_free (var), NULL)))
88 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
89 typedef struct _ParamSpecIdentityManagerApp ParamSpecIdentityManagerApp;
90 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
91
92 struct _IdentityManagerApp {
93         GTypeInstance parent_instance;
94         volatile int ref_count;
95         IdentityManagerAppPrivate * priv;
96         IdentityManagerModel* model;
97         IdCard* default_id_card;
98 };
99
100 struct _IdentityManagerAppClass {
101         GTypeClass parent_class;
102         void (*finalize) (IdentityManagerApp *self);
103 };
104
105 struct _IdentityManagerAppPrivate {
106         IdentityManagerView* view;
107         MoonshotServer* ipc_server;
108 };
109
110 struct _Block1Data {
111         int _ref_count_;
112         IdentityManagerApp * self;
113         IdCard* identity;
114         IdentityRequest* request;
115 };
116
117 struct _IdentityRequest {
118         GObject parent_instance;
119         IdentityRequestPrivate * priv;
120         IdCard* id_card;
121         gboolean complete;
122         gboolean select_default;
123         gchar* nai;
124         gchar* password;
125         gchar* service;
126         GSList* candidates;
127 };
128
129 struct _IdentityRequestClass {
130         GObjectClass parent_class;
131 };
132
133 struct _Rule {
134         gchar* pattern;
135         gchar* always_confirm;
136 };
137
138 struct _ParamSpecIdentityManagerApp {
139         GParamSpec parent_instance;
140 };
141
142
143 static gpointer identity_manager_app_parent_class = NULL;
144
145 gpointer identity_manager_app_ref (gpointer instance);
146 void identity_manager_app_unref (gpointer instance);
147 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
148 void value_set_identity_manager_app (GValue* value, gpointer v_object);
149 void value_take_identity_manager_app (GValue* value, gpointer v_object);
150 gpointer value_get_identity_manager_app (const GValue* value);
151 GType identity_manager_app_get_type (void) G_GNUC_CONST;
152 GType identity_manager_model_get_type (void) G_GNUC_CONST;
153 GType id_card_get_type (void) G_GNUC_CONST;
154 GType identity_manager_view_get_type (void) G_GNUC_CONST;
155 GType moonshot_server_get_type (void) G_GNUC_CONST;
156 guint moonshot_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
157 #define IDENTITY_MANAGER_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppPrivate))
158 enum  {
159         IDENTITY_MANAGER_APP_DUMMY_PROPERTY
160 };
161 #define IDENTITY_MANAGER_APP_WINDOW_WIDTH 400
162 #define IDENTITY_MANAGER_APP_WINDOW_HEIGHT 500
163 void identity_manager_app_show (IdentityManagerApp* self);
164 IdentityManagerApp* identity_manager_app_new (gboolean headless);
165 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless);
166 IdentityManagerModel* identity_manager_model_new (IdentityManagerApp* parent_app);
167 IdentityManagerModel* identity_manager_model_construct (GType object_type, IdentityManagerApp* parent_app);
168 IdentityManagerView* identity_manager_view_new (IdentityManagerApp* app);
169 IdentityManagerView* identity_manager_view_construct (GType object_type, IdentityManagerApp* app);
170 GeeLinkedList* identity_manager_model_get_card_list (IdentityManagerModel* self);
171 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self);
172 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id);
173 gboolean identity_manager_view_add_identity (IdentityManagerView* self, IdCard* id_card);
174 GType identity_request_get_type (void) G_GNUC_CONST;
175 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request);
176 static Block1Data* block1_data_ref (Block1Data* _data1_);
177 static void block1_data_unref (void * _userdata_);
178 const gchar* id_card_get_nai (IdCard* self);
179 gchar** id_card_get_services (IdCard* self, int* result_length1);
180 static void _g_free0_ (gpointer var);
181 static void _g_slist_free__g_free0_ (GSList* self);
182 void id_card_set_services (IdCard* self, gchar** value, int value_length1);
183 GType rule_get_type (void) G_GNUC_CONST;
184 Rule* rule_dup (const Rule* self);
185 void rule_free (Rule* self);
186 void rule_copy (const Rule* self, Rule* dest);
187 void rule_destroy (Rule* self);
188 Rule* id_card_get_rules (IdCard* self, int* result_length1);
189 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern);
190 void identity_manager_view_queue_identity_request (IdentityManagerView* self, IdentityRequest* request);
191 static gboolean __lambda4_ (Block1Data* _data1_);
192 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card);
193 static gboolean ___lambda4__gsource_func (gpointer self);
194 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn);
195 MoonshotServer* moonshot_server_new (IdentityManagerApp* app);
196 MoonshotServer* moonshot_server_construct (GType object_type, IdentityManagerApp* app);
197 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
198 static void __lambda7_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
199 static void ___lambda7__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
200 static void __lambda8_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
201 static void ___lambda8__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
202 static void identity_manager_app_finalize (IdentityManagerApp* obj);
203 gint _vala_main (gchar** args, int args_length1);
204 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
205 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
206
207
208 void identity_manager_app_show (IdentityManagerApp* self) {
209         IdentityManagerView* _tmp0_;
210 #line 27 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
211         g_return_if_fail (self != NULL);
212 #line 28 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
213         _tmp0_ = self->priv->view;
214 #line 28 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
215         if (_tmp0_ != NULL) {
216 #line 217 "moonshot-identity-manager-app.c"
217                 IdentityManagerView* _tmp1_;
218 #line 28 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
219                 _tmp1_ = self->priv->view;
220 #line 28 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
221                 gtk_widget_show ((GtkWidget*) _tmp1_);
222 #line 223 "moonshot-identity-manager-app.c"
223         }
224 }
225
226
227 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless) {
228         IdentityManagerApp* self = NULL;
229         IdentityManagerModel* _tmp0_;
230         gboolean _tmp1_;
231         IdentityManagerModel* _tmp4_;
232         GeeLinkedList* _tmp5_ = NULL;
233         GeeLinkedList* card_list;
234         GeeLinkedList* _tmp6_;
235         gint _tmp7_;
236         gint _tmp8_;
237         IdentityManagerView* _tmp11_;
238 #line 31 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
239         self = (IdentityManagerApp*) g_type_create_instance (object_type);
240 #line 32 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
241         _tmp0_ = identity_manager_model_new (self);
242 #line 32 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
243         _g_object_unref0 (self->model);
244 #line 32 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
245         self->model = _tmp0_;
246 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
247         _tmp1_ = headless;
248 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
249         if (!_tmp1_) {
250 #line 251 "moonshot-identity-manager-app.c"
251                 IdentityManagerView* _tmp2_;
252                 IdentityManagerView* _tmp3_;
253 #line 34 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
254                 _tmp2_ = identity_manager_view_new (self);
255 #line 34 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
256                 _tmp3_ = g_object_ref_sink (_tmp2_);
257 #line 34 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
258                 _g_object_unref0 (self->priv->view);
259 #line 34 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
260                 self->priv->view = _tmp3_;
261 #line 262 "moonshot-identity-manager-app.c"
262         }
263 #line 35 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
264         _tmp4_ = self->model;
265 #line 35 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
266         _tmp5_ = identity_manager_model_get_card_list (_tmp4_);
267 #line 35 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
268         card_list = _tmp5_;
269 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
270         _tmp6_ = card_list;
271 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
272         _tmp7_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp6_);
273 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
274         _tmp8_ = _tmp7_;
275 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
276         if (_tmp8_ > 0) {
277 #line 278 "moonshot-identity-manager-app.c"
278                 GeeLinkedList* _tmp9_;
279                 gpointer _tmp10_ = NULL;
280 #line 37 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
281                 _tmp9_ = card_list;
282 #line 37 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
283                 _tmp10_ = gee_abstract_list_first ((GeeAbstractList*) _tmp9_);
284 #line 37 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
285                 _g_object_unref0 (self->default_id_card);
286 #line 37 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
287                 self->default_id_card = (IdCard*) _tmp10_;
288 #line 289 "moonshot-identity-manager-app.c"
289         }
290 #line 39 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
291         identity_manager_app_init_ipc_server (self);
292 #line 50 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
293         _tmp11_ = self->priv->view;
294 #line 50 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
295         if (_tmp11_ != NULL) {
296 #line 297 "moonshot-identity-manager-app.c"
297                 IdentityManagerView* _tmp12_;
298 #line 50 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
299                 _tmp12_ = self->priv->view;
300 #line 50 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
301                 gtk_widget_show ((GtkWidget*) _tmp12_);
302 #line 303 "moonshot-identity-manager-app.c"
303         }
304 #line 31 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
305         _g_object_unref0 (card_list);
306 #line 31 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
307         return self;
308 #line 309 "moonshot-identity-manager-app.c"
309 }
310
311
312 IdentityManagerApp* identity_manager_app_new (gboolean headless) {
313 #line 31 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
314         return identity_manager_app_construct (TYPE_IDENTITY_MANAGER_APP, headless);
315 #line 316 "moonshot-identity-manager-app.c"
316 }
317
318
319 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id) {
320         gboolean result = FALSE;
321         IdentityManagerView* _tmp0_;
322 #line 53 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
323         g_return_val_if_fail (self != NULL, FALSE);
324 #line 53 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
325         g_return_val_if_fail (id != NULL, FALSE);
326 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
327         _tmp0_ = self->priv->view;
328 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
329         if (_tmp0_ != NULL) {
330 #line 331 "moonshot-identity-manager-app.c"
331                 IdentityManagerView* _tmp1_;
332                 IdCard* _tmp2_;
333                 gboolean _tmp3_ = FALSE;
334 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
335                 _tmp1_ = self->priv->view;
336 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
337                 _tmp2_ = id;
338 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
339                 _tmp3_ = identity_manager_view_add_identity (_tmp1_, _tmp2_);
340 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
341                 result = _tmp3_;
342 #line 55 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
343                 return result;
344 #line 345 "moonshot-identity-manager-app.c"
345         }
346 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
347         result = FALSE;
348 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
349         return result;
350 #line 351 "moonshot-identity-manager-app.c"
351 }
352
353
354 static gpointer _g_object_ref0 (gpointer self) {
355 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
356         return self ? g_object_ref (self) : NULL;
357 #line 358 "moonshot-identity-manager-app.c"
358 }
359
360
361 static Block1Data* block1_data_ref (Block1Data* _data1_) {
362 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
363         g_atomic_int_inc (&_data1_->_ref_count_);
364 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
365         return _data1_;
366 #line 367 "moonshot-identity-manager-app.c"
367 }
368
369
370 static void block1_data_unref (void * _userdata_) {
371         Block1Data* _data1_;
372         _data1_ = (Block1Data*) _userdata_;
373 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
374         if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
375 #line 376 "moonshot-identity-manager-app.c"
376                 IdentityManagerApp * self;
377 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
378                 self = _data1_->self;
379 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
380                 _g_object_unref0 (_data1_->identity);
381 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
382                 _g_object_unref0 (_data1_->request);
383 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
384                 _identity_manager_app_unref0 (self);
385 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
386                 g_slice_free (Block1Data, _data1_);
387 #line 388 "moonshot-identity-manager-app.c"
388         }
389 }
390
391
392 static void _g_free0_ (gpointer var) {
393 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
394         var = (g_free (var), NULL);
395 #line 396 "moonshot-identity-manager-app.c"
396 }
397
398
399 static void _g_slist_free__g_free0_ (GSList* self) {
400 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
401         g_slist_foreach (self, (GFunc) _g_free0_, NULL);
402 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
403         g_slist_free (self);
404 #line 405 "moonshot-identity-manager-app.c"
405 }
406
407
408 static gboolean __lambda4_ (Block1Data* _data1_) {
409         IdentityManagerApp * self;
410         gboolean result = FALSE;
411         IdentityRequest* _tmp0_;
412         IdCard* _tmp1_;
413 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
414         self = _data1_->self;
415 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
416         _tmp0_ = _data1_->request;
417 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
418         _tmp1_ = _data1_->identity;
419 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
420         identity_request_return_identity (_tmp0_, _tmp1_);
421 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
422         result = FALSE;
423 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
424         return result;
425 #line 426 "moonshot-identity-manager-app.c"
426 }
427
428
429 static gboolean ___lambda4__gsource_func (gpointer self) {
430         gboolean result;
431         result = __lambda4_ (self);
432 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
433         return result;
434 #line 435 "moonshot-identity-manager-app.c"
435 }
436
437
438 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request) {
439         Block1Data* _data1_;
440         IdentityRequest* _tmp0_;
441         IdentityRequest* _tmp1_;
442         IdentityRequest* _tmp2_;
443         gboolean _tmp3_;
444         IdCard* _tmp6_;
445 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
446         g_return_if_fail (self != NULL);
447 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
448         g_return_if_fail (request != NULL);
449 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
450         _data1_ = g_slice_new0 (Block1Data);
451 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
452         _data1_->_ref_count_ = 1;
453 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
454         _data1_->self = identity_manager_app_ref (self);
455 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
456         _tmp0_ = request;
457 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
458         _tmp1_ = _g_object_ref0 (_tmp0_);
459 #line 59 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
460         _data1_->request = _tmp1_;
461 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
462         _data1_->identity = NULL;
463 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
464         _tmp2_ = _data1_->request;
465 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
466         _tmp3_ = _tmp2_->select_default;
467 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
468         if (_tmp3_) {
469 #line 470 "moonshot-identity-manager-app.c"
470                 IdCard* _tmp4_;
471                 IdCard* _tmp5_;
472 #line 64 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
473                 _tmp4_ = self->default_id_card;
474 #line 64 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
475                 _tmp5_ = _g_object_ref0 (_tmp4_);
476 #line 64 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
477                 _g_object_unref0 (_data1_->identity);
478 #line 64 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
479                 _data1_->identity = _tmp5_;
480 #line 481 "moonshot-identity-manager-app.c"
481         }
482 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
483         _tmp6_ = _data1_->identity;
484 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
485         if (_tmp6_ == NULL) {
486 #line 487 "moonshot-identity-manager-app.c"
487                 gboolean _tmp7_ = FALSE;
488                 IdentityRequest* _tmp8_;
489                 const gchar* _tmp9_;
490                 gboolean _tmp12_;
491                 gboolean has_nai;
492                 gboolean _tmp13_ = FALSE;
493                 IdentityRequest* _tmp14_;
494                 const gchar* _tmp15_;
495                 gboolean _tmp18_;
496                 gboolean has_srv;
497                 gboolean confirm;
498                 IdCard* nai_provided;
499                 gboolean _tmp54_ = FALSE;
500                 gboolean _tmp55_;
501                 gboolean _tmp59_;
502                 IdentityRequest* _tmp91_;
503                 GSList* _tmp92_;
504                 guint _tmp93_ = 0U;
505                 IdentityRequest* _tmp119_;
506                 GSList* _tmp120_;
507                 guint _tmp121_ = 0U;
508                 IdCard* _tmp128_;
509                 IdCard* _tmp133_;
510                 gboolean _tmp134_ = FALSE;
511                 gboolean _tmp135_;
512                 gboolean _tmp137_;
513 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
514                 _tmp8_ = _data1_->request;
515 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
516                 _tmp9_ = _tmp8_->nai;
517 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
518                 if (_tmp9_ != NULL) {
519 #line 520 "moonshot-identity-manager-app.c"
520                         IdentityRequest* _tmp10_;
521                         const gchar* _tmp11_;
522 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
523                         _tmp10_ = _data1_->request;
524 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
525                         _tmp11_ = _tmp10_->nai;
526 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
527                         _tmp7_ = g_strcmp0 (_tmp11_, "") != 0;
528 #line 529 "moonshot-identity-manager-app.c"
529                 } else {
530 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
531                         _tmp7_ = FALSE;
532 #line 533 "moonshot-identity-manager-app.c"
533                 }
534 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
535                 _tmp12_ = _tmp7_;
536 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
537                 has_nai = _tmp12_;
538 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
539                 _tmp14_ = _data1_->request;
540 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
541                 _tmp15_ = _tmp14_->service;
542 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
543                 if (_tmp15_ != NULL) {
544 #line 545 "moonshot-identity-manager-app.c"
545                         IdentityRequest* _tmp16_;
546                         const gchar* _tmp17_;
547 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
548                         _tmp16_ = _data1_->request;
549 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
550                         _tmp17_ = _tmp16_->service;
551 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
552                         _tmp13_ = g_strcmp0 (_tmp17_, "") != 0;
553 #line 554 "moonshot-identity-manager-app.c"
554                 } else {
555 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
556                         _tmp13_ = FALSE;
557 #line 558 "moonshot-identity-manager-app.c"
558                 }
559 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
560                 _tmp18_ = _tmp13_;
561 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
562                 has_srv = _tmp18_;
563 #line 71 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
564                 confirm = FALSE;
565 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
566                 nai_provided = NULL;
567 #line 568 "moonshot-identity-manager-app.c"
568                 {
569                         IdentityManagerModel* _tmp19_;
570                         GeeLinkedList* _tmp20_ = NULL;
571                         GeeLinkedList* _id_list;
572                         GeeLinkedList* _tmp21_;
573                         gint _tmp22_;
574                         gint _tmp23_;
575                         gint _id_size;
576                         gint _id_index;
577 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
578                         _tmp19_ = self->model;
579 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
580                         _tmp20_ = identity_manager_model_get_card_list (_tmp19_);
581 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
582                         _id_list = _tmp20_;
583 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
584                         _tmp21_ = _id_list;
585 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
586                         _tmp22_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp21_);
587 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
588                         _tmp23_ = _tmp22_;
589 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
590                         _id_size = _tmp23_;
591 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
592                         _id_index = -1;
593 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
594                         while (TRUE) {
595 #line 596 "moonshot-identity-manager-app.c"
596                                 gint _tmp24_;
597                                 gint _tmp25_;
598                                 gint _tmp26_;
599                                 GeeLinkedList* _tmp27_;
600                                 gint _tmp28_;
601                                 gpointer _tmp29_ = NULL;
602                                 IdCard* id;
603                                 gboolean _tmp30_ = FALSE;
604                                 gboolean _tmp31_;
605                                 gboolean _tmp37_;
606                                 gboolean _tmp43_;
607 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
608                                 _tmp24_ = _id_index;
609 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
610                                 _id_index = _tmp24_ + 1;
611 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
612                                 _tmp25_ = _id_index;
613 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
614                                 _tmp26_ = _id_size;
615 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
616                                 if (!(_tmp25_ < _tmp26_)) {
617 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
618                                         break;
619 #line 620 "moonshot-identity-manager-app.c"
620                                 }
621 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
622                                 _tmp27_ = _id_list;
623 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
624                                 _tmp28_ = _id_index;
625 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
626                                 _tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp27_, _tmp28_);
627 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
628                                 id = (IdCard*) _tmp29_;
629 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
630                                 _tmp31_ = has_nai;
631 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
632                                 if (_tmp31_) {
633 #line 634 "moonshot-identity-manager-app.c"
634                                         IdentityRequest* _tmp32_;
635                                         const gchar* _tmp33_;
636                                         IdCard* _tmp34_;
637                                         const gchar* _tmp35_;
638                                         const gchar* _tmp36_;
639 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
640                                         _tmp32_ = _data1_->request;
641 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
642                                         _tmp33_ = _tmp32_->nai;
643 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
644                                         _tmp34_ = id;
645 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
646                                         _tmp35_ = id_card_get_nai (_tmp34_);
647 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
648                                         _tmp36_ = _tmp35_;
649 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
650                                         _tmp30_ = g_strcmp0 (_tmp33_, _tmp36_) == 0;
651 #line 652 "moonshot-identity-manager-app.c"
652                                 } else {
653 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
654                                         _tmp30_ = FALSE;
655 #line 656 "moonshot-identity-manager-app.c"
656                                 }
657 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
658                                 _tmp37_ = _tmp30_;
659 #line 77 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
660                                 if (_tmp37_) {
661 #line 662 "moonshot-identity-manager-app.c"
662                                         IdCard* _tmp38_;
663                                         IdCard* _tmp39_;
664                                         IdentityRequest* _tmp40_;
665                                         IdCard* _tmp41_;
666                                         IdCard* _tmp42_;
667 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
668                                         _tmp38_ = id;
669 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
670                                         _tmp39_ = _g_object_ref0 (_tmp38_);
671 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
672                                         _g_object_unref0 (nai_provided);
673 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
674                                         nai_provided = _tmp39_;
675 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
676                                         _tmp40_ = _data1_->request;
677 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
678                                         _tmp41_ = id;
679 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
680                                         _tmp42_ = _g_object_ref0 (_tmp41_);
681 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
682                                         _tmp40_->candidates = g_slist_append (_tmp40_->candidates, _tmp42_);
683 #line 81 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
684                                         _g_object_unref0 (id);
685 #line 81 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
686                                         continue;
687 #line 688 "moonshot-identity-manager-app.c"
688                                 }
689 #line 85 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
690                                 _tmp43_ = has_srv;
691 #line 85 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
692                                 if (_tmp43_) {
693 #line 694 "moonshot-identity-manager-app.c"
694                                         IdCard* _tmp44_;
695                                         gchar** _tmp45_;
696                                         gint _tmp45__length1;
697                                         gchar** _tmp46_;
698                                         gint _tmp46__length1;
699 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
700                                         _tmp44_ = id;
701 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
702                                         _tmp45_ = id_card_get_services (_tmp44_, &_tmp45__length1);
703 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
704                                         _tmp46_ = _tmp45_;
705 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
706                                         _tmp46__length1 = _tmp45__length1;
707 #line 708 "moonshot-identity-manager-app.c"
708                                         {
709                                                 gchar** srv_collection = NULL;
710                                                 gint srv_collection_length1 = 0;
711                                                 gint _srv_collection_size_ = 0;
712                                                 gint srv_it = 0;
713 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
714                                                 srv_collection = _tmp46_;
715 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
716                                                 srv_collection_length1 = _tmp46__length1;
717 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
718                                                 for (srv_it = 0; srv_it < _tmp46__length1; srv_it = srv_it + 1) {
719 #line 720 "moonshot-identity-manager-app.c"
720                                                         gchar* _tmp47_;
721                                                         gchar* srv = NULL;
722 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
723                                                         _tmp47_ = g_strdup (srv_collection[srv_it]);
724 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
725                                                         srv = _tmp47_;
726 #line 727 "moonshot-identity-manager-app.c"
727                                                         {
728                                                                 IdentityRequest* _tmp48_;
729                                                                 const gchar* _tmp49_;
730                                                                 const gchar* _tmp50_;
731 #line 89 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
732                                                                 _tmp48_ = _data1_->request;
733 #line 89 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
734                                                                 _tmp49_ = _tmp48_->service;
735 #line 89 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
736                                                                 _tmp50_ = srv;
737 #line 89 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
738                                                                 if (g_strcmp0 (_tmp49_, _tmp50_) == 0) {
739 #line 740 "moonshot-identity-manager-app.c"
740                                                                         IdentityRequest* _tmp51_;
741                                                                         IdCard* _tmp52_;
742                                                                         IdCard* _tmp53_;
743 #line 91 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
744                                                                         _tmp51_ = _data1_->request;
745 #line 91 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
746                                                                         _tmp52_ = id;
747 #line 91 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
748                                                                         _tmp53_ = _g_object_ref0 (_tmp52_);
749 #line 91 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
750                                                                         _tmp51_->candidates = g_slist_append (_tmp51_->candidates, _tmp53_);
751 #line 92 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
752                                                                         _g_free0 (srv);
753 #line 92 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
754                                                                         continue;
755 #line 756 "moonshot-identity-manager-app.c"
756                                                                 }
757 #line 87 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
758                                                                 _g_free0 (srv);
759 #line 760 "moonshot-identity-manager-app.c"
760                                                         }
761                                                 }
762                                         }
763                                 }
764 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
765                                 _g_object_unref0 (id);
766 #line 767 "moonshot-identity-manager-app.c"
767                         }
768 #line 74 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
769                         _g_object_unref0 (_id_list);
770 #line 771 "moonshot-identity-manager-app.c"
771                 }
772 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
773                 _tmp55_ = has_srv;
774 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
775                 if (_tmp55_) {
776 #line 777 "moonshot-identity-manager-app.c"
777                         IdentityRequest* _tmp56_;
778                         GSList* _tmp57_;
779                         guint _tmp58_ = 0U;
780 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
781                         _tmp56_ = _data1_->request;
782 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
783                         _tmp57_ = _tmp56_->candidates;
784 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
785                         _tmp58_ = g_slist_length (_tmp57_);
786 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
787                         _tmp54_ = _tmp58_ > ((guint) 1);
788 #line 789 "moonshot-identity-manager-app.c"
789                 } else {
790 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
791                         _tmp54_ = FALSE;
792 #line 793 "moonshot-identity-manager-app.c"
793                 }
794 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
795                 _tmp59_ = _tmp54_;
796 #line 99 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
797                 if (_tmp59_) {
798 #line 799 "moonshot-identity-manager-app.c"
799                         IdentityRequest* _tmp60_;
800                         GSList* _tmp61_;
801 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
802                         _tmp60_ = _data1_->request;
803 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
804                         _tmp61_ = _tmp60_->candidates;
805 #line 806 "moonshot-identity-manager-app.c"
806                         {
807                                 GSList* id_collection = NULL;
808                                 GSList* id_it = NULL;
809 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
810                                 id_collection = _tmp61_;
811 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
812                                 for (id_it = id_collection; id_it != NULL; id_it = id_it->next) {
813 #line 814 "moonshot-identity-manager-app.c"
814                                         IdCard* _tmp62_;
815                                         IdCard* id = NULL;
816 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
817                                         _tmp62_ = _g_object_ref0 ((IdCard*) id_it->data);
818 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
819                                         id = _tmp62_;
820 #line 821 "moonshot-identity-manager-app.c"
821                                         {
822                                                 gint i;
823                                                 GSList* services_list;
824                                                 gboolean has_service;
825                                                 IdCard* _tmp63_;
826                                                 gchar** _tmp64_;
827                                                 gint _tmp64__length1;
828                                                 gchar** _tmp65_;
829                                                 gint _tmp65__length1;
830                                                 gboolean _tmp72_;
831                                                 GSList* _tmp73_;
832                                                 guint _tmp74_ = 0U;
833                                                 GSList* _tmp78_;
834                                                 guint _tmp79_ = 0U;
835                                                 gchar** _tmp80_ = NULL;
836                                                 gchar** services;
837                                                 gint services_length1;
838                                                 gint _services_size_;
839                                                 GSList* _tmp81_;
840                                                 IdCard* _tmp89_;
841                                                 gchar** _tmp90_;
842                                                 gint _tmp90__length1;
843 #line 103 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
844                                                 i = 0;
845 #line 104 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
846                                                 services_list = NULL;
847 #line 105 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
848                                                 has_service = FALSE;
849 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
850                                                 _tmp63_ = id;
851 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
852                                                 _tmp64_ = id_card_get_services (_tmp63_, &_tmp64__length1);
853 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
854                                                 _tmp65_ = _tmp64_;
855 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
856                                                 _tmp65__length1 = _tmp64__length1;
857 #line 858 "moonshot-identity-manager-app.c"
858                                                 {
859                                                         gchar** srv_collection = NULL;
860                                                         gint srv_collection_length1 = 0;
861                                                         gint _srv_collection_size_ = 0;
862                                                         gint srv_it = 0;
863 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
864                                                         srv_collection = _tmp65_;
865 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
866                                                         srv_collection_length1 = _tmp65__length1;
867 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
868                                                         for (srv_it = 0; srv_it < _tmp65__length1; srv_it = srv_it + 1) {
869 #line 870 "moonshot-identity-manager-app.c"
870                                                                 gchar* _tmp66_;
871                                                                 gchar* srv = NULL;
872 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
873                                                                 _tmp66_ = g_strdup (srv_collection[srv_it]);
874 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
875                                                                 srv = _tmp66_;
876 #line 877 "moonshot-identity-manager-app.c"
877                                                                 {
878                                                                         const gchar* _tmp67_;
879                                                                         IdentityRequest* _tmp68_;
880                                                                         const gchar* _tmp69_;
881                                                                         const gchar* _tmp70_;
882                                                                         gchar* _tmp71_;
883 #line 109 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
884                                                                         _tmp67_ = srv;
885 #line 109 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
886                                                                         _tmp68_ = _data1_->request;
887 #line 109 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
888                                                                         _tmp69_ = _tmp68_->service;
889 #line 109 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
890                                                                         if (g_strcmp0 (_tmp67_, _tmp69_) == 0) {
891 #line 111 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
892                                                                                 has_service = TRUE;
893 #line 112 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
894                                                                                 _g_free0 (srv);
895 #line 112 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
896                                                                                 continue;
897 #line 898 "moonshot-identity-manager-app.c"
898                                                                         }
899 #line 114 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
900                                                                         _tmp70_ = srv;
901 #line 114 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
902                                                                         _tmp71_ = g_strdup (_tmp70_);
903 #line 114 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
904                                                                         services_list = g_slist_append (services_list, _tmp71_);
905 #line 107 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
906                                                                         _g_free0 (srv);
907 #line 908 "moonshot-identity-manager-app.c"
908                                                                 }
909                                                         }
910                                                 }
911 #line 117 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
912                                                 _tmp72_ = has_service;
913 #line 117 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
914                                                 if (!_tmp72_) {
915 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
916                                                         __g_slist_free__g_free0_0 (services_list);
917 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
918                                                         _g_object_unref0 (id);
919 #line 118 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
920                                                         continue;
921 #line 922 "moonshot-identity-manager-app.c"
922                                                 }
923 #line 120 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
924                                                 _tmp73_ = services_list;
925 #line 120 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
926                                                 _tmp74_ = g_slist_length (_tmp73_);
927 #line 120 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
928                                                 if (_tmp74_ == ((guint) 0)) {
929 #line 930 "moonshot-identity-manager-app.c"
930                                                         IdCard* _tmp75_;
931                                                         gchar** _tmp76_ = NULL;
932                                                         gchar** _tmp77_;
933                                                         gint _tmp77__length1;
934 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
935                                                         _tmp75_ = id;
936 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
937                                                         _tmp76_ = g_new0 (gchar*, 0 + 1);
938 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
939                                                         _tmp77_ = _tmp76_;
940 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
941                                                         _tmp77__length1 = 0;
942 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
943                                                         id_card_set_services (_tmp75_, _tmp77_, 0);
944 #line 122 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
945                                                         _tmp77_ = (_vala_array_free (_tmp77_, _tmp77__length1, (GDestroyNotify) g_free), NULL);
946 #line 123 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
947                                                         __g_slist_free__g_free0_0 (services_list);
948 #line 123 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
949                                                         _g_object_unref0 (id);
950 #line 123 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
951                                                         continue;
952 #line 953 "moonshot-identity-manager-app.c"
953                                                 }
954 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
955                                                 _tmp78_ = services_list;
956 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
957                                                 _tmp79_ = g_slist_length (_tmp78_);
958 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
959                                                 _tmp80_ = g_new0 (gchar*, _tmp79_ + 1);
960 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
961                                                 services = _tmp80_;
962 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
963                                                 services_length1 = _tmp79_;
964 #line 126 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
965                                                 _services_size_ = services_length1;
966 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
967                                                 _tmp81_ = services_list;
968 #line 969 "moonshot-identity-manager-app.c"
969                                                 {
970                                                         GSList* srv_collection = NULL;
971                                                         GSList* srv_it = NULL;
972 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
973                                                         srv_collection = _tmp81_;
974 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
975                                                         for (srv_it = srv_collection; srv_it != NULL; srv_it = srv_it->next) {
976 #line 977 "moonshot-identity-manager-app.c"
977                                                                 gchar* _tmp82_;
978                                                                 gchar* srv = NULL;
979 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
980                                                                 _tmp82_ = g_strdup ((const gchar*) srv_it->data);
981 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
982                                                                 srv = _tmp82_;
983 #line 984 "moonshot-identity-manager-app.c"
984                                                                 {
985                                                                         gchar** _tmp83_;
986                                                                         gint _tmp83__length1;
987                                                                         gint _tmp84_;
988                                                                         const gchar* _tmp85_;
989                                                                         gchar* _tmp86_;
990                                                                         gchar* _tmp87_;
991                                                                         gint _tmp88_;
992 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
993                                                                         _tmp83_ = services;
994 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
995                                                                         _tmp83__length1 = services_length1;
996 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
997                                                                         _tmp84_ = i;
998 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
999                                                                         _tmp85_ = srv;
1000 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1001                                                                         _tmp86_ = g_strdup (_tmp85_);
1002 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1003                                                                         _g_free0 (_tmp83_[_tmp84_]);
1004 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1005                                                                         _tmp83_[_tmp84_] = _tmp86_;
1006 #line 129 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1007                                                                         _tmp87_ = _tmp83_[_tmp84_];
1008 #line 130 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1009                                                                         _tmp88_ = i;
1010 #line 130 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1011                                                                         i = _tmp88_ + 1;
1012 #line 127 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1013                                                                         _g_free0 (srv);
1014 #line 1015 "moonshot-identity-manager-app.c"
1015                                                                 }
1016                                                         }
1017                                                 }
1018 #line 133 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1019                                                 _tmp89_ = id;
1020 #line 133 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1021                                                 _tmp90_ = services;
1022 #line 133 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1023                                                 _tmp90__length1 = services_length1;
1024 #line 133 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1025                                                 id_card_set_services (_tmp89_, _tmp90_, _tmp90__length1);
1026 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1027                                                 services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
1028 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1029                                                 __g_slist_free__g_free0_0 (services_list);
1030 #line 101 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1031                                                 _g_object_unref0 (id);
1032 #line 1033 "moonshot-identity-manager-app.c"
1033                                         }
1034                                 }
1035                         }
1036                 }
1037 #line 140 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1038                 _tmp91_ = _data1_->request;
1039 #line 140 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1040                 _tmp92_ = _tmp91_->candidates;
1041 #line 140 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1042                 _tmp93_ = g_slist_length (_tmp92_);
1043 #line 140 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1044                 if (_tmp93_ == ((guint) 0)) {
1045 #line 1046 "moonshot-identity-manager-app.c"
1046                         {
1047                                 IdentityManagerModel* _tmp94_;
1048                                 GeeLinkedList* _tmp95_ = NULL;
1049                                 GeeLinkedList* _id_list;
1050                                 GeeLinkedList* _tmp96_;
1051                                 gint _tmp97_;
1052                                 gint _tmp98_;
1053                                 gint _id_size;
1054                                 gint _id_index;
1055 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1056                                 _tmp94_ = self->model;
1057 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1058                                 _tmp95_ = identity_manager_model_get_card_list (_tmp94_);
1059 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1060                                 _id_list = _tmp95_;
1061 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1062                                 _tmp96_ = _id_list;
1063 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1064                                 _tmp97_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp96_);
1065 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1066                                 _tmp98_ = _tmp97_;
1067 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1068                                 _id_size = _tmp98_;
1069 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1070                                 _id_index = -1;
1071 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1072                                 while (TRUE) {
1073 #line 1074 "moonshot-identity-manager-app.c"
1074                                         gint _tmp99_;
1075                                         gint _tmp100_;
1076                                         gint _tmp101_;
1077                                         GeeLinkedList* _tmp102_;
1078                                         gint _tmp103_;
1079                                         gpointer _tmp104_ = NULL;
1080                                         IdCard* id;
1081                                         IdCard* _tmp105_;
1082                                         Rule* _tmp106_;
1083                                         gint _tmp106__length1;
1084                                         Rule* _tmp107_;
1085                                         gint _tmp107__length1;
1086 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1087                                         _tmp99_ = _id_index;
1088 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1089                                         _id_index = _tmp99_ + 1;
1090 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1091                                         _tmp100_ = _id_index;
1092 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1093                                         _tmp101_ = _id_size;
1094 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1095                                         if (!(_tmp100_ < _tmp101_)) {
1096 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1097                                                 break;
1098 #line 1099 "moonshot-identity-manager-app.c"
1099                                         }
1100 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1101                                         _tmp102_ = _id_list;
1102 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1103                                         _tmp103_ = _id_index;
1104 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1105                                         _tmp104_ = gee_abstract_list_get ((GeeAbstractList*) _tmp102_, _tmp103_);
1106 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1107                                         id = (IdCard*) _tmp104_;
1108 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1109                                         _tmp105_ = id;
1110 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1111                                         _tmp106_ = id_card_get_rules (_tmp105_, &_tmp106__length1);
1112 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1113                                         _tmp107_ = _tmp106_;
1114 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1115                                         _tmp107__length1 = _tmp106__length1;
1116 #line 1117 "moonshot-identity-manager-app.c"
1117                                         {
1118                                                 Rule* rule_collection = NULL;
1119                                                 gint rule_collection_length1 = 0;
1120                                                 gint _rule_collection_size_ = 0;
1121                                                 gint rule_it = 0;
1122 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1123                                                 rule_collection = _tmp107_;
1124 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1125                                                 rule_collection_length1 = _tmp107__length1;
1126 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1127                                                 for (rule_it = 0; rule_it < _tmp107__length1; rule_it = rule_it + 1) {
1128 #line 1129 "moonshot-identity-manager-app.c"
1129                                                         Rule _tmp108_ = {0};
1130                                                         Rule rule = {0};
1131 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1132                                                         rule_copy (&rule_collection[rule_it], &_tmp108_);
1133 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1134                                                         rule = _tmp108_;
1135 #line 1136 "moonshot-identity-manager-app.c"
1136                                                         {
1137                                                                 IdentityRequest* _tmp109_;
1138                                                                 const gchar* _tmp110_;
1139                                                                 Rule _tmp111_;
1140                                                                 const gchar* _tmp112_;
1141                                                                 gboolean _tmp113_ = FALSE;
1142                                                                 IdentityRequest* _tmp114_;
1143                                                                 IdCard* _tmp115_;
1144                                                                 IdCard* _tmp116_;
1145                                                                 Rule _tmp117_;
1146                                                                 const gchar* _tmp118_;
1147 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1148                                                                 _tmp109_ = _data1_->request;
1149 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1150                                                                 _tmp110_ = _tmp109_->service;
1151 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1152                                                                 _tmp111_ = rule;
1153 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1154                                                                 _tmp112_ = _tmp111_.pattern;
1155 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1156                                                                 _tmp113_ = identity_manager_app_match_service_pattern (self, _tmp110_, _tmp112_);
1157 #line 146 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1158                                                                 if (!_tmp113_) {
1159 #line 147 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1160                                                                         rule_destroy (&rule);
1161 #line 147 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1162                                                                         continue;
1163 #line 1164 "moonshot-identity-manager-app.c"
1164                                                                 }
1165 #line 149 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1166                                                                 _tmp114_ = _data1_->request;
1167 #line 149 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1168                                                                 _tmp115_ = id;
1169 #line 149 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1170                                                                 _tmp116_ = _g_object_ref0 (_tmp115_);
1171 #line 149 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1172                                                                 _tmp114_->candidates = g_slist_append (_tmp114_->candidates, _tmp116_);
1173 #line 151 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1174                                                                 _tmp117_ = rule;
1175 #line 151 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1176                                                                 _tmp118_ = _tmp117_.always_confirm;
1177 #line 151 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1178                                                                 if (g_strcmp0 (_tmp118_, "true") == 0) {
1179 #line 152 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1180                                                                         confirm = TRUE;
1181 #line 1182 "moonshot-identity-manager-app.c"
1182                                                                 }
1183 #line 144 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1184                                                                 rule_destroy (&rule);
1185 #line 1186 "moonshot-identity-manager-app.c"
1186                                                         }
1187                                                 }
1188                                         }
1189 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1190                                         _g_object_unref0 (id);
1191 #line 1192 "moonshot-identity-manager-app.c"
1192                                 }
1193 #line 142 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1194                                 _g_object_unref0 (_id_list);
1195 #line 1196 "moonshot-identity-manager-app.c"
1196                         }
1197                 }
1198 #line 157 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1199                 _tmp119_ = _data1_->request;
1200 #line 157 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1201                 _tmp120_ = _tmp119_->candidates;
1202 #line 157 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1203                 _tmp121_ = g_slist_length (_tmp120_);
1204 #line 157 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1205                 if (_tmp121_ > ((guint) 1)) {
1206 #line 1207 "moonshot-identity-manager-app.c"
1207                         gboolean _tmp122_ = FALSE;
1208                         gboolean _tmp123_;
1209                         gboolean _tmp125_;
1210 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1211                         _tmp123_ = has_nai;
1212 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1213                         if (_tmp123_) {
1214 #line 1215 "moonshot-identity-manager-app.c"
1215                                 IdCard* _tmp124_;
1216 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1217                                 _tmp124_ = nai_provided;
1218 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1219                                 _tmp122_ = _tmp124_ != NULL;
1220 #line 1221 "moonshot-identity-manager-app.c"
1221                         } else {
1222 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1223                                 _tmp122_ = FALSE;
1224 #line 1225 "moonshot-identity-manager-app.c"
1225                         }
1226 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1227                         _tmp125_ = _tmp122_;
1228 #line 159 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1229                         if (_tmp125_) {
1230 #line 1231 "moonshot-identity-manager-app.c"
1231                                 IdCard* _tmp126_;
1232                                 IdCard* _tmp127_;
1233 #line 161 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1234                                 _tmp126_ = nai_provided;
1235 #line 161 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1236                                 _tmp127_ = _g_object_ref0 (_tmp126_);
1237 #line 161 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1238                                 _g_object_unref0 (_data1_->identity);
1239 #line 161 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1240                                 _data1_->identity = _tmp127_;
1241 #line 162 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1242                                 confirm = FALSE;
1243 #line 1244 "moonshot-identity-manager-app.c"
1244                         } else {
1245 #line 165 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1246                                 confirm = TRUE;
1247 #line 1248 "moonshot-identity-manager-app.c"
1248                         }
1249                 }
1250 #line 167 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1251                 _tmp128_ = _data1_->identity;
1252 #line 167 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1253                 if (_tmp128_ == NULL) {
1254 #line 1255 "moonshot-identity-manager-app.c"
1255                         IdentityRequest* _tmp129_;
1256                         GSList* _tmp130_;
1257                         gconstpointer _tmp131_ = NULL;
1258                         IdCard* _tmp132_;
1259 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1260                         _tmp129_ = _data1_->request;
1261 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1262                         _tmp130_ = _tmp129_->candidates;
1263 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1264                         _tmp131_ = g_slist_nth_data (_tmp130_, (guint) 0);
1265 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1266                         _tmp132_ = _g_object_ref0 ((IdCard*) _tmp131_);
1267 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1268                         _g_object_unref0 (_data1_->identity);
1269 #line 168 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1270                         _data1_->identity = _tmp132_;
1271 #line 1272 "moonshot-identity-manager-app.c"
1272                 }
1273 #line 169 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1274                 _tmp133_ = _data1_->identity;
1275 #line 169 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1276                 if (_tmp133_ == NULL) {
1277 #line 170 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1278                         confirm = TRUE;
1279 #line 1280 "moonshot-identity-manager-app.c"
1280                 }
1281 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1282                 _tmp135_ = confirm;
1283 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1284                 if (_tmp135_) {
1285 #line 1286 "moonshot-identity-manager-app.c"
1286                         IdentityManagerView* _tmp136_;
1287 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1288                         _tmp136_ = self->priv->view;
1289 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1290                         _tmp134_ = _tmp136_ != NULL;
1291 #line 1292 "moonshot-identity-manager-app.c"
1292                 } else {
1293 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1294                         _tmp134_ = FALSE;
1295 #line 1296 "moonshot-identity-manager-app.c"
1296                 }
1297 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1298                 _tmp137_ = _tmp134_;
1299 #line 174 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1300                 if (_tmp137_) {
1301 #line 1302 "moonshot-identity-manager-app.c"
1302                         IdentityManagerView* _tmp138_;
1303                         IdentityRequest* _tmp139_;
1304 #line 176 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1305                         _tmp138_ = self->priv->view;
1306 #line 176 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1307                         _tmp139_ = _data1_->request;
1308 #line 176 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1309                         identity_manager_view_queue_identity_request (_tmp138_, _tmp139_);
1310 #line 177 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1311                         _g_object_unref0 (nai_provided);
1312 #line 177 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1313                         block1_data_unref (_data1_);
1314 #line 177 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1315                         _data1_ = NULL;
1316 #line 177 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1317                         return;
1318 #line 1319 "moonshot-identity-manager-app.c"
1319                 }
1320 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1321                 _g_object_unref0 (nai_provided);
1322 #line 1323 "moonshot-identity-manager-app.c"
1323         }
1324 #line 182 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1325         g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda4__gsource_func, block1_data_ref (_data1_), block1_data_unref);
1326 #line 183 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1327         block1_data_unref (_data1_);
1328 #line 183 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1329         _data1_ = NULL;
1330 #line 183 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1331         return;
1332 #line 1333 "moonshot-identity-manager-app.c"
1333 }
1334
1335
1336 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern) {
1337         gboolean result = FALSE;
1338         const gchar* _tmp0_;
1339         GPatternSpec* _tmp1_;
1340         GPatternSpec* pspec;
1341         const gchar* _tmp2_;
1342         gboolean _tmp3_ = FALSE;
1343 #line 186 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1344         g_return_val_if_fail (self != NULL, FALSE);
1345 #line 186 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1346         g_return_val_if_fail (service != NULL, FALSE);
1347 #line 186 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1348         g_return_val_if_fail (pattern != NULL, FALSE);
1349 #line 188 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1350         _tmp0_ = pattern;
1351 #line 188 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1352         _tmp1_ = g_pattern_spec_new (_tmp0_);
1353 #line 188 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1354         pspec = _tmp1_;
1355 #line 189 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1356         _tmp2_ = service;
1357 #line 189 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1358         _tmp3_ = g_pattern_match_string (pspec, _tmp2_);
1359 #line 189 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1360         result = _tmp3_;
1361 #line 189 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1362         _g_pattern_spec_free0 (pspec);
1363 #line 189 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1364         return result;
1365 #line 1366 "moonshot-identity-manager-app.c"
1366 }
1367
1368
1369 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn) {
1370         GError * _inner_error_ = NULL;
1371 #line 224 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1372         g_return_if_fail (self != NULL);
1373 #line 224 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1374         g_return_if_fail (conn != NULL);
1375 #line 1376 "moonshot-identity-manager-app.c"
1376         {
1377                 GDBusConnection* _tmp0_;
1378                 MoonshotServer* _tmp1_;
1379 #line 227 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1380                 _tmp0_ = conn;
1381 #line 227 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1382                 _tmp1_ = self->priv->ipc_server;
1383 #line 227 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1384                 moonshot_server_register_object (_tmp1_, _tmp0_, "/org/janet/moonshot", &_inner_error_);
1385 #line 227 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1386                 if (_inner_error_ != NULL) {
1387 #line 1388 "moonshot-identity-manager-app.c"
1388                         goto __catch0_g_error;
1389                 }
1390         }
1391         goto __finally0;
1392         __catch0_g_error:
1393         {
1394                 GError* e = NULL;
1395                 FILE* _tmp2_;
1396                 GError* _tmp3_;
1397                 const gchar* _tmp4_;
1398 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1399                 e = _inner_error_;
1400 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1401                 _inner_error_ = NULL;
1402 #line 231 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1403                 _tmp2_ = stderr;
1404 #line 231 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1405                 _tmp3_ = e;
1406 #line 231 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1407                 _tmp4_ = _tmp3_->message;
1408 #line 231 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1409                 fprintf (_tmp2_, "%s\n", _tmp4_);
1410 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1411                 _g_error_free0 (e);
1412 #line 1413 "moonshot-identity-manager-app.c"
1413         }
1414         __finally0:
1415 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1416         if (_inner_error_ != NULL) {
1417 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1418                 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);
1419 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1420                 g_clear_error (&_inner_error_);
1421 #line 226 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1422                 return;
1423 #line 1424 "moonshot-identity-manager-app.c"
1424         }
1425 }
1426
1427
1428 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1429 #line 238 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1430         identity_manager_app_bus_acquired_cb (self, connection);
1431 #line 1432 "moonshot-identity-manager-app.c"
1432 }
1433
1434
1435 static void __lambda7_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1436 #line 242 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1437         g_return_if_fail (conn != NULL);
1438 #line 242 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1439         g_return_if_fail (name != NULL);
1440 #line 1441 "moonshot-identity-manager-app.c"
1441 }
1442
1443
1444 static void ___lambda7__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1445 #line 238 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1446         __lambda7_ (self, connection, name);
1447 #line 1448 "moonshot-identity-manager-app.c"
1448 }
1449
1450
1451 static void __lambda8_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1452         const gchar* _tmp0_;
1453 #line 243 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1454         g_return_if_fail (conn != NULL);
1455 #line 243 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1456         g_return_if_fail (name != NULL);
1457 #line 244 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1458         _tmp0_ = name;
1459 #line 244 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1460         g_error ("moonshot-identity-manager-app.vala:244: Couldn't own name %s on DBus.", _tmp0_);
1461 #line 1462 "moonshot-identity-manager-app.c"
1462 }
1463
1464
1465 static void ___lambda8__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1466 #line 238 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1467         __lambda8_ (self, connection, name);
1468 #line 1469 "moonshot-identity-manager-app.c"
1469 }
1470
1471
1472 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self) {
1473         MoonshotServer* _tmp0_;
1474 #line 235 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1475         g_return_if_fail (self != NULL);
1476 #line 237 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1477         _tmp0_ = moonshot_server_new (self);
1478 #line 237 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1479         _g_object_unref0 (self->priv->ipc_server);
1480 #line 237 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1481         self->priv->ipc_server = _tmp0_;
1482 #line 238 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1483         g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.janet.Moonshot", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((_identity_manager_app_bus_acquired_cb_gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _identity_manager_app_bus_acquired_cb_gbus_acquired_callback, identity_manager_app_ref (self), identity_manager_app_unref)), (GClosure*) ((___lambda7__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda7__gbus_name_acquired_callback, identity_manager_app_ref (self), identity_manager_app_unref)), (GClosure*) ((___lambda8__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda8__gbus_name_lost_callback, identity_manager_app_ref (self), identity_manager_app_unref)));
1484 #line 1485 "moonshot-identity-manager-app.c"
1485 }
1486
1487
1488 static void value_identity_manager_app_init (GValue* value) {
1489 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1490         value->data[0].v_pointer = NULL;
1491 #line 1492 "moonshot-identity-manager-app.c"
1492 }
1493
1494
1495 static void value_identity_manager_app_free_value (GValue* value) {
1496 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1497         if (value->data[0].v_pointer) {
1498 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1499                 identity_manager_app_unref (value->data[0].v_pointer);
1500 #line 1501 "moonshot-identity-manager-app.c"
1501         }
1502 }
1503
1504
1505 static void value_identity_manager_app_copy_value (const GValue* src_value, GValue* dest_value) {
1506 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1507         if (src_value->data[0].v_pointer) {
1508 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1509                 dest_value->data[0].v_pointer = identity_manager_app_ref (src_value->data[0].v_pointer);
1510 #line 1511 "moonshot-identity-manager-app.c"
1511         } else {
1512 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1513                 dest_value->data[0].v_pointer = NULL;
1514 #line 1515 "moonshot-identity-manager-app.c"
1515         }
1516 }
1517
1518
1519 static gpointer value_identity_manager_app_peek_pointer (const GValue* value) {
1520 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1521         return value->data[0].v_pointer;
1522 #line 1523 "moonshot-identity-manager-app.c"
1523 }
1524
1525
1526 static gchar* value_identity_manager_app_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1527 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1528         if (collect_values[0].v_pointer) {
1529 #line 1530 "moonshot-identity-manager-app.c"
1530                 IdentityManagerApp* object;
1531                 object = collect_values[0].v_pointer;
1532 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1533                 if (object->parent_instance.g_class == NULL) {
1534 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1535                         return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1536 #line 1537 "moonshot-identity-manager-app.c"
1537                 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
1538 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1539                         return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1540 #line 1541 "moonshot-identity-manager-app.c"
1541                 }
1542 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1543                 value->data[0].v_pointer = identity_manager_app_ref (object);
1544 #line 1545 "moonshot-identity-manager-app.c"
1545         } else {
1546 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1547                 value->data[0].v_pointer = NULL;
1548 #line 1549 "moonshot-identity-manager-app.c"
1549         }
1550 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1551         return NULL;
1552 #line 1553 "moonshot-identity-manager-app.c"
1553 }
1554
1555
1556 static gchar* value_identity_manager_app_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1557         IdentityManagerApp** object_p;
1558         object_p = collect_values[0].v_pointer;
1559 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1560         if (!object_p) {
1561 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1562                 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
1563 #line 1564 "moonshot-identity-manager-app.c"
1564         }
1565 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1566         if (!value->data[0].v_pointer) {
1567 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1568                 *object_p = NULL;
1569 #line 1570 "moonshot-identity-manager-app.c"
1570         } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
1571 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1572                 *object_p = value->data[0].v_pointer;
1573 #line 1574 "moonshot-identity-manager-app.c"
1574         } else {
1575 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1576                 *object_p = identity_manager_app_ref (value->data[0].v_pointer);
1577 #line 1578 "moonshot-identity-manager-app.c"
1578         }
1579 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1580         return NULL;
1581 #line 1582 "moonshot-identity-manager-app.c"
1582 }
1583
1584
1585 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
1586         ParamSpecIdentityManagerApp* spec;
1587 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1588         g_return_val_if_fail (g_type_is_a (object_type, TYPE_IDENTITY_MANAGER_APP), NULL);
1589 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1590         spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
1591 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1592         G_PARAM_SPEC (spec)->value_type = object_type;
1593 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1594         return G_PARAM_SPEC (spec);
1595 #line 1596 "moonshot-identity-manager-app.c"
1596 }
1597
1598
1599 gpointer value_get_identity_manager_app (const GValue* value) {
1600 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1601         g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP), NULL);
1602 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1603         return value->data[0].v_pointer;
1604 #line 1605 "moonshot-identity-manager-app.c"
1605 }
1606
1607
1608 void value_set_identity_manager_app (GValue* value, gpointer v_object) {
1609         IdentityManagerApp* old;
1610 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1611         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
1612 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1613         old = value->data[0].v_pointer;
1614 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1615         if (v_object) {
1616 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1617                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
1618 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1619                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
1620 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1621                 value->data[0].v_pointer = v_object;
1622 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1623                 identity_manager_app_ref (value->data[0].v_pointer);
1624 #line 1625 "moonshot-identity-manager-app.c"
1625         } else {
1626 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1627                 value->data[0].v_pointer = NULL;
1628 #line 1629 "moonshot-identity-manager-app.c"
1629         }
1630 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1631         if (old) {
1632 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1633                 identity_manager_app_unref (old);
1634 #line 1635 "moonshot-identity-manager-app.c"
1635         }
1636 }
1637
1638
1639 void value_take_identity_manager_app (GValue* value, gpointer v_object) {
1640         IdentityManagerApp* old;
1641 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1642         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
1643 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1644         old = value->data[0].v_pointer;
1645 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1646         if (v_object) {
1647 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1648                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
1649 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1650                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
1651 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1652                 value->data[0].v_pointer = v_object;
1653 #line 1654 "moonshot-identity-manager-app.c"
1654         } else {
1655 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1656                 value->data[0].v_pointer = NULL;
1657 #line 1658 "moonshot-identity-manager-app.c"
1658         }
1659 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1660         if (old) {
1661 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1662                 identity_manager_app_unref (old);
1663 #line 1664 "moonshot-identity-manager-app.c"
1664         }
1665 }
1666
1667
1668 static void identity_manager_app_class_init (IdentityManagerAppClass * klass) {
1669 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1670         identity_manager_app_parent_class = g_type_class_peek_parent (klass);
1671 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1672         IDENTITY_MANAGER_APP_CLASS (klass)->finalize = identity_manager_app_finalize;
1673 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1674         g_type_class_add_private (klass, sizeof (IdentityManagerAppPrivate));
1675 #line 1676 "moonshot-identity-manager-app.c"
1676 }
1677
1678
1679 static void identity_manager_app_instance_init (IdentityManagerApp * self) {
1680 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1681         self->priv = IDENTITY_MANAGER_APP_GET_PRIVATE (self);
1682 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1683         self->ref_count = 1;
1684 #line 1685 "moonshot-identity-manager-app.c"
1685 }
1686
1687
1688 static void identity_manager_app_finalize (IdentityManagerApp* obj) {
1689         IdentityManagerApp * self;
1690 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1691         self = IDENTITY_MANAGER_APP (obj);
1692 #line 6 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1693         _g_object_unref0 (self->model);
1694 #line 7 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1695         _g_object_unref0 (self->default_id_card);
1696 #line 8 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1697         _g_object_unref0 (self->priv->view);
1698 #line 9 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1699         _g_object_unref0 (self->priv->ipc_server);
1700 #line 1701 "moonshot-identity-manager-app.c"
1701 }
1702
1703
1704 GType identity_manager_app_get_type (void) {
1705         static volatile gsize identity_manager_app_type_id__volatile = 0;
1706         if (g_once_init_enter (&identity_manager_app_type_id__volatile)) {
1707                 static const GTypeValueTable g_define_type_value_table = { value_identity_manager_app_init, value_identity_manager_app_free_value, value_identity_manager_app_copy_value, value_identity_manager_app_peek_pointer, "p", value_identity_manager_app_collect_value, "p", value_identity_manager_app_lcopy_value };
1708                 static const GTypeInfo g_define_type_info = { sizeof (IdentityManagerAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) identity_manager_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IdentityManagerApp), 0, (GInstanceInitFunc) identity_manager_app_instance_init, &g_define_type_value_table };
1709                 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
1710                 GType identity_manager_app_type_id;
1711                 identity_manager_app_type_id = g_type_register_fundamental (g_type_fundamental_next (), "IdentityManagerApp", &g_define_type_info, &g_define_type_fundamental_info, 0);
1712                 g_once_init_leave (&identity_manager_app_type_id__volatile, identity_manager_app_type_id);
1713         }
1714         return identity_manager_app_type_id__volatile;
1715 }
1716
1717
1718 gpointer identity_manager_app_ref (gpointer instance) {
1719         IdentityManagerApp* self;
1720         self = instance;
1721 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1722         g_atomic_int_inc (&self->ref_count);
1723 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1724         return instance;
1725 #line 1726 "moonshot-identity-manager-app.c"
1726 }
1727
1728
1729 void identity_manager_app_unref (gpointer instance) {
1730         IdentityManagerApp* self;
1731         self = instance;
1732 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1733         if (g_atomic_int_dec_and_test (&self->ref_count)) {
1734 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1735                 IDENTITY_MANAGER_APP_GET_CLASS (self)->finalize (self);
1736 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1737                 g_type_free_instance ((GTypeInstance *) self);
1738 #line 1739 "moonshot-identity-manager-app.c"
1739         }
1740 }
1741
1742
1743 gint _vala_main (gchar** args, int args_length1) {
1744         gint result = 0;
1745         const gchar* _tmp0_ = NULL;
1746         gboolean headless;
1747         gboolean _tmp1_;
1748         gboolean _tmp2_;
1749         IdentityManagerApp* _tmp3_;
1750         IdentityManagerApp* app;
1751         IdentityManagerApp* _tmp4_;
1752         gboolean _tmp5_;
1753 #line 255 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1754         _tmp0_ = g_getenv ("DISPLAY");
1755 #line 255 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1756         headless = _tmp0_ == NULL;
1757 #line 257 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1758         _tmp1_ = headless;
1759 #line 257 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1760         if (!_tmp1_) {
1761 #line 258 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1762                 gtk_init (&args_length1, &args);
1763 #line 1764 "moonshot-identity-manager-app.c"
1764         }
1765 #line 267 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1766         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
1767 #line 268 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1768         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
1769 #line 269 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1770         textdomain (GETTEXT_PACKAGE);
1771 #line 272 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1772         _tmp2_ = headless;
1773 #line 272 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1774         _tmp3_ = identity_manager_app_new (_tmp2_);
1775 #line 272 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1776         app = _tmp3_;
1777 #line 274 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1778         _tmp4_ = app;
1779 #line 274 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1780         identity_manager_app_show (_tmp4_);
1781 #line 276 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1782         _tmp5_ = headless;
1783 #line 276 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1784         if (_tmp5_) {
1785 #line 1786 "moonshot-identity-manager-app.c"
1786                 GMainLoop* _tmp6_;
1787                 GMainLoop* loop;
1788                 GMainLoop* _tmp7_;
1789 #line 278 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1790                 _tmp6_ = g_main_loop_new (NULL, FALSE);
1791 #line 278 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1792                 loop = _tmp6_;
1793 #line 279 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1794                 _tmp7_ = loop;
1795 #line 279 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1796                 g_main_loop_run (_tmp7_);
1797 #line 276 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1798                 _g_main_loop_unref0 (loop);
1799 #line 1800 "moonshot-identity-manager-app.c"
1800         } else {
1801 #line 282 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1802                 gtk_main ();
1803 #line 1804 "moonshot-identity-manager-app.c"
1804         }
1805 #line 285 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1806         result = 0;
1807 #line 285 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1808         _identity_manager_app_unref0 (app);
1809 #line 285 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1810         return result;
1811 #line 1812 "moonshot-identity-manager-app.c"
1812 }
1813
1814
1815 int main (int argc, char ** argv) {
1816 #line 251 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1817         g_type_init ();
1818 #line 251 "/build/slave/packages-full/build/ui/src/moonshot-identity-manager-app.vala"
1819         return _vala_main (argv, argc);
1820 #line 1821 "moonshot-identity-manager-app.c"
1821 }
1822
1823
1824 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1825         if ((array != NULL) && (destroy_func != NULL)) {
1826                 int i;
1827                 for (i = 0; i < array_length; i = i + 1) {
1828                         if (((gpointer*) array)[i] != NULL) {
1829                                 destroy_func (((gpointer*) array)[i]);
1830                         }
1831                 }
1832         }
1833 }
1834
1835
1836 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1837         _vala_array_destroy (array, array_length, destroy_func);
1838         g_free (array);
1839 }
1840
1841
1842