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