e4d52a95d08f1d8c4ee32d1d0ab36b8dcf006d75
[moonshot-ui.git] / src / moonshot-identity-manager-app.c
1 /* moonshot-identity-manager-app.c generated by valac 0.24.0, the Vala compiler
2  * generated from moonshot-identity-manager-app.vala, do not modify */
3
4 /*
5  * Copyright (c) 2011-2014, JANET(UK)
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of JANET(UK) nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34 */
35
36 #include <glib.h>
37 #include <glib-object.h>
38 #include <gio/gio.h>
39 #include <string.h>
40 #include <gtk/gtk.h>
41 #include <gnome-keyring.h>
42 #include <gee.h>
43 #include <stdlib.h>
44 #include <stdio.h>
45 #include <glib/gi18n-lib.h>
46 #include "config.h"
47 #include <gobject/gvaluecollector.h>
48
49
50 #define TYPE_IIDENTITY_MANAGER (iidentity_manager_get_type ())
51 #define IIDENTITY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IIDENTITY_MANAGER, IIdentityManager))
52 #define IS_IIDENTITY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IIDENTITY_MANAGER))
53 #define IIDENTITY_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IIDENTITY_MANAGER, IIdentityManagerIface))
54
55 typedef struct _IIdentityManager IIdentityManager;
56 typedef struct _IIdentityManagerIface IIdentityManagerIface;
57
58 #define TYPE_IIDENTITY_MANAGER_PROXY (iidentity_manager_proxy_get_type ())
59 typedef GDBusProxy IIdentityManagerProxy;
60 typedef GDBusProxyClass IIdentityManagerProxyClass;
61
62 #define TYPE_IDENTITY_MANAGER_APP (identity_manager_app_get_type ())
63 #define IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp))
64 #define IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
65 #define IS_IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_APP))
66 #define IS_IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_APP))
67 #define IDENTITY_MANAGER_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
68
69 typedef struct _IdentityManagerApp IdentityManagerApp;
70 typedef struct _IdentityManagerAppClass IdentityManagerAppClass;
71 typedef struct _IdentityManagerAppPrivate IdentityManagerAppPrivate;
72
73 #define TYPE_IDENTITY_MANAGER_MODEL (identity_manager_model_get_type ())
74 #define IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModel))
75 #define IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
76 #define IS_IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_MODEL))
77 #define IS_IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_MODEL))
78 #define IDENTITY_MANAGER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
79
80 typedef struct _IdentityManagerModel IdentityManagerModel;
81 typedef struct _IdentityManagerModelClass IdentityManagerModelClass;
82
83 #define TYPE_ID_CARD (id_card_get_type ())
84 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
85 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
86 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
87 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
88 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
89
90 typedef struct _IdCard IdCard;
91 typedef struct _IdCardClass IdCardClass;
92
93 #define TYPE_IDENTITY_MANAGER_VIEW (identity_manager_view_get_type ())
94 #define IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerView))
95 #define IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
96 #define IS_IDENTITY_MANAGER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_VIEW))
97 #define IS_IDENTITY_MANAGER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_VIEW))
98 #define IDENTITY_MANAGER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_VIEW, IdentityManagerViewClass))
99
100 typedef struct _IdentityManagerView IdentityManagerView;
101 typedef struct _IdentityManagerViewClass IdentityManagerViewClass;
102
103 #define TYPE_MOONSHOT_SERVER (moonshot_server_get_type ())
104 #define MOONSHOT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOONSHOT_SERVER, MoonshotServer))
105 #define MOONSHOT_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOONSHOT_SERVER, MoonshotServerClass))
106 #define IS_MOONSHOT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOONSHOT_SERVER))
107 #define IS_MOONSHOT_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOONSHOT_SERVER))
108 #define MOONSHOT_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOONSHOT_SERVER, MoonshotServerClass))
109
110 typedef struct _MoonshotServer MoonshotServer;
111 typedef struct _MoonshotServerClass MoonshotServerClass;
112 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
113
114 #define IIDENTITY_CARD_STORE_TYPE_STORE_TYPE (iidentity_card_store_store_type_get_type ())
115
116 #define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
117 #define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
118 #define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
119 #define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
120 #define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
121 #define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
122
123 typedef struct _IdentityRequest IdentityRequest;
124 typedef struct _IdentityRequestClass IdentityRequestClass;
125 typedef struct _Block1Data Block1Data;
126 #define _identity_manager_app_unref0(var) ((var == NULL) ? NULL : (var = (identity_manager_app_unref (var), NULL)))
127 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
128 #define _g_free0(var) (var = (g_free (var), NULL))
129 #define __g_slist_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_free0_ (var), NULL)))
130
131 #define TYPE_RULE (rule_get_type ())
132 typedef struct _Rule Rule;
133 #define _g_pattern_spec_free0(var) ((var == NULL) ? NULL : (var = (g_pattern_spec_free (var), NULL)))
134 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
135 typedef struct _ParamSpecIdentityManagerApp ParamSpecIdentityManagerApp;
136 #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
137 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
138
139 struct _IIdentityManagerIface {
140         GTypeInterface parent_iface;
141         gboolean (*show_ui) (IIdentityManager* self, GError** error);
142 };
143
144 struct _IdentityManagerApp {
145         GTypeInstance parent_instance;
146         volatile int ref_count;
147         IdentityManagerAppPrivate * priv;
148         IdentityManagerModel* model;
149         IdCard* default_id_card;
150         gboolean explicitly_launched;
151         IdentityManagerView* view;
152 };
153
154 struct _IdentityManagerAppClass {
155         GTypeClass parent_class;
156         void (*finalize) (IdentityManagerApp *self);
157 };
158
159 struct _IdentityManagerAppPrivate {
160         MoonshotServer* ipc_server;
161 };
162
163 typedef enum  {
164         IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE,
165         IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING
166 } IIdentityCardStoreStoreType;
167
168 struct _Block1Data {
169         int _ref_count_;
170         IdentityManagerApp* self;
171         IdCard* identity;
172         IdentityRequest* request;
173 };
174
175 struct _IdentityRequest {
176         GObject parent_instance;
177         IdentityRequestPrivate * priv;
178         IdCard* id_card;
179         gboolean complete;
180         gboolean select_default;
181         gchar* nai;
182         gchar* password;
183         gchar* service;
184         GSList* candidates;
185 };
186
187 struct _IdentityRequestClass {
188         GObjectClass parent_class;
189 };
190
191 struct _Rule {
192         gchar* pattern;
193         gchar* always_confirm;
194 };
195
196 struct _ParamSpecIdentityManagerApp {
197         GParamSpec parent_instance;
198 };
199
200
201 static gpointer identity_manager_app_parent_class = NULL;
202 extern gboolean explicitly_launched;
203 gboolean explicitly_launched = TRUE;
204 extern gboolean use_flat_file_store;
205 gboolean use_flat_file_store = FALSE;
206 extern gboolean gtk_available;
207
208 GType iidentity_manager_proxy_get_type (void) G_GNUC_CONST;
209 guint iidentity_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
210 GType iidentity_manager_get_type (void) G_GNUC_CONST;
211 gboolean iidentity_manager_show_ui (IIdentityManager* self, GError** error);
212 static void iidentity_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
213 static gboolean iidentity_manager_proxy_show_ui (IIdentityManager* self, GError** error);
214 static void iidentity_manager_proxy_iidentity_manager_interface_init (IIdentityManagerIface* iface);
215 static void _dbus_iidentity_manager_show_ui (IIdentityManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
216 static void iidentity_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
217 static GVariant* iidentity_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
218 static gboolean iidentity_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
219 static void _iidentity_manager_unregister_object (gpointer user_data);
220 gpointer identity_manager_app_ref (gpointer instance);
221 void identity_manager_app_unref (gpointer instance);
222 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
223 void value_set_identity_manager_app (GValue* value, gpointer v_object);
224 void value_take_identity_manager_app (GValue* value, gpointer v_object);
225 gpointer value_get_identity_manager_app (const GValue* value);
226 GType identity_manager_app_get_type (void) G_GNUC_CONST;
227 GType identity_manager_model_get_type (void) G_GNUC_CONST;
228 GType id_card_get_type (void) G_GNUC_CONST;
229 GType identity_manager_view_get_type (void) G_GNUC_CONST;
230 GType moonshot_server_get_type (void) G_GNUC_CONST;
231 guint moonshot_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
232 #define IDENTITY_MANAGER_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppPrivate))
233 enum  {
234         IDENTITY_MANAGER_APP_DUMMY_PROPERTY
235 };
236 #define IDENTITY_MANAGER_APP_WINDOW_WIDTH 400
237 #define IDENTITY_MANAGER_APP_WINDOW_HEIGHT 500
238 void identity_manager_app_show (IdentityManagerApp* self);
239 IdentityManagerApp* identity_manager_app_new (gboolean headless, gboolean use_flat_file_store);
240 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless, gboolean use_flat_file_store);
241 gboolean UserForcesFlatFileStore (void);
242 GType iidentity_card_store_store_type_get_type (void) G_GNUC_CONST;
243 IdentityManagerModel* identity_manager_model_new (IdentityManagerApp* parent_app, IIdentityCardStoreStoreType store_type);
244 IdentityManagerModel* identity_manager_model_construct (GType object_type, IdentityManagerApp* parent_app, IIdentityCardStoreStoreType store_type);
245 gboolean identity_manager_model_HasNonTrivialIdentities (IdentityManagerModel* self);
246 void identity_manager_model_set_store_type (IdentityManagerModel* self, IIdentityCardStoreStoreType type);
247 IdentityManagerView* identity_manager_view_new (IdentityManagerApp* app);
248 IdentityManagerView* identity_manager_view_construct (GType object_type, IdentityManagerApp* app);
249 GeeLinkedList* identity_manager_model_get_card_list (IdentityManagerModel* self);
250 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self);
251 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id, gboolean force_flat_file_store);
252 gboolean identity_manager_view_add_identity (IdentityManagerView* self, IdCard* id_card, gboolean force_flat_file_store);
253 void identity_manager_model_add_card (IdentityManagerModel* self, IdCard* card, gboolean force_flat_file_store);
254 GType identity_request_get_type (void) G_GNUC_CONST;
255 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request);
256 static Block1Data* block1_data_ref (Block1Data* _data1_);
257 static void block1_data_unref (void * _userdata_);
258 const gchar* id_card_get_nai (IdCard* self);
259 gchar** id_card_get_services (IdCard* self, int* result_length1);
260 static void _g_free0_ (gpointer var);
261 static void _g_slist_free__g_free0_ (GSList* self);
262 void id_card_set_services (IdCard* self, gchar** value, int value_length1);
263 GType rule_get_type (void) G_GNUC_CONST;
264 Rule* rule_dup (const Rule* self);
265 void rule_free (Rule* self);
266 void rule_copy (const Rule* self, Rule* dest);
267 void rule_destroy (Rule* self);
268 Rule* id_card_get_rules (IdCard* self, int* result_length1);
269 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern);
270 IdCard* id_card_new (void);
271 IdCard* id_card_construct (GType object_type);
272 void id_card_set_display_name (IdCard* self, const gchar* value);
273 void id_card_set_username (IdCard* self, const gchar* value);
274 void id_card_set_issuer (IdCard* self, const gchar* value);
275 void id_card_set_password (IdCard* self, const gchar* value);
276 void id_card_set_temporary (IdCard* self, gboolean value);
277 void identity_manager_view_queue_identity_request (IdentityManagerView* self, IdentityRequest* request);
278 static gboolean __lambda6_ (Block1Data* _data1_);
279 IdCard* identity_manager_view_check_add_password (IdentityManagerView* self, IdCard* identity, IdentityRequest* request, IdentityManagerModel* model);
280 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card);
281 static gboolean ___lambda6__gsource_func (gpointer self);
282 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn);
283 MoonshotServer* moonshot_server_new (IdentityManagerApp* app);
284 MoonshotServer* moonshot_server_construct (GType object_type, IdentityManagerApp* app);
285 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
286 static void __lambda9_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
287 static void ___lambda9__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
288 static void __lambda10_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
289 static void ___lambda10__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
290 static void identity_manager_app_finalize (IdentityManagerApp* obj);
291 gint _vala_main (gchar** args, int args_length1);
292 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
293 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
294 static gint _vala_array_length (gpointer array);
295
296 static const GDBusArgInfo _iidentity_manager_dbus_arg_info_show_ui_result = {-1, "result", "b"};
297 static const GDBusArgInfo * const _iidentity_manager_dbus_arg_info_show_ui_in[] = {NULL};
298 static const GDBusArgInfo * const _iidentity_manager_dbus_arg_info_show_ui_out[] = {&_iidentity_manager_dbus_arg_info_show_ui_result, NULL};
299 static const GDBusMethodInfo _iidentity_manager_dbus_method_info_show_ui = {-1, "ShowUi", (GDBusArgInfo **) (&_iidentity_manager_dbus_arg_info_show_ui_in), (GDBusArgInfo **) (&_iidentity_manager_dbus_arg_info_show_ui_out)};
300 static const GDBusMethodInfo * const _iidentity_manager_dbus_method_info[] = {&_iidentity_manager_dbus_method_info_show_ui, NULL};
301 static const GDBusSignalInfo * const _iidentity_manager_dbus_signal_info[] = {NULL};
302 static const GDBusPropertyInfo * const _iidentity_manager_dbus_property_info[] = {NULL};
303 static const GDBusInterfaceInfo _iidentity_manager_dbus_interface_info = {-1, "org.janet.Moonshot", (GDBusMethodInfo **) (&_iidentity_manager_dbus_method_info), (GDBusSignalInfo **) (&_iidentity_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_iidentity_manager_dbus_property_info)};
304 static const GDBusInterfaceVTable _iidentity_manager_dbus_interface_vtable = {iidentity_manager_dbus_interface_method_call, iidentity_manager_dbus_interface_get_property, iidentity_manager_dbus_interface_set_property};
305 const GOptionEntry options[3] = {{"dbus-launched", (gchar) 0, (gint) G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &explicitly_launched, "launch for dbus rpc use", NULL}, {"flat-file-store", (gchar) 0, 0, G_OPTION_ARG_NONE, &use_flat_file_store, "force use of flat file identity store (used by default only for headle" \
306 "ss operation)", NULL}, {NULL}};
307
308 gboolean iidentity_manager_show_ui (IIdentityManager* self, GError** error) {
309 #line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
310         g_return_val_if_fail (self != NULL, FALSE);
311 #line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
312         return IIDENTITY_MANAGER_GET_INTERFACE (self)->show_ui (self, error);
313 #line 313 "moonshot-identity-manager-app.c"
314 }
315
316
317 static void iidentity_manager_base_init (IIdentityManagerIface * iface) {
318 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
319         static gboolean initialized = FALSE;
320 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
321         if (!initialized) {
322 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
323                 initialized = TRUE;
324 #line 324 "moonshot-identity-manager-app.c"
325         }
326 }
327
328
329 GType iidentity_manager_get_type (void) {
330         static volatile gsize iidentity_manager_type_id__volatile = 0;
331         if (g_once_init_enter (&iidentity_manager_type_id__volatile)) {
332                 static const GTypeInfo g_define_type_info = { sizeof (IIdentityManagerIface), (GBaseInitFunc) iidentity_manager_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
333                 GType iidentity_manager_type_id;
334                 iidentity_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "IIdentityManager", &g_define_type_info, 0);
335                 g_type_interface_add_prerequisite (iidentity_manager_type_id, G_TYPE_OBJECT);
336                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) iidentity_manager_proxy_get_type);
337                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.janet.Moonshot");
338                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) iidentity_manager_register_object);
339                 g_once_init_leave (&iidentity_manager_type_id__volatile, iidentity_manager_type_id);
340         }
341         return iidentity_manager_type_id__volatile;
342 }
343
344
345 G_DEFINE_TYPE_EXTENDED (IIdentityManagerProxy, iidentity_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_IIDENTITY_MANAGER, iidentity_manager_proxy_iidentity_manager_interface_init) )
346 static void iidentity_manager_proxy_class_init (IIdentityManagerProxyClass* klass) {
347         G_DBUS_PROXY_CLASS (klass)->g_signal = iidentity_manager_proxy_g_signal;
348 }
349
350
351 static void iidentity_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
352 }
353
354
355 static void iidentity_manager_proxy_init (IIdentityManagerProxy* self) {
356 }
357
358
359 static gboolean iidentity_manager_proxy_show_ui (IIdentityManager* self, GError** error) {
360         GDBusMessage *_message;
361         GVariant *_arguments;
362         GVariantBuilder _arguments_builder;
363         GDBusMessage *_reply_message;
364         GVariant *_reply;
365         GVariantIter _reply_iter;
366         gboolean _result;
367         GVariant* _tmp0_;
368         G_IO_ERROR;
369         _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.janet.Moonshot", "ShowUi");
370         g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
371         _arguments = g_variant_builder_end (&_arguments_builder);
372         g_dbus_message_set_body (_message, _arguments);
373         _reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
374         g_object_unref (_message);
375         if (!_reply_message) {
376                 return FALSE;
377         }
378         if (g_dbus_message_to_gerror (_reply_message, error)) {
379                 g_object_unref (_reply_message);
380                 return FALSE;
381         }
382         _reply = g_dbus_message_get_body (_reply_message);
383         g_variant_iter_init (&_reply_iter, _reply);
384         _tmp0_ = g_variant_iter_next_value (&_reply_iter);
385         _result = g_variant_get_boolean (_tmp0_);
386         g_variant_unref (_tmp0_);
387         g_object_unref (_reply_message);
388         return _result;
389 }
390
391
392 static void iidentity_manager_proxy_iidentity_manager_interface_init (IIdentityManagerIface* iface) {
393         iface->show_ui = iidentity_manager_proxy_show_ui;
394 }
395
396
397 static void _dbus_iidentity_manager_show_ui (IIdentityManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
398         GError* error = NULL;
399         GVariantIter _arguments_iter;
400         GDBusMessage* _reply_message;
401         GVariant* _reply;
402         GVariantBuilder _reply_builder;
403         gboolean result;
404         g_variant_iter_init (&_arguments_iter, _parameters_);
405         result = iidentity_manager_show_ui (self, &error);
406         if (error) {
407                 g_dbus_method_invocation_return_gerror (invocation, error);
408                 return;
409         }
410         _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
411         g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
412         g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
413         _reply = g_variant_builder_end (&_reply_builder);
414         g_dbus_message_set_body (_reply_message, _reply);
415         g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
416         g_object_unref (invocation);
417         g_object_unref (_reply_message);
418 }
419
420
421 static void iidentity_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
422         gpointer* data;
423         gpointer object;
424         data = user_data;
425         object = data[0];
426         if (strcmp (method_name, "ShowUi") == 0) {
427                 _dbus_iidentity_manager_show_ui (object, parameters, invocation);
428         } else {
429                 g_object_unref (invocation);
430         }
431 }
432
433
434 static GVariant* iidentity_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
435         gpointer* data;
436         gpointer object;
437         data = user_data;
438         object = data[0];
439         return NULL;
440 }
441
442
443 static gboolean iidentity_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
444         gpointer* data;
445         gpointer object;
446         data = user_data;
447         object = data[0];
448         return FALSE;
449 }
450
451
452 guint iidentity_manager_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
453         guint result;
454         gpointer *data;
455         data = g_new (gpointer, 3);
456         data[0] = g_object_ref (object);
457         data[1] = g_object_ref (connection);
458         data[2] = g_strdup (path);
459         result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_iidentity_manager_dbus_interface_info), &_iidentity_manager_dbus_interface_vtable, data, _iidentity_manager_unregister_object, error);
460         if (!result) {
461                 return 0;
462         }
463         return result;
464 }
465
466
467 static void _iidentity_manager_unregister_object (gpointer user_data) {
468         gpointer* data;
469         data = user_data;
470         g_object_unref (data[0]);
471         g_object_unref (data[1]);
472         g_free (data[2]);
473         g_free (data);
474 }
475
476
477 void identity_manager_app_show (IdentityManagerApp* self) {
478         IdentityManagerView* _tmp0_ = NULL;
479 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
480         g_return_if_fail (self != NULL);
481 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
482         _tmp0_ = self->view;
483 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
484         if (_tmp0_ != NULL) {
485 #line 485 "moonshot-identity-manager-app.c"
486                 IdentityManagerView* _tmp1_ = NULL;
487 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
488                 _tmp1_ = self->view;
489 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
490                 gtk_widget_show ((GtkWidget*) _tmp1_);
491 #line 491 "moonshot-identity-manager-app.c"
492         }
493 }
494
495
496 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless, gboolean use_flat_file_store) {
497         IdentityManagerApp* self = NULL;
498         gboolean _tmp0_ = FALSE;
499         gboolean _tmp1_ = FALSE;
500         gboolean _tmp2_ = FALSE;
501         gboolean _tmp3_ = FALSE;
502         gboolean keyring_available = FALSE;
503         IIdentityCardStoreStoreType store_type = 0;
504         gboolean _tmp5_ = FALSE;
505         gboolean _tmp6_ = FALSE;
506         gboolean _tmp7_ = FALSE;
507         IIdentityCardStoreStoreType _tmp10_ = 0;
508         IdentityManagerModel* _tmp11_ = NULL;
509         gboolean _tmp12_ = FALSE;
510         gboolean _tmp13_ = FALSE;
511         gboolean _tmp14_ = FALSE;
512         gboolean _tmp15_ = FALSE;
513         gboolean _tmp21_ = FALSE;
514         GeeLinkedList* card_list = NULL;
515         IdentityManagerModel* _tmp23_ = NULL;
516         GeeLinkedList* _tmp24_ = NULL;
517         GeeLinkedList* _tmp25_ = NULL;
518         gint _tmp26_ = 0;
519         gint _tmp27_ = 0;
520 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
521         self = (IdentityManagerApp*) g_type_create_instance (object_type);
522 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
523         _tmp0_ = use_flat_file_store;
524 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
525         _tmp1_ = UserForcesFlatFileStore ();
526 #line 74 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
527         use_flat_file_store = _tmp0_ | _tmp1_;
528 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
529         _tmp3_ = use_flat_file_store;
530 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
531         if (!_tmp3_) {
532 #line 532 "moonshot-identity-manager-app.c"
533                 gboolean _tmp4_ = FALSE;
534 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
535                 _tmp4_ = gnome_keyring_is_available ();
536 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
537                 _tmp2_ = _tmp4_;
538 #line 538 "moonshot-identity-manager-app.c"
539         } else {
540 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
541                 _tmp2_ = FALSE;
542 #line 542 "moonshot-identity-manager-app.c"
543         }
544 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
545         keyring_available = _tmp2_;
546 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
547         _tmp7_ = headless;
548 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
549         if (_tmp7_) {
550 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
551                 _tmp6_ = TRUE;
552 #line 552 "moonshot-identity-manager-app.c"
553         } else {
554                 gboolean _tmp8_ = FALSE;
555 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
556                 _tmp8_ = use_flat_file_store;
557 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
558                 _tmp6_ = _tmp8_;
559 #line 559 "moonshot-identity-manager-app.c"
560         }
561 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
562         if (_tmp6_) {
563 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
564                 _tmp5_ = TRUE;
565 #line 565 "moonshot-identity-manager-app.c"
566         } else {
567                 gboolean _tmp9_ = FALSE;
568 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
569                 _tmp9_ = keyring_available;
570 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
571                 _tmp5_ = !_tmp9_;
572 #line 572 "moonshot-identity-manager-app.c"
573         }
574 #line 81 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
575         if (_tmp5_) {
576 #line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
577                 store_type = IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE;
578 #line 578 "moonshot-identity-manager-app.c"
579         } else {
580 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
581                 store_type = IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING;
582 #line 582 "moonshot-identity-manager-app.c"
583         }
584 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
585         _tmp10_ = store_type;
586 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
587         _tmp11_ = identity_manager_model_new (self, _tmp10_);
588 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
589         _g_object_unref0 (self->model);
590 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
591         self->model = _tmp11_;
592 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
593         _tmp15_ = headless;
594 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
595         if (_tmp15_) {
596 #line 596 "moonshot-identity-manager-app.c"
597                 gboolean _tmp16_ = FALSE;
598 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
599                 _tmp16_ = keyring_available;
600 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
601                 _tmp14_ = _tmp16_;
602 #line 602 "moonshot-identity-manager-app.c"
603         } else {
604 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
605                 _tmp14_ = FALSE;
606 #line 606 "moonshot-identity-manager-app.c"
607         }
608 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
609         if (_tmp14_) {
610 #line 610 "moonshot-identity-manager-app.c"
611                 gboolean _tmp17_ = FALSE;
612 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
613                 _tmp17_ = use_flat_file_store;
614 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
615                 _tmp13_ = !_tmp17_;
616 #line 616 "moonshot-identity-manager-app.c"
617         } else {
618 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
619                 _tmp13_ = FALSE;
620 #line 620 "moonshot-identity-manager-app.c"
621         }
622 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
623         if (_tmp13_) {
624 #line 624 "moonshot-identity-manager-app.c"
625                 IdentityManagerModel* _tmp18_ = NULL;
626                 gboolean _tmp19_ = FALSE;
627 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
628                 _tmp18_ = self->model;
629 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
630                 _tmp19_ = identity_manager_model_HasNonTrivialIdentities (_tmp18_);
631 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
632                 _tmp12_ = !_tmp19_;
633 #line 633 "moonshot-identity-manager-app.c"
634         } else {
635 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
636                 _tmp12_ = FALSE;
637 #line 637 "moonshot-identity-manager-app.c"
638         }
639 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
640         if (_tmp12_) {
641 #line 641 "moonshot-identity-manager-app.c"
642                 IdentityManagerModel* _tmp20_ = NULL;
643 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
644                 _tmp20_ = self->model;
645 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
646                 identity_manager_model_set_store_type (_tmp20_, IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING);
647 #line 647 "moonshot-identity-manager-app.c"
648         }
649 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
650         _tmp21_ = headless;
651 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
652         if (!_tmp21_) {
653 #line 653 "moonshot-identity-manager-app.c"
654                 IdentityManagerView* _tmp22_ = NULL;
655 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
656                 _tmp22_ = identity_manager_view_new (self);
657 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
658                 g_object_ref_sink (_tmp22_);
659 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
660                 _g_object_unref0 (self->view);
661 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
662                 self->view = _tmp22_;
663 #line 663 "moonshot-identity-manager-app.c"
664         }
665 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
666         _tmp23_ = self->model;
667 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
668         _tmp24_ = identity_manager_model_get_card_list (_tmp23_);
669 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
670         card_list = _tmp24_;
671 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
672         _tmp25_ = card_list;
673 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
674         _tmp26_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp25_);
675 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
676         _tmp27_ = _tmp26_;
677 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
678         if (_tmp27_ > 0) {
679 #line 679 "moonshot-identity-manager-app.c"
680                 GeeLinkedList* _tmp28_ = NULL;
681                 gpointer _tmp29_ = NULL;
682 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
683                 _tmp28_ = card_list;
684 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
685                 _tmp29_ = gee_abstract_list_last ((GeeAbstractList*) _tmp28_);
686 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
687                 _g_object_unref0 (self->default_id_card);
688 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
689                 self->default_id_card = (IdCard*) _tmp29_;
690 #line 690 "moonshot-identity-manager-app.c"
691         }
692 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
693         identity_manager_app_init_ipc_server (self);
694 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
695         _g_object_unref0 (card_list);
696 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
697         return self;
698 #line 698 "moonshot-identity-manager-app.c"
699 }
700
701
702 IdentityManagerApp* identity_manager_app_new (gboolean headless, gboolean use_flat_file_store) {
703 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
704         return identity_manager_app_construct (TYPE_IDENTITY_MANAGER_APP, headless, use_flat_file_store);
705 #line 705 "moonshot-identity-manager-app.c"
706 }
707
708
709 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id, gboolean force_flat_file_store) {
710         gboolean result = FALSE;
711         IdentityManagerView* _tmp0_ = NULL;
712         IdentityManagerModel* _tmp5_ = NULL;
713         IdCard* _tmp6_ = NULL;
714         gboolean _tmp7_ = FALSE;
715 #line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
716         g_return_val_if_fail (self != NULL, FALSE);
717 #line 111 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
718         g_return_val_if_fail (id != NULL, FALSE);
719 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
720         _tmp0_ = self->view;
721 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
722         if (_tmp0_ != NULL) {
723 #line 723 "moonshot-identity-manager-app.c"
724                 IdentityManagerView* _tmp1_ = NULL;
725                 IdCard* _tmp2_ = NULL;
726                 gboolean _tmp3_ = FALSE;
727                 gboolean _tmp4_ = FALSE;
728 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
729                 _tmp1_ = self->view;
730 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
731                 _tmp2_ = id;
732 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
733                 _tmp3_ = force_flat_file_store;
734 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
735                 _tmp4_ = identity_manager_view_add_identity (_tmp1_, _tmp2_, _tmp3_);
736 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
737                 result = _tmp4_;
738 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
739                 return result;
740 #line 740 "moonshot-identity-manager-app.c"
741         }
742 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
743         _tmp5_ = self->model;
744 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
745         _tmp6_ = id;
746 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
747         _tmp7_ = force_flat_file_store;
748 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
749         identity_manager_model_add_card (_tmp5_, _tmp6_, _tmp7_);
750 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
751         result = TRUE;
752 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
753         return result;
754 #line 754 "moonshot-identity-manager-app.c"
755 }
756
757
758 static gpointer _g_object_ref0 (gpointer self) {
759 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
760         return self ? g_object_ref (self) : NULL;
761 #line 761 "moonshot-identity-manager-app.c"
762 }
763
764
765 static Block1Data* block1_data_ref (Block1Data* _data1_) {
766 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
767         g_atomic_int_inc (&_data1_->_ref_count_);
768 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
769         return _data1_;
770 #line 770 "moonshot-identity-manager-app.c"
771 }
772
773
774 static void block1_data_unref (void * _userdata_) {
775         Block1Data* _data1_;
776         _data1_ = (Block1Data*) _userdata_;
777 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
778         if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
779 #line 779 "moonshot-identity-manager-app.c"
780                 IdentityManagerApp* self;
781 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
782                 self = _data1_->self;
783 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
784                 _g_object_unref0 (_data1_->identity);
785 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
786                 _g_object_unref0 (_data1_->request);
787 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
788                 _identity_manager_app_unref0 (self);
789 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
790                 g_slice_free (Block1Data, _data1_);
791 #line 791 "moonshot-identity-manager-app.c"
792         }
793 }
794
795
796 static void _g_free0_ (gpointer var) {
797 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
798         var = (g_free (var), NULL);
799 #line 799 "moonshot-identity-manager-app.c"
800 }
801
802
803 static void _g_slist_free__g_free0_ (GSList* self) {
804 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
805         g_slist_foreach (self, (GFunc) _g_free0_, NULL);
806 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
807         g_slist_free (self);
808 #line 808 "moonshot-identity-manager-app.c"
809 }
810
811
812 static gboolean __lambda6_ (Block1Data* _data1_) {
813         IdentityManagerApp* self;
814         gboolean result = FALSE;
815         IdentityManagerView* _tmp0_ = NULL;
816         IdentityRequest* _tmp6_ = NULL;
817         IdCard* _tmp7_ = NULL;
818 #line 241 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
819         self = _data1_->self;
820 #line 242 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
821         _tmp0_ = self->view;
822 #line 242 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
823         if (_tmp0_ != NULL) {
824 #line 824 "moonshot-identity-manager-app.c"
825                 IdentityManagerView* _tmp1_ = NULL;
826                 IdCard* _tmp2_ = NULL;
827                 IdentityRequest* _tmp3_ = NULL;
828                 IdentityManagerModel* _tmp4_ = NULL;
829                 IdCard* _tmp5_ = NULL;
830 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
831                 _tmp1_ = self->view;
832 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
833                 _tmp2_ = _data1_->identity;
834 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
835                 _tmp3_ = _data1_->request;
836 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
837                 _tmp4_ = self->model;
838 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
839                 _tmp5_ = identity_manager_view_check_add_password (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
840 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
841                 _g_object_unref0 (_data1_->identity);
842 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
843                 _data1_->identity = _tmp5_;
844 #line 844 "moonshot-identity-manager-app.c"
845         }
846 #line 245 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
847         _tmp6_ = _data1_->request;
848 #line 245 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
849         _tmp7_ = _data1_->identity;
850 #line 245 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
851         identity_request_return_identity (_tmp6_, _tmp7_);
852 #line 250 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
853         result = FALSE;
854 #line 250 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
855         return result;
856 #line 856 "moonshot-identity-manager-app.c"
857 }
858
859
860 static gboolean ___lambda6__gsource_func (gpointer self) {
861         gboolean result;
862         result = __lambda6_ (self);
863 #line 240 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
864         return result;
865 #line 865 "moonshot-identity-manager-app.c"
866 }
867
868
869 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request) {
870         Block1Data* _data1_;
871         IdentityRequest* _tmp0_ = NULL;
872         IdentityRequest* _tmp1_ = NULL;
873         IdentityRequest* _tmp2_ = NULL;
874         gboolean _tmp3_ = FALSE;
875         IdCard* _tmp6_ = NULL;
876 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
877         g_return_if_fail (self != NULL);
878 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
879         g_return_if_fail (request != NULL);
880 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
881         _data1_ = g_slice_new0 (Block1Data);
882 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
883         _data1_->_ref_count_ = 1;
884 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
885         _data1_->self = identity_manager_app_ref (self);
886 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
887         _tmp0_ = request;
888 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
889         _tmp1_ = _g_object_ref0 (_tmp0_);
890 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
891         _g_object_unref0 (_data1_->request);
892 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
893         _data1_->request = _tmp1_;
894 #line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
895         _data1_->identity = NULL;
896 #line 120 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
897         _tmp2_ = _data1_->request;
898 #line 120 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
899         _tmp3_ = _tmp2_->select_default;
900 #line 120 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
901         if (_tmp3_) {
902 #line 902 "moonshot-identity-manager-app.c"
903                 IdCard* _tmp4_ = NULL;
904                 IdCard* _tmp5_ = NULL;
905 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
906                 _tmp4_ = self->default_id_card;
907 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
908                 _tmp5_ = _g_object_ref0 (_tmp4_);
909 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
910                 _g_object_unref0 (_data1_->identity);
911 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
912                 _data1_->identity = _tmp5_;
913 #line 913 "moonshot-identity-manager-app.c"
914         }
915 #line 125 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
916         _tmp6_ = _data1_->identity;
917 #line 125 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
918         if (_tmp6_ == NULL) {
919 #line 919 "moonshot-identity-manager-app.c"
920                 gboolean _tmp7_ = FALSE;
921                 IdentityRequest* _tmp8_ = NULL;
922                 const gchar* _tmp9_ = NULL;
923                 gboolean has_nai = FALSE;
924                 gboolean _tmp12_ = FALSE;
925                 IdentityRequest* _tmp13_ = NULL;
926                 const gchar* _tmp14_ = NULL;
927                 gboolean has_srv = FALSE;
928                 gboolean confirm = FALSE;
929                 gboolean _tmp48_ = FALSE;
930                 gboolean _tmp49_ = FALSE;
931                 IdCard* _tmp50_ = NULL;
932                 gboolean _tmp86_ = FALSE;
933                 IdCard* _tmp87_ = NULL;
934                 gboolean _tmp116_ = FALSE;
935                 IdCard* _tmp117_ = NULL;
936                 IdCard* _tmp138_ = NULL;
937                 gboolean _tmp146_ = FALSE;
938                 gboolean _tmp147_ = FALSE;
939 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
940                 _tmp8_ = _data1_->request;
941 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
942                 _tmp9_ = _tmp8_->nai;
943 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
944                 if (_tmp9_ != NULL) {
945 #line 945 "moonshot-identity-manager-app.c"
946                         IdentityRequest* _tmp10_ = NULL;
947                         const gchar* _tmp11_ = NULL;
948 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
949                         _tmp10_ = _data1_->request;
950 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
951                         _tmp11_ = _tmp10_->nai;
952 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
953                         _tmp7_ = g_strcmp0 (_tmp11_, "") != 0;
954 #line 954 "moonshot-identity-manager-app.c"
955                 } else {
956 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
957                         _tmp7_ = FALSE;
958 #line 958 "moonshot-identity-manager-app.c"
959                 }
960 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
961                 has_nai = _tmp7_;
962 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
963                 _tmp13_ = _data1_->request;
964 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
965                 _tmp14_ = _tmp13_->service;
966 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
967                 if (_tmp14_ != NULL) {
968 #line 968 "moonshot-identity-manager-app.c"
969                         IdentityRequest* _tmp15_ = NULL;
970                         const gchar* _tmp16_ = NULL;
971 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
972                         _tmp15_ = _data1_->request;
973 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
974                         _tmp16_ = _tmp15_->service;
975 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
976                         _tmp12_ = g_strcmp0 (_tmp16_, "") != 0;
977 #line 977 "moonshot-identity-manager-app.c"
978                 } else {
979 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
980                         _tmp12_ = FALSE;
981 #line 981 "moonshot-identity-manager-app.c"
982                 }
983 #line 128 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
984                 has_srv = _tmp12_;
985 #line 129 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
986                 confirm = FALSE;
987 #line 987 "moonshot-identity-manager-app.c"
988                 {
989                         GeeLinkedList* _id_list = NULL;
990                         IdentityManagerModel* _tmp17_ = NULL;
991                         GeeLinkedList* _tmp18_ = NULL;
992                         gint _id_size = 0;
993                         GeeLinkedList* _tmp19_ = NULL;
994                         gint _tmp20_ = 0;
995                         gint _tmp21_ = 0;
996                         gint _id_index = 0;
997 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
998                         _tmp17_ = self->model;
999 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1000                         _tmp18_ = identity_manager_model_get_card_list (_tmp17_);
1001 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1002                         _id_list = _tmp18_;
1003 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1004                         _tmp19_ = _id_list;
1005 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1006                         _tmp20_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp19_);
1007 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1008                         _tmp21_ = _tmp20_;
1009 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1010                         _id_size = _tmp21_;
1011 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1012                         _id_index = -1;
1013 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1014                         while (TRUE) {
1015 #line 1015 "moonshot-identity-manager-app.c"
1016                                 gint _tmp22_ = 0;
1017                                 gint _tmp23_ = 0;
1018                                 gint _tmp24_ = 0;
1019                                 IdCard* id = NULL;
1020                                 GeeLinkedList* _tmp25_ = NULL;
1021                                 gint _tmp26_ = 0;
1022                                 gpointer _tmp27_ = NULL;
1023                                 gboolean _tmp28_ = FALSE;
1024                                 gboolean _tmp29_ = FALSE;
1025                                 gboolean _tmp37_ = FALSE;
1026 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1027                                 _tmp22_ = _id_index;
1028 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1029                                 _id_index = _tmp22_ + 1;
1030 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1031                                 _tmp23_ = _id_index;
1032 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1033                                 _tmp24_ = _id_size;
1034 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1035                                 if (!(_tmp23_ < _tmp24_)) {
1036 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1037                                         break;
1038 #line 1038 "moonshot-identity-manager-app.c"
1039                                 }
1040 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1041                                 _tmp25_ = _id_list;
1042 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1043                                 _tmp26_ = _id_index;
1044 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1045                                 _tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp25_, _tmp26_);
1046 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1047                                 id = (IdCard*) _tmp27_;
1048 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1049                                 _tmp29_ = has_nai;
1050 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1051                                 if (_tmp29_) {
1052 #line 1052 "moonshot-identity-manager-app.c"
1053                                         IdentityRequest* _tmp30_ = NULL;
1054                                         const gchar* _tmp31_ = NULL;
1055                                         IdCard* _tmp32_ = NULL;
1056                                         const gchar* _tmp33_ = NULL;
1057                                         const gchar* _tmp34_ = NULL;
1058 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1059                                         _tmp30_ = _data1_->request;
1060 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1061                                         _tmp31_ = _tmp30_->nai;
1062 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1063                                         _tmp32_ = id;
1064 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1065                                         _tmp33_ = id_card_get_nai (_tmp32_);
1066 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1067                                         _tmp34_ = _tmp33_;
1068 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1069                                         _tmp28_ = g_strcmp0 (_tmp31_, _tmp34_) == 0;
1070 #line 1070 "moonshot-identity-manager-app.c"
1071                                 } else {
1072 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1073                                         _tmp28_ = FALSE;
1074 #line 1074 "moonshot-identity-manager-app.c"
1075                                 }
1076 #line 134 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1077                                 if (_tmp28_) {
1078 #line 1078 "moonshot-identity-manager-app.c"
1079                                         IdCard* _tmp35_ = NULL;
1080                                         IdCard* _tmp36_ = NULL;
1081 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1082                                         _tmp35_ = id;
1083 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1084                                         _tmp36_ = _g_object_ref0 (_tmp35_);
1085 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1086                                         _g_object_unref0 (_data1_->identity);
1087 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1088                                         _data1_->identity = _tmp36_;
1089 #line 137 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1090                                         _g_object_unref0 (id);
1091 #line 137 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1092                                         break;
1093 #line 1093 "moonshot-identity-manager-app.c"
1094                                 }
1095 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1096                                 _tmp37_ = has_srv;
1097 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1098                                 if (_tmp37_) {
1099 #line 1099 "moonshot-identity-manager-app.c"
1100                                         IdCard* _tmp38_ = NULL;
1101                                         gchar** _tmp39_ = NULL;
1102                                         gint _tmp39__length1 = 0;
1103                                         gchar** _tmp40_ = NULL;
1104                                         gint _tmp40__length1 = 0;
1105 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1106                                         _tmp38_ = id;
1107 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1108                                         _tmp39_ = id_card_get_services (_tmp38_, &_tmp39__length1);
1109 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1110                                         _tmp40_ = _tmp39_;
1111 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1112                                         _tmp40__length1 = _tmp39__length1;
1113 #line 1113 "moonshot-identity-manager-app.c"
1114                                         {
1115                                                 gchar** srv_collection = NULL;
1116                                                 gint srv_collection_length1 = 0;
1117                                                 gint _srv_collection_size_ = 0;
1118                                                 gint srv_it = 0;
1119 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1120                                                 srv_collection = _tmp40_;
1121 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1122                                                 srv_collection_length1 = _tmp40__length1;
1123 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1124                                                 for (srv_it = 0; srv_it < _tmp40__length1; srv_it = srv_it + 1) {
1125 #line 1125 "moonshot-identity-manager-app.c"
1126                                                         gchar* _tmp41_ = NULL;
1127                                                         gchar* srv = NULL;
1128 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1129                                                         _tmp41_ = g_strdup (srv_collection[srv_it]);
1130 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1131                                                         srv = _tmp41_;
1132 #line 1132 "moonshot-identity-manager-app.c"
1133                                                         {
1134                                                                 IdentityRequest* _tmp42_ = NULL;
1135                                                                 const gchar* _tmp43_ = NULL;
1136                                                                 const gchar* _tmp44_ = NULL;
1137 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1138                                                                 _tmp42_ = _data1_->request;
1139 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1140                                                                 _tmp43_ = _tmp42_->service;
1141 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1142                                                                 _tmp44_ = srv;
1143 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1144                                                                 if (g_strcmp0 (_tmp43_, _tmp44_) == 0) {
1145 #line 1145 "moonshot-identity-manager-app.c"
1146                                                                         IdentityRequest* _tmp45_ = NULL;
1147                                                                         IdCard* _tmp46_ = NULL;
1148                                                                         IdCard* _tmp47_ = NULL;
1149 #line 147 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1150                                                                         _tmp45_ = _data1_->request;
1151 #line 147 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1152                                                                         _tmp46_ = id;
1153 #line 147 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1154                                                                         _tmp47_ = _g_object_ref0 (_tmp46_);
1155 #line 147 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1156                                                                         _tmp45_->candidates = g_slist_append (_tmp45_->candidates, _tmp47_);
1157 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1158                                                                         _g_free0 (srv);
1159 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1160                                                                         continue;
1161 #line 1161 "moonshot-identity-manager-app.c"
1162                                                                 }
1163 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1164                                                                 _g_free0 (srv);
1165 #line 1165 "moonshot-identity-manager-app.c"
1166                                                         }
1167                                                 }
1168                                         }
1169                                 }
1170 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1171                                 _g_object_unref0 (id);
1172 #line 1172 "moonshot-identity-manager-app.c"
1173                         }
1174 #line 131 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1175                         _g_object_unref0 (_id_list);
1176 #line 1176 "moonshot-identity-manager-app.c"
1177                 }
1178 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1179                 _tmp50_ = _data1_->identity;
1180 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1181                 if (_tmp50_ == NULL) {
1182 #line 1182 "moonshot-identity-manager-app.c"
1183                         gboolean _tmp51_ = FALSE;
1184 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1185                         _tmp51_ = has_srv;
1186 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1187                         _tmp49_ = _tmp51_;
1188 #line 1188 "moonshot-identity-manager-app.c"
1189                 } else {
1190 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1191                         _tmp49_ = FALSE;
1192 #line 1192 "moonshot-identity-manager-app.c"
1193                 }
1194 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1195                 if (_tmp49_) {
1196 #line 1196 "moonshot-identity-manager-app.c"
1197                         IdentityRequest* _tmp52_ = NULL;
1198                         GSList* _tmp53_ = NULL;
1199                         guint _tmp54_ = 0U;
1200 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1201                         _tmp52_ = _data1_->request;
1202 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1203                         _tmp53_ = _tmp52_->candidates;
1204 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1205                         _tmp54_ = g_slist_length (_tmp53_);
1206 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1207                         _tmp48_ = _tmp54_ > ((guint) 1);
1208 #line 1208 "moonshot-identity-manager-app.c"
1209                 } else {
1210 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1211                         _tmp48_ = FALSE;
1212 #line 1212 "moonshot-identity-manager-app.c"
1213                 }
1214 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1215                 if (_tmp48_) {
1216 #line 1216 "moonshot-identity-manager-app.c"
1217                         IdentityRequest* _tmp55_ = NULL;
1218                         GSList* _tmp56_ = NULL;
1219 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1220                         _tmp55_ = _data1_->request;
1221 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1222                         _tmp56_ = _tmp55_->candidates;
1223 #line 1223 "moonshot-identity-manager-app.c"
1224                         {
1225                                 GSList* id_collection = NULL;
1226                                 GSList* id_it = NULL;
1227 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1228                                 id_collection = _tmp56_;
1229 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1230                                 for (id_it = id_collection; id_it != NULL; id_it = id_it->next) {
1231 #line 1231 "moonshot-identity-manager-app.c"
1232                                         IdCard* _tmp57_ = NULL;
1233                                         IdCard* id = NULL;
1234 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1235                                         _tmp57_ = _g_object_ref0 ((IdCard*) id_it->data);
1236 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1237                                         id = _tmp57_;
1238 #line 1238 "moonshot-identity-manager-app.c"
1239                                         {
1240                                                 gint i = 0;
1241                                                 GSList* services_list = NULL;
1242                                                 gboolean has_service = FALSE;
1243                                                 IdCard* _tmp58_ = NULL;
1244                                                 gchar** _tmp59_ = NULL;
1245                                                 gint _tmp59__length1 = 0;
1246                                                 gchar** _tmp60_ = NULL;
1247                                                 gint _tmp60__length1 = 0;
1248                                                 gboolean _tmp67_ = FALSE;
1249                                                 GSList* _tmp68_ = NULL;
1250                                                 guint _tmp69_ = 0U;
1251                                                 gchar** services = NULL;
1252                                                 GSList* _tmp73_ = NULL;
1253                                                 guint _tmp74_ = 0U;
1254                                                 gchar** _tmp75_ = NULL;
1255                                                 gint services_length1 = 0;
1256                                                 gint _services_size_ = 0;
1257                                                 GSList* _tmp76_ = NULL;
1258                                                 IdCard* _tmp84_ = NULL;
1259                                                 gchar** _tmp85_ = NULL;
1260                                                 gint _tmp85__length1 = 0;
1261 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1262                                                 i = 0;
1263 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1264                                                 services_list = NULL;
1265 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1266                                                 has_service = FALSE;
1267 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1268                                                 _tmp58_ = id;
1269 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1270                                                 _tmp59_ = id_card_get_services (_tmp58_, &_tmp59__length1);
1271 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1272                                                 _tmp60_ = _tmp59_;
1273 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1274                                                 _tmp60__length1 = _tmp59__length1;
1275 #line 1275 "moonshot-identity-manager-app.c"
1276                                                 {
1277                                                         gchar** srv_collection = NULL;
1278                                                         gint srv_collection_length1 = 0;
1279                                                         gint _srv_collection_size_ = 0;
1280                                                         gint srv_it = 0;
1281 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1282                                                         srv_collection = _tmp60_;
1283 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1284                                                         srv_collection_length1 = _tmp60__length1;
1285 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1286                                                         for (srv_it = 0; srv_it < _tmp60__length1; srv_it = srv_it + 1) {
1287 #line 1287 "moonshot-identity-manager-app.c"
1288                                                                 gchar* _tmp61_ = NULL;
1289                                                                 gchar* srv = NULL;
1290 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1291                                                                 _tmp61_ = g_strdup (srv_collection[srv_it]);
1292 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1293                                                                 srv = _tmp61_;
1294 #line 1294 "moonshot-identity-manager-app.c"
1295                                                                 {
1296                                                                         const gchar* _tmp62_ = NULL;
1297                                                                         IdentityRequest* _tmp63_ = NULL;
1298                                                                         const gchar* _tmp64_ = NULL;
1299                                                                         const gchar* _tmp65_ = NULL;
1300                                                                         gchar* _tmp66_ = NULL;
1301 #line 165 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1302                                                                         _tmp62_ = srv;
1303 #line 165 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1304                                                                         _tmp63_ = _data1_->request;
1305 #line 165 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1306                                                                         _tmp64_ = _tmp63_->service;
1307 #line 165 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1308                                                                         if (g_strcmp0 (_tmp62_, _tmp64_) == 0) {
1309 #line 167 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1310                                                                                 has_service = TRUE;
1311 #line 168 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1312                                                                                 _g_free0 (srv);
1313 #line 168 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1314                                                                                 continue;
1315 #line 1315 "moonshot-identity-manager-app.c"
1316                                                                         }
1317 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1318                                                                         _tmp65_ = srv;
1319 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1320                                                                         _tmp66_ = g_strdup (_tmp65_);
1321 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1322                                                                         services_list = g_slist_append (services_list, _tmp66_);
1323 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1324                                                                         _g_free0 (srv);
1325 #line 1325 "moonshot-identity-manager-app.c"
1326                                                                 }
1327                                                         }
1328                                                 }
1329 #line 173 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1330                                                 _tmp67_ = has_service;
1331 #line 173 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1332                                                 if (!_tmp67_) {
1333 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1334                                                         __g_slist_free__g_free0_0 (services_list);
1335 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1336                                                         _g_object_unref0 (id);
1337 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1338                                                         continue;
1339 #line 1339 "moonshot-identity-manager-app.c"
1340                                                 }
1341 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1342                                                 _tmp68_ = services_list;
1343 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1344                                                 _tmp69_ = g_slist_length (_tmp68_);
1345 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1346                                                 if (_tmp69_ == ((guint) 0)) {
1347 #line 1347 "moonshot-identity-manager-app.c"
1348                                                         IdCard* _tmp70_ = NULL;
1349                                                         gchar** _tmp71_ = NULL;
1350                                                         gchar** _tmp72_ = NULL;
1351                                                         gint _tmp72__length1 = 0;
1352 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1353                                                         _tmp70_ = id;
1354 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1355                                                         _tmp71_ = g_new0 (gchar*, 0 + 1);
1356 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1357                                                         _tmp72_ = _tmp71_;
1358 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1359                                                         _tmp72__length1 = 0;
1360 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1361                                                         id_card_set_services (_tmp70_, _tmp72_, 0);
1362 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1363                                                         _tmp72_ = (_vala_array_free (_tmp72_, _tmp72__length1, (GDestroyNotify) g_free), NULL);
1364 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1365                                                         __g_slist_free__g_free0_0 (services_list);
1366 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1367                                                         _g_object_unref0 (id);
1368 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1369                                                         continue;
1370 #line 1370 "moonshot-identity-manager-app.c"
1371                                                 }
1372 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1373                                                 _tmp73_ = services_list;
1374 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1375                                                 _tmp74_ = g_slist_length (_tmp73_);
1376 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1377                                                 _tmp75_ = g_new0 (gchar*, _tmp74_ + 1);
1378 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1379                                                 services = _tmp75_;
1380 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1381                                                 services_length1 = _tmp74_;
1382 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1383                                                 _services_size_ = services_length1;
1384 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1385                                                 _tmp76_ = services_list;
1386 #line 1386 "moonshot-identity-manager-app.c"
1387                                                 {
1388                                                         GSList* srv_collection = NULL;
1389                                                         GSList* srv_it = NULL;
1390 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1391                                                         srv_collection = _tmp76_;
1392 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1393                                                         for (srv_it = srv_collection; srv_it != NULL; srv_it = srv_it->next) {
1394 #line 1394 "moonshot-identity-manager-app.c"
1395                                                                 gchar* _tmp77_ = NULL;
1396                                                                 gchar* srv = NULL;
1397 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1398                                                                 _tmp77_ = g_strdup ((const gchar*) srv_it->data);
1399 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1400                                                                 srv = _tmp77_;
1401 #line 1401 "moonshot-identity-manager-app.c"
1402                                                                 {
1403                                                                         gchar** _tmp78_ = NULL;
1404                                                                         gint _tmp78__length1 = 0;
1405                                                                         gint _tmp79_ = 0;
1406                                                                         const gchar* _tmp80_ = NULL;
1407                                                                         gchar* _tmp81_ = NULL;
1408                                                                         gchar* _tmp82_ = NULL;
1409                                                                         gint _tmp83_ = 0;
1410 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1411                                                                         _tmp78_ = services;
1412 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1413                                                                         _tmp78__length1 = services_length1;
1414 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1415                                                                         _tmp79_ = i;
1416 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1417                                                                         _tmp80_ = srv;
1418 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1419                                                                         _tmp81_ = g_strdup (_tmp80_);
1420 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1421                                                                         _g_free0 (_tmp78_[_tmp79_]);
1422 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1423                                                                         _tmp78_[_tmp79_] = _tmp81_;
1424 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1425                                                                         _tmp82_ = _tmp78_[_tmp79_];
1426 #line 186 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1427                                                                         _tmp83_ = i;
1428 #line 186 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1429                                                                         i = _tmp83_ + 1;
1430 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1431                                                                         _g_free0 (srv);
1432 #line 1432 "moonshot-identity-manager-app.c"
1433                                                                 }
1434                                                         }
1435                                                 }
1436 #line 189 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1437                                                 _tmp84_ = id;
1438 #line 189 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1439                                                 _tmp85_ = services;
1440 #line 189 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1441                                                 _tmp85__length1 = services_length1;
1442 #line 189 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1443                                                 id_card_set_services (_tmp84_, _tmp85_, _tmp85__length1);
1444 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1445                                                 services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
1446 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1447                                                 __g_slist_free__g_free0_0 (services_list);
1448 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1449                                                 _g_object_unref0 (id);
1450 #line 1450 "moonshot-identity-manager-app.c"
1451                                         }
1452                                 }
1453                         }
1454                 }
1455 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1456                 _tmp87_ = _data1_->identity;
1457 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1458                 if (_tmp87_ == NULL) {
1459 #line 1459 "moonshot-identity-manager-app.c"
1460                         IdentityRequest* _tmp88_ = NULL;
1461                         GSList* _tmp89_ = NULL;
1462                         guint _tmp90_ = 0U;
1463 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1464                         _tmp88_ = _data1_->request;
1465 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1466                         _tmp89_ = _tmp88_->candidates;
1467 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1468                         _tmp90_ = g_slist_length (_tmp89_);
1469 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1470                         _tmp86_ = _tmp90_ == ((guint) 0);
1471 #line 1471 "moonshot-identity-manager-app.c"
1472                 } else {
1473 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1474                         _tmp86_ = FALSE;
1475 #line 1475 "moonshot-identity-manager-app.c"
1476                 }
1477 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1478                 if (_tmp86_) {
1479 #line 1479 "moonshot-identity-manager-app.c"
1480                         {
1481                                 GeeLinkedList* _id_list = NULL;
1482                                 IdentityManagerModel* _tmp91_ = NULL;
1483                                 GeeLinkedList* _tmp92_ = NULL;
1484                                 gint _id_size = 0;
1485                                 GeeLinkedList* _tmp93_ = NULL;
1486                                 gint _tmp94_ = 0;
1487                                 gint _tmp95_ = 0;
1488                                 gint _id_index = 0;
1489 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1490                                 _tmp91_ = self->model;
1491 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1492                                 _tmp92_ = identity_manager_model_get_card_list (_tmp91_);
1493 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1494                                 _id_list = _tmp92_;
1495 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1496                                 _tmp93_ = _id_list;
1497 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1498                                 _tmp94_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp93_);
1499 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1500                                 _tmp95_ = _tmp94_;
1501 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1502                                 _id_size = _tmp95_;
1503 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1504                                 _id_index = -1;
1505 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1506                                 while (TRUE) {
1507 #line 1507 "moonshot-identity-manager-app.c"
1508                                         gint _tmp96_ = 0;
1509                                         gint _tmp97_ = 0;
1510                                         gint _tmp98_ = 0;
1511                                         IdCard* id = NULL;
1512                                         GeeLinkedList* _tmp99_ = NULL;
1513                                         gint _tmp100_ = 0;
1514                                         gpointer _tmp101_ = NULL;
1515                                         IdCard* _tmp102_ = NULL;
1516                                         Rule* _tmp103_ = NULL;
1517                                         gint _tmp103__length1 = 0;
1518                                         Rule* _tmp104_ = NULL;
1519                                         gint _tmp104__length1 = 0;
1520 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1521                                         _tmp96_ = _id_index;
1522 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1523                                         _id_index = _tmp96_ + 1;
1524 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1525                                         _tmp97_ = _id_index;
1526 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1527                                         _tmp98_ = _id_size;
1528 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1529                                         if (!(_tmp97_ < _tmp98_)) {
1530 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1531                                                 break;
1532 #line 1532 "moonshot-identity-manager-app.c"
1533                                         }
1534 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1535                                         _tmp99_ = _id_list;
1536 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1537                                         _tmp100_ = _id_index;
1538 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1539                                         _tmp101_ = gee_abstract_list_get ((GeeAbstractList*) _tmp99_, _tmp100_);
1540 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1541                                         id = (IdCard*) _tmp101_;
1542 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1543                                         _tmp102_ = id;
1544 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1545                                         _tmp103_ = id_card_get_rules (_tmp102_, &_tmp103__length1);
1546 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1547                                         _tmp104_ = _tmp103_;
1548 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1549                                         _tmp104__length1 = _tmp103__length1;
1550 #line 1550 "moonshot-identity-manager-app.c"
1551                                         {
1552                                                 Rule* rule_collection = NULL;
1553                                                 gint rule_collection_length1 = 0;
1554                                                 gint _rule_collection_size_ = 0;
1555                                                 gint rule_it = 0;
1556 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1557                                                 rule_collection = _tmp104_;
1558 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1559                                                 rule_collection_length1 = _tmp104__length1;
1560 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1561                                                 for (rule_it = 0; rule_it < _tmp104__length1; rule_it = rule_it + 1) {
1562 #line 1562 "moonshot-identity-manager-app.c"
1563                                                         Rule _tmp105_ = {0};
1564                                                         Rule rule = {0};
1565 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1566                                                         rule_copy (&rule_collection[rule_it], &_tmp105_);
1567 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1568                                                         rule = _tmp105_;
1569 #line 1569 "moonshot-identity-manager-app.c"
1570                                                         {
1571                                                                 IdentityRequest* _tmp106_ = NULL;
1572                                                                 const gchar* _tmp107_ = NULL;
1573                                                                 Rule _tmp108_ = {0};
1574                                                                 const gchar* _tmp109_ = NULL;
1575                                                                 gboolean _tmp110_ = FALSE;
1576                                                                 IdentityRequest* _tmp111_ = NULL;
1577                                                                 IdCard* _tmp112_ = NULL;
1578                                                                 IdCard* _tmp113_ = NULL;
1579                                                                 Rule _tmp114_ = {0};
1580                                                                 const gchar* _tmp115_ = NULL;
1581 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1582                                                                 _tmp106_ = _data1_->request;
1583 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1584                                                                 _tmp107_ = _tmp106_->service;
1585 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1586                                                                 _tmp108_ = rule;
1587 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1588                                                                 _tmp109_ = _tmp108_.pattern;
1589 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1590                                                                 _tmp110_ = identity_manager_app_match_service_pattern (self, _tmp107_, _tmp109_);
1591 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1592                                                                 if (!_tmp110_) {
1593 #line 201 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1594                                                                         rule_destroy (&rule);
1595 #line 201 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1596                                                                         continue;
1597 #line 1597 "moonshot-identity-manager-app.c"
1598                                                                 }
1599 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1600                                                                 _tmp111_ = _data1_->request;
1601 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1602                                                                 _tmp112_ = id;
1603 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1604                                                                 _tmp113_ = _g_object_ref0 (_tmp112_);
1605 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1606                                                                 _tmp111_->candidates = g_slist_append (_tmp111_->candidates, _tmp113_);
1607 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1608                                                                 _tmp114_ = rule;
1609 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1610                                                                 _tmp115_ = _tmp114_.always_confirm;
1611 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1612                                                                 if (g_strcmp0 (_tmp115_, "true") == 0) {
1613 #line 206 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1614                                                                         confirm = TRUE;
1615 #line 1615 "moonshot-identity-manager-app.c"
1616                                                                 }
1617 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1618                                                                 rule_destroy (&rule);
1619 #line 1619 "moonshot-identity-manager-app.c"
1620                                                         }
1621                                                 }
1622                                         }
1623 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1624                                         _g_object_unref0 (id);
1625 #line 1625 "moonshot-identity-manager-app.c"
1626                                 }
1627 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1628                                 _g_object_unref0 (_id_list);
1629 #line 1629 "moonshot-identity-manager-app.c"
1630                         }
1631                 }
1632 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1633                 _tmp117_ = _data1_->identity;
1634 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1635                 if (_tmp117_ == NULL) {
1636 #line 1636 "moonshot-identity-manager-app.c"
1637                         gboolean _tmp118_ = FALSE;
1638 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1639                         _tmp118_ = has_nai;
1640 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1641                         _tmp116_ = _tmp118_;
1642 #line 1642 "moonshot-identity-manager-app.c"
1643                 } else {
1644 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1645                         _tmp116_ = FALSE;
1646 #line 1646 "moonshot-identity-manager-app.c"
1647                 }
1648 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1649                 if (_tmp116_) {
1650 #line 1650 "moonshot-identity-manager-app.c"
1651                         gchar** components = NULL;
1652                         IdentityRequest* _tmp119_ = NULL;
1653                         const gchar* _tmp120_ = NULL;
1654                         gchar** _tmp121_ = NULL;
1655                         gchar** _tmp122_ = NULL;
1656                         gint components_length1 = 0;
1657                         gint _components_size_ = 0;
1658                         IdCard* _tmp123_ = NULL;
1659                         IdCard* _tmp124_ = NULL;
1660                         IdentityRequest* _tmp125_ = NULL;
1661                         const gchar* _tmp126_ = NULL;
1662                         IdCard* _tmp127_ = NULL;
1663                         gchar** _tmp128_ = NULL;
1664                         gint _tmp128__length1 = 0;
1665                         const gchar* _tmp129_ = NULL;
1666                         gchar** _tmp130_ = NULL;
1667                         gint _tmp130__length1 = 0;
1668                         IdCard* _tmp134_ = NULL;
1669                         IdentityRequest* _tmp135_ = NULL;
1670                         const gchar* _tmp136_ = NULL;
1671                         IdCard* _tmp137_ = NULL;
1672 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1673                         _tmp119_ = _data1_->request;
1674 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1675                         _tmp120_ = _tmp119_->nai;
1676 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1677                         _tmp122_ = _tmp121_ = g_strsplit (_tmp120_, "@", 2);
1678 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1679                         components = _tmp122_;
1680 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1681                         components_length1 = _vala_array_length (_tmp121_);
1682 #line 213 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1683                         _components_size_ = components_length1;
1684 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1685                         _tmp123_ = id_card_new ();
1686 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1687                         _g_object_unref0 (_data1_->identity);
1688 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1689                         _data1_->identity = _tmp123_;
1690 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1691                         _tmp124_ = _data1_->identity;
1692 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1693                         _tmp125_ = _data1_->request;
1694 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1695                         _tmp126_ = _tmp125_->nai;
1696 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1697                         id_card_set_display_name (_tmp124_, _tmp126_);
1698 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1699                         _tmp127_ = _data1_->identity;
1700 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1701                         _tmp128_ = components;
1702 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1703                         _tmp128__length1 = components_length1;
1704 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1705                         _tmp129_ = _tmp128_[0];
1706 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1707                         id_card_set_username (_tmp127_, _tmp129_);
1708 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1709                         _tmp130_ = components;
1710 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1711                         _tmp130__length1 = components_length1;
1712 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1713                         if (_tmp130__length1 > 1) {
1714 #line 1714 "moonshot-identity-manager-app.c"
1715                                 IdCard* _tmp131_ = NULL;
1716                                 gchar** _tmp132_ = NULL;
1717                                 gint _tmp132__length1 = 0;
1718                                 const gchar* _tmp133_ = NULL;
1719 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1720                                 _tmp131_ = _data1_->identity;
1721 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1722                                 _tmp132_ = components;
1723 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1724                                 _tmp132__length1 = components_length1;
1725 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1726                                 _tmp133_ = _tmp132_[1];
1727 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1728                                 id_card_set_issuer (_tmp131_, _tmp133_);
1729 #line 1729 "moonshot-identity-manager-app.c"
1730                         }
1731 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1732                         _tmp134_ = _data1_->identity;
1733 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1734                         _tmp135_ = _data1_->request;
1735 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1736                         _tmp136_ = _tmp135_->password;
1737 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1738                         id_card_set_password (_tmp134_, _tmp136_);
1739 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1740                         _tmp137_ = _data1_->identity;
1741 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1742                         id_card_set_temporary (_tmp137_, TRUE);
1743 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1744                         components = (_vala_array_free (components, components_length1, (GDestroyNotify) g_free), NULL);
1745 #line 1745 "moonshot-identity-manager-app.c"
1746                 }
1747 #line 222 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1748                 _tmp138_ = _data1_->identity;
1749 #line 222 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1750                 if (_tmp138_ == NULL) {
1751 #line 1751 "moonshot-identity-manager-app.c"
1752                         IdentityRequest* _tmp139_ = NULL;
1753                         GSList* _tmp140_ = NULL;
1754                         guint _tmp141_ = 0U;
1755 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1756                         _tmp139_ = _data1_->request;
1757 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1758                         _tmp140_ = _tmp139_->candidates;
1759 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1760                         _tmp141_ = g_slist_length (_tmp140_);
1761 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1762                         if (_tmp141_ != ((guint) 1)) {
1763 #line 224 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1764                                 confirm = TRUE;
1765 #line 1765 "moonshot-identity-manager-app.c"
1766                         } else {
1767                                 IdentityRequest* _tmp142_ = NULL;
1768                                 GSList* _tmp143_ = NULL;
1769                                 gconstpointer _tmp144_ = NULL;
1770                                 IdCard* _tmp145_ = NULL;
1771 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1772                                 _tmp142_ = _data1_->request;
1773 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1774                                 _tmp143_ = _tmp142_->candidates;
1775 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1776                                 _tmp144_ = g_slist_nth_data (_tmp143_, (guint) 0);
1777 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1778                                 _tmp145_ = _g_object_ref0 ((IdCard*) _tmp144_);
1779 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1780                                 _g_object_unref0 (_data1_->identity);
1781 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1782                                 _data1_->identity = _tmp145_;
1783 #line 1783 "moonshot-identity-manager-app.c"
1784                         }
1785                 }
1786 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1787                 _tmp147_ = confirm;
1788 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1789                 if (_tmp147_) {
1790 #line 1790 "moonshot-identity-manager-app.c"
1791                         IdentityManagerView* _tmp148_ = NULL;
1792 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1793                         _tmp148_ = self->view;
1794 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1795                         _tmp146_ = _tmp148_ != NULL;
1796 #line 1796 "moonshot-identity-manager-app.c"
1797                 } else {
1798 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1799                         _tmp146_ = FALSE;
1800 #line 1800 "moonshot-identity-manager-app.c"
1801                 }
1802 #line 230 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1803                 if (_tmp146_) {
1804 #line 1804 "moonshot-identity-manager-app.c"
1805                         gboolean _tmp149_ = FALSE;
1806                         IdentityManagerView* _tmp150_ = NULL;
1807                         IdentityRequest* _tmp151_ = NULL;
1808 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1809                         _tmp149_ = self->explicitly_launched;
1810 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1811                         if (!_tmp149_) {
1812 #line 233 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1813                                 identity_manager_app_show (self);
1814 #line 1814 "moonshot-identity-manager-app.c"
1815                         }
1816 #line 234 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1817                         _tmp150_ = self->view;
1818 #line 234 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1819                         _tmp151_ = _data1_->request;
1820 #line 234 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1821                         identity_manager_view_queue_identity_request (_tmp150_, _tmp151_);
1822 #line 235 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1823                         block1_data_unref (_data1_);
1824 #line 235 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1825                         _data1_ = NULL;
1826 #line 235 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1827                         return;
1828 #line 1828 "moonshot-identity-manager-app.c"
1829                 }
1830         }
1831 #line 240 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1832         g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda6__gsource_func, block1_data_ref (_data1_), block1_data_unref);
1833 #line 253 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1834         block1_data_unref (_data1_);
1835 #line 253 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1836         _data1_ = NULL;
1837 #line 253 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1838         return;
1839 #line 1839 "moonshot-identity-manager-app.c"
1840 }
1841
1842
1843 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern) {
1844         gboolean result = FALSE;
1845         GPatternSpec* pspec = NULL;
1846         const gchar* _tmp0_ = NULL;
1847         GPatternSpec* _tmp1_ = NULL;
1848         const gchar* _tmp2_ = NULL;
1849         gboolean _tmp3_ = FALSE;
1850 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1851         g_return_val_if_fail (self != NULL, FALSE);
1852 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1853         g_return_val_if_fail (service != NULL, FALSE);
1854 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1855         g_return_val_if_fail (pattern != NULL, FALSE);
1856 #line 258 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1857         _tmp0_ = pattern;
1858 #line 258 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1859         _tmp1_ = g_pattern_spec_new (_tmp0_);
1860 #line 258 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1861         pspec = _tmp1_;
1862 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1863         _tmp2_ = service;
1864 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1865         _tmp3_ = g_pattern_match_string (pspec, _tmp2_);
1866 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1867         result = _tmp3_;
1868 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1869         _g_pattern_spec_free0 (pspec);
1870 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1871         return result;
1872 #line 1872 "moonshot-identity-manager-app.c"
1873 }
1874
1875
1876 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn) {
1877         GError * _inner_error_ = NULL;
1878 #line 309 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1879         g_return_if_fail (self != NULL);
1880 #line 309 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1881         g_return_if_fail (conn != NULL);
1882 #line 1882 "moonshot-identity-manager-app.c"
1883         {
1884                 GDBusConnection* _tmp0_ = NULL;
1885                 MoonshotServer* _tmp1_ = NULL;
1886 #line 312 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1887                 _tmp0_ = conn;
1888 #line 312 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1889                 _tmp1_ = self->priv->ipc_server;
1890 #line 312 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1891                 moonshot_server_register_object (_tmp1_, _tmp0_, "/org/janet/moonshot", &_inner_error_);
1892 #line 312 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1893                 if (_inner_error_ != NULL) {
1894 #line 1894 "moonshot-identity-manager-app.c"
1895                         goto __catch0_g_error;
1896                 }
1897         }
1898         goto __finally0;
1899         __catch0_g_error:
1900         {
1901                 GError* e = NULL;
1902                 FILE* _tmp2_ = NULL;
1903                 GError* _tmp3_ = NULL;
1904                 const gchar* _tmp4_ = NULL;
1905 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1906                 e = _inner_error_;
1907 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1908                 _inner_error_ = NULL;
1909 #line 316 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1910                 _tmp2_ = stderr;
1911 #line 316 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1912                 _tmp3_ = e;
1913 #line 316 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1914                 _tmp4_ = _tmp3_->message;
1915 #line 316 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1916                 fprintf (_tmp2_, "%s\n", _tmp4_);
1917 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1918                 _g_error_free0 (e);
1919 #line 1919 "moonshot-identity-manager-app.c"
1920         }
1921         __finally0:
1922 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1923         if (_inner_error_ != NULL) {
1924 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1925                 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);
1926 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1927                 g_clear_error (&_inner_error_);
1928 #line 311 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1929                 return;
1930 #line 1930 "moonshot-identity-manager-app.c"
1931         }
1932 }
1933
1934
1935 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1936 #line 323 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1937         identity_manager_app_bus_acquired_cb ((IdentityManagerApp*) self, connection);
1938 #line 1938 "moonshot-identity-manager-app.c"
1939 }
1940
1941
1942 static void __lambda9_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1943 #line 327 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1944         g_return_if_fail (conn != NULL);
1945 #line 327 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1946         g_return_if_fail (name != NULL);
1947 #line 1947 "moonshot-identity-manager-app.c"
1948 }
1949
1950
1951 static void ___lambda9__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1952 #line 323 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1953         __lambda9_ ((IdentityManagerApp*) self, connection, name);
1954 #line 1954 "moonshot-identity-manager-app.c"
1955 }
1956
1957
1958 static void __lambda10_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1959         gboolean shown = FALSE;
1960         gboolean _tmp5_ = FALSE;
1961         GError * _inner_error_ = NULL;
1962 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1963         g_return_if_fail (conn != NULL);
1964 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1965         g_return_if_fail (name != NULL);
1966 #line 329 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1967         shown = FALSE;
1968 #line 1968 "moonshot-identity-manager-app.c"
1969         {
1970                 IIdentityManager* manager = NULL;
1971                 const gchar* _tmp0_ = NULL;
1972                 IIdentityManager* _tmp1_ = NULL;
1973                 gboolean _tmp2_ = FALSE;
1974                 IIdentityManager* _tmp3_ = NULL;
1975                 gboolean _tmp4_ = FALSE;
1976 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1977                 _tmp0_ = name;
1978 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1979                 _tmp1_ = g_initable_new (TYPE_IIDENTITY_MANAGER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp0_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/janet/moonshot", "g-interface-name", "org.janet.Moonshot", NULL);
1980 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1981                 manager = (IIdentityManager*) _tmp1_;
1982 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1983                 if (_inner_error_ != NULL) {
1984 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1985                         if (_inner_error_->domain == G_IO_ERROR) {
1986 #line 1986 "moonshot-identity-manager-app.c"
1987                                 goto __catch1_g_io_error;
1988                         }
1989 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1990                         g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1991 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1992                         g_clear_error (&_inner_error_);
1993 #line 331 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1994                         return;
1995 #line 1995 "moonshot-identity-manager-app.c"
1996                 }
1997 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1998                 _tmp3_ = manager;
1999 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2000                 _tmp4_ = iidentity_manager_show_ui (_tmp3_, &_inner_error_);
2001 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2002                 _tmp2_ = _tmp4_;
2003 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2004                 if (_inner_error_ != NULL) {
2005 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2006                         _g_object_unref0 (manager);
2007 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2008                         if (_inner_error_->domain == G_IO_ERROR) {
2009 #line 2009 "moonshot-identity-manager-app.c"
2010                                 goto __catch1_g_io_error;
2011                         }
2012 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2013                         _g_object_unref0 (manager);
2014 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2015                         g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2016 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2017                         g_clear_error (&_inner_error_);
2018 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2019                         return;
2020 #line 2020 "moonshot-identity-manager-app.c"
2021                 }
2022 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2023                 shown = _tmp2_;
2024 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2025                 _g_object_unref0 (manager);
2026 #line 2026 "moonshot-identity-manager-app.c"
2027         }
2028         goto __finally1;
2029         __catch1_g_io_error:
2030         {
2031                 GError* e = NULL;
2032 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2033                 e = _inner_error_;
2034 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2035                 _inner_error_ = NULL;
2036 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2037                 _g_error_free0 (e);
2038 #line 2038 "moonshot-identity-manager-app.c"
2039         }
2040         __finally1:
2041 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2042         if (_inner_error_ != NULL) {
2043 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2044                 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);
2045 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2046                 g_clear_error (&_inner_error_);
2047 #line 330 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2048                 return;
2049 #line 2049 "moonshot-identity-manager-app.c"
2050         }
2051 #line 335 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2052         _tmp5_ = shown;
2053 #line 335 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2054         if (!_tmp5_) {
2055 #line 2055 "moonshot-identity-manager-app.c"
2056                 const gchar* _tmp6_ = NULL;
2057 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2058                 _tmp6_ = name;
2059 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2060                 g_error ("moonshot-identity-manager-app.vala:336: Couldn't own name %s on dbus o" \
2061 "r show previously launched identity manager.", _tmp6_);
2062 #line 2061 "moonshot-identity-manager-app.c"
2063         } else {
2064                 FILE* _tmp7_ = NULL;
2065 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2066                 _tmp7_ = stdout;
2067 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2068                 fprintf (_tmp7_, "Showed previously launched identity manager.\n");
2069 #line 339 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2070                 exit (0);
2071 #line 2070 "moonshot-identity-manager-app.c"
2072         }
2073 }
2074
2075
2076 static void ___lambda10__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
2077 #line 323 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2078         __lambda10_ ((IdentityManagerApp*) self, connection, name);
2079 #line 2078 "moonshot-identity-manager-app.c"
2080 }
2081
2082
2083 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self) {
2084         MoonshotServer* _tmp0_ = NULL;
2085 #line 320 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2086         g_return_if_fail (self != NULL);
2087 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2088         _tmp0_ = moonshot_server_new (self);
2089 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2090         _g_object_unref0 (self->priv->ipc_server);
2091 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2092         self->priv->ipc_server = _tmp0_;
2093 #line 323 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2094         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*) ((___lambda9__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda9__gbus_name_acquired_callback, identity_manager_app_ref (self), identity_manager_app_unref)), (GClosure*) ((___lambda10__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda10__gbus_name_lost_callback, identity_manager_app_ref (self), identity_manager_app_unref)));
2095 #line 2094 "moonshot-identity-manager-app.c"
2096 }
2097
2098
2099 static void value_identity_manager_app_init (GValue* value) {
2100 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2101         value->data[0].v_pointer = NULL;
2102 #line 2101 "moonshot-identity-manager-app.c"
2103 }
2104
2105
2106 static void value_identity_manager_app_free_value (GValue* value) {
2107 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2108         if (value->data[0].v_pointer) {
2109 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2110                 identity_manager_app_unref (value->data[0].v_pointer);
2111 #line 2110 "moonshot-identity-manager-app.c"
2112         }
2113 }
2114
2115
2116 static void value_identity_manager_app_copy_value (const GValue* src_value, GValue* dest_value) {
2117 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2118         if (src_value->data[0].v_pointer) {
2119 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2120                 dest_value->data[0].v_pointer = identity_manager_app_ref (src_value->data[0].v_pointer);
2121 #line 2120 "moonshot-identity-manager-app.c"
2122         } else {
2123 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2124                 dest_value->data[0].v_pointer = NULL;
2125 #line 2124 "moonshot-identity-manager-app.c"
2126         }
2127 }
2128
2129
2130 static gpointer value_identity_manager_app_peek_pointer (const GValue* value) {
2131 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2132         return value->data[0].v_pointer;
2133 #line 2132 "moonshot-identity-manager-app.c"
2134 }
2135
2136
2137 static gchar* value_identity_manager_app_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2138 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2139         if (collect_values[0].v_pointer) {
2140 #line 2139 "moonshot-identity-manager-app.c"
2141                 IdentityManagerApp* object;
2142                 object = collect_values[0].v_pointer;
2143 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2144                 if (object->parent_instance.g_class == NULL) {
2145 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2146                         return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2147 #line 2146 "moonshot-identity-manager-app.c"
2148                 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
2149 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2150                         return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2151 #line 2150 "moonshot-identity-manager-app.c"
2152                 }
2153 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2154                 value->data[0].v_pointer = identity_manager_app_ref (object);
2155 #line 2154 "moonshot-identity-manager-app.c"
2156         } else {
2157 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2158                 value->data[0].v_pointer = NULL;
2159 #line 2158 "moonshot-identity-manager-app.c"
2160         }
2161 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2162         return NULL;
2163 #line 2162 "moonshot-identity-manager-app.c"
2164 }
2165
2166
2167 static gchar* value_identity_manager_app_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2168         IdentityManagerApp** object_p;
2169         object_p = collect_values[0].v_pointer;
2170 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2171         if (!object_p) {
2172 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2173                 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
2174 #line 2173 "moonshot-identity-manager-app.c"
2175         }
2176 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2177         if (!value->data[0].v_pointer) {
2178 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2179                 *object_p = NULL;
2180 #line 2179 "moonshot-identity-manager-app.c"
2181         } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
2182 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2183                 *object_p = value->data[0].v_pointer;
2184 #line 2183 "moonshot-identity-manager-app.c"
2185         } else {
2186 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2187                 *object_p = identity_manager_app_ref (value->data[0].v_pointer);
2188 #line 2187 "moonshot-identity-manager-app.c"
2189         }
2190 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2191         return NULL;
2192 #line 2191 "moonshot-identity-manager-app.c"
2193 }
2194
2195
2196 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
2197         ParamSpecIdentityManagerApp* spec;
2198 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2199         g_return_val_if_fail (g_type_is_a (object_type, TYPE_IDENTITY_MANAGER_APP), NULL);
2200 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2201         spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
2202 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2203         G_PARAM_SPEC (spec)->value_type = object_type;
2204 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2205         return G_PARAM_SPEC (spec);
2206 #line 2205 "moonshot-identity-manager-app.c"
2207 }
2208
2209
2210 gpointer value_get_identity_manager_app (const GValue* value) {
2211 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2212         g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP), NULL);
2213 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2214         return value->data[0].v_pointer;
2215 #line 2214 "moonshot-identity-manager-app.c"
2216 }
2217
2218
2219 void value_set_identity_manager_app (GValue* value, gpointer v_object) {
2220         IdentityManagerApp* old;
2221 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2222         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
2223 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2224         old = value->data[0].v_pointer;
2225 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2226         if (v_object) {
2227 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2228                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
2229 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2230                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2231 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2232                 value->data[0].v_pointer = v_object;
2233 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2234                 identity_manager_app_ref (value->data[0].v_pointer);
2235 #line 2234 "moonshot-identity-manager-app.c"
2236         } else {
2237 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2238                 value->data[0].v_pointer = NULL;
2239 #line 2238 "moonshot-identity-manager-app.c"
2240         }
2241 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2242         if (old) {
2243 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2244                 identity_manager_app_unref (old);
2245 #line 2244 "moonshot-identity-manager-app.c"
2246         }
2247 }
2248
2249
2250 void value_take_identity_manager_app (GValue* value, gpointer v_object) {
2251         IdentityManagerApp* old;
2252 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2253         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
2254 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2255         old = value->data[0].v_pointer;
2256 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2257         if (v_object) {
2258 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2259                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
2260 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2261                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2262 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2263                 value->data[0].v_pointer = v_object;
2264 #line 2263 "moonshot-identity-manager-app.c"
2265         } else {
2266 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2267                 value->data[0].v_pointer = NULL;
2268 #line 2267 "moonshot-identity-manager-app.c"
2269         }
2270 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2271         if (old) {
2272 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2273                 identity_manager_app_unref (old);
2274 #line 2273 "moonshot-identity-manager-app.c"
2275         }
2276 }
2277
2278
2279 static void identity_manager_app_class_init (IdentityManagerAppClass * klass) {
2280 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2281         identity_manager_app_parent_class = g_type_class_peek_parent (klass);
2282 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2283         IDENTITY_MANAGER_APP_CLASS (klass)->finalize = identity_manager_app_finalize;
2284 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2285         g_type_class_add_private (klass, sizeof (IdentityManagerAppPrivate));
2286 #line 2285 "moonshot-identity-manager-app.c"
2287 }
2288
2289
2290 static void identity_manager_app_instance_init (IdentityManagerApp * self) {
2291 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2292         self->priv = IDENTITY_MANAGER_APP_GET_PRIVATE (self);
2293 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2294         self->ref_count = 1;
2295 #line 2294 "moonshot-identity-manager-app.c"
2296 }
2297
2298
2299 static void identity_manager_app_finalize (IdentityManagerApp* obj) {
2300         IdentityManagerApp * self;
2301 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2302         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp);
2303 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2304         _g_object_unref0 (self->model);
2305 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2306         _g_object_unref0 (self->default_id_card);
2307 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2308         _g_object_unref0 (self->view);
2309 #line 51 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2310         _g_object_unref0 (self->priv->ipc_server);
2311 #line 2310 "moonshot-identity-manager-app.c"
2312 }
2313
2314
2315 GType identity_manager_app_get_type (void) {
2316         static volatile gsize identity_manager_app_type_id__volatile = 0;
2317         if (g_once_init_enter (&identity_manager_app_type_id__volatile)) {
2318                 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 };
2319                 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 };
2320                 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) };
2321                 GType identity_manager_app_type_id;
2322                 identity_manager_app_type_id = g_type_register_fundamental (g_type_fundamental_next (), "IdentityManagerApp", &g_define_type_info, &g_define_type_fundamental_info, 0);
2323                 g_once_init_leave (&identity_manager_app_type_id__volatile, identity_manager_app_type_id);
2324         }
2325         return identity_manager_app_type_id__volatile;
2326 }
2327
2328
2329 gpointer identity_manager_app_ref (gpointer instance) {
2330         IdentityManagerApp* self;
2331         self = instance;
2332 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2333         g_atomic_int_inc (&self->ref_count);
2334 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2335         return instance;
2336 #line 2335 "moonshot-identity-manager-app.c"
2337 }
2338
2339
2340 void identity_manager_app_unref (gpointer instance) {
2341         IdentityManagerApp* self;
2342         self = instance;
2343 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2344         if (g_atomic_int_dec_and_test (&self->ref_count)) {
2345 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2346                 IDENTITY_MANAGER_APP_GET_CLASS (self)->finalize (self);
2347 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2348                 g_type_free_instance ((GTypeInstance *) self);
2349 #line 2348 "moonshot-identity-manager-app.c"
2350         }
2351 }
2352
2353
2354 gint _vala_main (gchar** args, int args_length1) {
2355         gint result = 0;
2356         gboolean headless = FALSE;
2357         const gchar* _tmp0_ = NULL;
2358         gboolean _tmp1_ = FALSE;
2359         IdentityManagerApp* app = NULL;
2360         gboolean _tmp27_ = FALSE;
2361         gboolean _tmp28_ = FALSE;
2362         IdentityManagerApp* _tmp29_ = NULL;
2363         IdentityManagerApp* _tmp30_ = NULL;
2364         gboolean _tmp31_ = FALSE;
2365         IdentityManagerApp* _tmp32_ = NULL;
2366         gboolean _tmp33_ = FALSE;
2367         gboolean _tmp35_ = FALSE;
2368         GError * _inner_error_ = NULL;
2369 #line 361 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2370         _tmp0_ = g_getenv ("DISPLAY");
2371 #line 361 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2372         headless = _tmp0_ == NULL;
2373 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2374         _tmp1_ = headless;
2375 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2376         if (_tmp1_) {
2377 #line 2376 "moonshot-identity-manager-app.c"
2378                 {
2379                         GOptionContext* opt_context = NULL;
2380                         GOptionContext* _tmp2_ = NULL;
2381                         GOptionContext* _tmp3_ = NULL;
2382                         GOptionContext* _tmp4_ = NULL;
2383                         GOptionContext* _tmp5_ = NULL;
2384 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2385                         _tmp2_ = g_option_context_new (NULL);
2386 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2387                         opt_context = _tmp2_;
2388 #line 367 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2389                         _tmp3_ = opt_context;
2390 #line 367 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2391                         g_option_context_set_help_enabled (_tmp3_, TRUE);
2392 #line 368 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2393                         _tmp4_ = opt_context;
2394 #line 368 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2395                         g_option_context_add_main_entries (_tmp4_, options, NULL);
2396 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2397                         _tmp5_ = opt_context;
2398 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2399                         g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
2400 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2401                         if (_inner_error_ != NULL) {
2402 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2403                                 _g_option_context_free0 (opt_context);
2404 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2405                                 if (_inner_error_->domain == G_OPTION_ERROR) {
2406 #line 2405 "moonshot-identity-manager-app.c"
2407                                         goto __catch2_g_option_error;
2408                                 }
2409 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2410                                 _g_option_context_free0 (opt_context);
2411 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2412                                 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2413 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2414                                 g_clear_error (&_inner_error_);
2415 #line 369 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2416                                 return 0;
2417 #line 2416 "moonshot-identity-manager-app.c"
2418                         }
2419 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2420                         _g_option_context_free0 (opt_context);
2421 #line 2420 "moonshot-identity-manager-app.c"
2422                 }
2423                 goto __finally2;
2424                 __catch2_g_option_error:
2425                 {
2426                         GError* e = NULL;
2427                         FILE* _tmp6_ = NULL;
2428                         const gchar* _tmp7_ = NULL;
2429                         GError* _tmp8_ = NULL;
2430                         const gchar* _tmp9_ = NULL;
2431                         FILE* _tmp10_ = NULL;
2432                         const gchar* _tmp11_ = NULL;
2433                         gchar** _tmp12_ = NULL;
2434                         gint _tmp12__length1 = 0;
2435                         const gchar* _tmp13_ = NULL;
2436 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2437                         e = _inner_error_;
2438 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2439                         _inner_error_ = NULL;
2440 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2441                         _tmp6_ = stdout;
2442 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2443                         _tmp7_ = _ ("error: %s\n");
2444 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2445                         _tmp8_ = e;
2446 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2447                         _tmp9_ = _tmp8_->message;
2448 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2449                         fprintf (_tmp6_, _tmp7_, _tmp9_);
2450 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2451                         _tmp10_ = stdout;
2452 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2453                         _tmp11_ = _ ("Run '%s --help' to see a full list of available options\n");
2454 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2455                         _tmp12_ = args;
2456 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2457                         _tmp12__length1 = args_length1;
2458 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2459                         _tmp13_ = _tmp12_[0];
2460 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2461                         fprintf (_tmp10_, _tmp11_, _tmp13_);
2462 #line 373 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2463                         result = -1;
2464 #line 373 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2465                         _g_error_free0 (e);
2466 #line 373 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2467                         return result;
2468 #line 2467 "moonshot-identity-manager-app.c"
2469                 }
2470                 __finally2:
2471 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2472                 if (_inner_error_ != NULL) {
2473 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2474                         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);
2475 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2476                         g_clear_error (&_inner_error_);
2477 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2478                         return 0;
2479 #line 2478 "moonshot-identity-manager-app.c"
2480                 }
2481 #line 375 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2482                 explicitly_launched = FALSE;
2483 #line 2482 "moonshot-identity-manager-app.c"
2484         } else {
2485                 {
2486                         gboolean _tmp14_ = FALSE;
2487                         const gchar* _tmp15_ = NULL;
2488                         gboolean _tmp16_ = FALSE;
2489 #line 378 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2490                         _tmp15_ = _ ("");
2491 #line 378 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2492                         _tmp16_ = gtk_init_with_args (&args_length1, &args, _tmp15_, options, NULL, &_inner_error_);
2493 #line 378 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2494                         _tmp14_ = _tmp16_;
2495 #line 378 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2496                         if (_inner_error_ != NULL) {
2497 #line 2496 "moonshot-identity-manager-app.c"
2498                                 goto __catch3_g_error;
2499                         }
2500 #line 378 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2501                         if (!_tmp14_) {
2502 #line 2501 "moonshot-identity-manager-app.c"
2503                                 FILE* _tmp17_ = NULL;
2504                                 const gchar* _tmp18_ = NULL;
2505 #line 379 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2506                                 _tmp17_ = stdout;
2507 #line 379 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2508                                 _tmp18_ = _ ("unable to initialize window\n");
2509 #line 379 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2510                                 fprintf (_tmp17_, "%s", _tmp18_);
2511 #line 380 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2512                                 result = -1;
2513 #line 380 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2514                                 return result;
2515 #line 2514 "moonshot-identity-manager-app.c"
2516                         }
2517                 }
2518                 goto __finally3;
2519                 __catch3_g_error:
2520                 {
2521                         GError* e = NULL;
2522                         FILE* _tmp19_ = NULL;
2523                         const gchar* _tmp20_ = NULL;
2524                         GError* _tmp21_ = NULL;
2525                         const gchar* _tmp22_ = NULL;
2526                         FILE* _tmp23_ = NULL;
2527                         const gchar* _tmp24_ = NULL;
2528                         gchar** _tmp25_ = NULL;
2529                         gint _tmp25__length1 = 0;
2530                         const gchar* _tmp26_ = NULL;
2531 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2532                         e = _inner_error_;
2533 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2534                         _inner_error_ = NULL;
2535 #line 383 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2536                         _tmp19_ = stdout;
2537 #line 383 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2538                         _tmp20_ = _ ("error: %s\n");
2539 #line 383 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2540                         _tmp21_ = e;
2541 #line 383 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2542                         _tmp22_ = _tmp21_->message;
2543 #line 383 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2544                         fprintf (_tmp19_, _tmp20_, _tmp22_);
2545 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2546                         _tmp23_ = stdout;
2547 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2548                         _tmp24_ = _ ("Run '%s --help' to see a full list of available options\n");
2549 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2550                         _tmp25_ = args;
2551 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2552                         _tmp25__length1 = args_length1;
2553 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2554                         _tmp26_ = _tmp25_[0];
2555 #line 384 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2556                         fprintf (_tmp23_, _tmp24_, _tmp26_);
2557 #line 385 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2558                         result = -1;
2559 #line 385 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2560                         _g_error_free0 (e);
2561 #line 385 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2562                         return result;
2563 #line 2562 "moonshot-identity-manager-app.c"
2564                 }
2565                 __finally3:
2566 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2567                 if (_inner_error_ != NULL) {
2568 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2569                         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);
2570 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2571                         g_clear_error (&_inner_error_);
2572 #line 377 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2573                         return 0;
2574 #line 2573 "moonshot-identity-manager-app.c"
2575                 }
2576 #line 387 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2577                 gtk_available = TRUE;
2578 #line 2577 "moonshot-identity-manager-app.c"
2579         }
2580 #line 397 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2581         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
2582 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2583         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
2584 #line 399 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2585         textdomain (GETTEXT_PACKAGE);
2586 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2587         _tmp27_ = headless;
2588 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2589         _tmp28_ = use_flat_file_store;
2590 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2591         _tmp29_ = identity_manager_app_new (_tmp27_, _tmp28_);
2592 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2593         app = _tmp29_;
2594 #line 403 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2595         _tmp30_ = app;
2596 #line 403 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2597         _tmp31_ = explicitly_launched;
2598 #line 403 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2599         _tmp30_->explicitly_launched = _tmp31_;
2600 #line 405 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2601         _tmp32_ = app;
2602 #line 405 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2603         _tmp33_ = _tmp32_->explicitly_launched;
2604 #line 405 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2605         if (_tmp33_) {
2606 #line 2605 "moonshot-identity-manager-app.c"
2607                 IdentityManagerApp* _tmp34_ = NULL;
2608 #line 406 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2609                 _tmp34_ = app;
2610 #line 406 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2611                 identity_manager_app_show (_tmp34_);
2612 #line 2611 "moonshot-identity-manager-app.c"
2613         }
2614 #line 409 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2615         _tmp35_ = headless;
2616 #line 409 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2617         if (_tmp35_) {
2618 #line 2617 "moonshot-identity-manager-app.c"
2619                 GMainLoop* loop = NULL;
2620                 GMainLoop* _tmp36_ = NULL;
2621                 GMainLoop* _tmp37_ = NULL;
2622 #line 411 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2623                 _tmp36_ = g_main_loop_new (NULL, FALSE);
2624 #line 411 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2625                 loop = _tmp36_;
2626 #line 412 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2627                 _tmp37_ = loop;
2628 #line 412 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2629                 g_main_loop_run (_tmp37_);
2630 #line 409 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2631                 _g_main_loop_unref0 (loop);
2632 #line 2631 "moonshot-identity-manager-app.c"
2633         } else {
2634 #line 415 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2635                 gtk_main ();
2636 #line 2635 "moonshot-identity-manager-app.c"
2637         }
2638 #line 418 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2639         result = 0;
2640 #line 418 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2641         _identity_manager_app_unref0 (app);
2642 #line 418 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2643         return result;
2644 #line 2643 "moonshot-identity-manager-app.c"
2645 }
2646
2647
2648 int main (int argc, char ** argv) {
2649 #if !GLIB_CHECK_VERSION (2,35,0)
2650         g_type_init ();
2651 #endif
2652 #line 357 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2653         return _vala_main (argv, argc);
2654 #line 2653 "moonshot-identity-manager-app.c"
2655 }
2656
2657
2658 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2659         if ((array != NULL) && (destroy_func != NULL)) {
2660                 int i;
2661                 for (i = 0; i < array_length; i = i + 1) {
2662                         if (((gpointer*) array)[i] != NULL) {
2663                                 destroy_func (((gpointer*) array)[i]);
2664                         }
2665                 }
2666         }
2667 }
2668
2669
2670 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2671         _vala_array_destroy (array, array_length, destroy_func);
2672         g_free (array);
2673 }
2674
2675
2676 static gint _vala_array_length (gpointer array) {
2677         int length;
2678         length = 0;
2679         if (array) {
2680                 while (((gpointer*) array)[length]) {
2681                         length++;
2682                 }
2683         }
2684         return length;
2685 }
2686
2687
2688