Bump version to 1.0.6-2 for Debian builds.
[moonshot-ui.git] / src / moonshot-identity-manager-app.c
1 /* moonshot-identity-manager-app.c generated by valac 0.34.9, the Vala compiler
2  * generated from moonshot-identity-manager-app.vala, do not modify */
3
4 /*
5  * Copyright (c) 2011-2016, 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 <stdlib.h>
42 #include <gnome-keyring.h>
43 #include <gee.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
113 #define TYPE_MOONSHOT_LOGGER (moonshot_logger_get_type ())
114 #define MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLogger))
115 #define MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))
116 #define IS_MOONSHOT_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOONSHOT_LOGGER))
117 #define IS_MOONSHOT_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOONSHOT_LOGGER))
118 #define MOONSHOT_LOGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOONSHOT_LOGGER, MoonshotLoggerClass))
119
120 typedef struct _MoonshotLogger MoonshotLogger;
121 typedef struct _MoonshotLoggerClass MoonshotLoggerClass;
122 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
123
124 #define IIDENTITY_CARD_STORE_TYPE_STORE_TYPE (iidentity_card_store_store_type_get_type ())
125
126 #define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
127 #define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
128 #define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
129 #define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
130 #define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
131 #define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
132
133 typedef struct _IdentityRequest IdentityRequest;
134 typedef struct _IdentityRequestClass IdentityRequestClass;
135 typedef struct _Block1Data Block1Data;
136 #define _identity_manager_app_unref0(var) ((var == NULL) ? NULL : (var = (identity_manager_app_unref (var), NULL)))
137 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
138 #define _g_free0(var) (var = (g_free (var), NULL))
139
140 #define TYPE_RULE (rule_get_type ())
141 typedef struct _Rule Rule;
142 #define _g_pattern_spec_free0(var) ((var == NULL) ? NULL : (var = (g_pattern_spec_free (var), NULL)))
143 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
144 typedef struct _Block2Data Block2Data;
145 typedef struct _ParamSpecIdentityManagerApp ParamSpecIdentityManagerApp;
146 #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
147 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
148
149 struct _IIdentityManagerIface {
150         GTypeInterface parent_iface;
151         gboolean (*show_ui) (IIdentityManager* self, GError** error);
152 };
153
154 struct _IdentityManagerApp {
155         GTypeInstance parent_instance;
156         volatile int ref_count;
157         IdentityManagerAppPrivate * priv;
158         IdentityManagerModel* model;
159         IdCard* default_id_card;
160         gboolean explicitly_launched;
161         IdentityManagerView* view;
162 };
163
164 struct _IdentityManagerAppClass {
165         GTypeClass parent_class;
166         void (*finalize) (IdentityManagerApp *self);
167 };
168
169 struct _IdentityManagerAppPrivate {
170         MoonshotServer* ipc_server;
171         gboolean name_is_owned;
172         gboolean show_requested;
173         gboolean _use_flat_file_store;
174         gboolean _headless;
175 };
176
177 typedef enum  {
178         IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE,
179         IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING
180 } IIdentityCardStoreStoreType;
181
182 struct _Block1Data {
183         int _ref_count_;
184         IdentityManagerApp* self;
185         IdCard* identity;
186         IdentityRequest* request;
187 };
188
189 struct _IdentityRequest {
190         GObject parent_instance;
191         IdentityRequestPrivate * priv;
192         IdCard* id_card;
193         gboolean complete;
194         gboolean select_default;
195         gchar* nai;
196         gchar* password;
197         gchar* service;
198         GSList* candidates;
199 };
200
201 struct _IdentityRequestClass {
202         GObjectClass parent_class;
203 };
204
205 struct _Rule {
206         gchar* pattern;
207         gchar* always_confirm;
208 };
209
210 struct _Block2Data {
211         int _ref_count_;
212         IdentityManagerApp* self;
213         gboolean shown;
214         gchar* our_name;
215 };
216
217 struct _ParamSpecIdentityManagerApp {
218         GParamSpec parent_instance;
219 };
220
221
222 static gpointer identity_manager_app_parent_class = NULL;
223 extern MoonshotLogger* identity_manager_app_logger;
224 MoonshotLogger* identity_manager_app_logger = NULL;
225 extern gboolean explicitly_launched;
226 gboolean explicitly_launched = TRUE;
227 extern gboolean use_flat_file_store;
228 gboolean use_flat_file_store = FALSE;
229 extern gboolean gtk_available;
230
231 GType iidentity_manager_proxy_get_type (void) G_GNUC_CONST;
232 guint iidentity_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
233 GType iidentity_manager_get_type (void) G_GNUC_CONST;
234 gboolean iidentity_manager_show_ui (IIdentityManager* self, GError** error);
235 static void iidentity_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
236 static gboolean iidentity_manager_proxy_show_ui (IIdentityManager* self, GError** error);
237 static void iidentity_manager_proxy_iidentity_manager_interface_init (IIdentityManagerIface* iface);
238 static void _dbus_iidentity_manager_show_ui (IIdentityManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
239 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);
240 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);
241 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);
242 static void _iidentity_manager_unregister_object (gpointer user_data);
243 gpointer identity_manager_app_ref (gpointer instance);
244 void identity_manager_app_unref (gpointer instance);
245 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
246 void value_set_identity_manager_app (GValue* value, gpointer v_object);
247 void value_take_identity_manager_app (GValue* value, gpointer v_object);
248 gpointer value_get_identity_manager_app (const GValue* value);
249 GType identity_manager_app_get_type (void) G_GNUC_CONST;
250 GType identity_manager_model_get_type (void) G_GNUC_CONST;
251 GType id_card_get_type (void) G_GNUC_CONST;
252 GType identity_manager_view_get_type (void) G_GNUC_CONST;
253 GType moonshot_server_get_type (void) G_GNUC_CONST;
254 guint moonshot_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
255 #define IDENTITY_MANAGER_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppPrivate))
256 enum  {
257         IDENTITY_MANAGER_APP_DUMMY_PROPERTY
258 };
259 GType moonshot_logger_get_type (void) G_GNUC_CONST;
260 MoonshotLogger* get_logger (const gchar* name);
261 void identity_manager_app_show (IdentityManagerApp* self);
262 void identity_manager_view_make_visible (IdentityManagerView* self);
263 IdentityManagerApp* identity_manager_app_new (gboolean headless, gboolean use_flat_file_store);
264 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless, gboolean use_flat_file_store);
265 static void identity_manager_app_set_headless (IdentityManagerApp* self, gboolean value);
266 gboolean UserForcesFlatFileStore (void);
267 static void identity_manager_app_set_use_flat_file_store (IdentityManagerApp* self, gboolean value);
268 GType iidentity_card_store_store_type_get_type (void) G_GNUC_CONST;
269 IdentityManagerModel* identity_manager_model_new (IdentityManagerApp* parent_app, IIdentityCardStoreStoreType store_type);
270 IdentityManagerModel* identity_manager_model_construct (GType object_type, IdentityManagerApp* parent_app, IIdentityCardStoreStoreType store_type);
271 gboolean identity_manager_model_HasNonTrivialIdentities (IdentityManagerModel* self);
272 void identity_manager_model_set_store_type (IdentityManagerModel* self, IIdentityCardStoreStoreType type);
273 IdentityManagerView* identity_manager_view_new (IdentityManagerApp* app, gboolean use_flat_file_store);
274 IdentityManagerView* identity_manager_view_construct (GType object_type, IdentityManagerApp* app, gboolean use_flat_file_store);
275 GeeLinkedList* identity_manager_model_get_card_list (IdentityManagerModel* self);
276 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self);
277 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id, gboolean force_flat_file_store, GeeArrayList** old_duplicates);
278 void moonshot_logger_trace (MoonshotLogger* self, const gchar* message, GError* e);
279 gboolean identity_manager_view_add_identity (IdentityManagerView* self, IdCard* id_card, gboolean force_flat_file_store, GeeArrayList** old_duplicates);
280 void identity_manager_model_add_card (IdentityManagerModel* self, IdCard* card, gboolean force_flat_file_store, GeeArrayList** old_duplicates);
281 GType identity_request_get_type (void) G_GNUC_CONST;
282 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request);
283 static Block1Data* block1_data_ref (Block1Data* _data1_);
284 static void block1_data_unref (void * _userdata_);
285 const gchar* id_card_get_nai (IdCard* self);
286 const gchar* id_card_get_display_name (IdCard* self);
287 GeeArrayList* id_card_get_services (IdCard* self);
288 GType rule_get_type (void) G_GNUC_CONST;
289 Rule* rule_dup (const Rule* self);
290 void rule_free (Rule* self);
291 void rule_copy (const Rule* self, Rule* dest);
292 void rule_destroy (Rule* self);
293 Rule* id_card_get_rules (IdCard* self, int* result_length1);
294 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern);
295 IdCard* id_card_new (void);
296 IdCard* id_card_construct (GType object_type);
297 void id_card_set_display_name (IdCard* self, const gchar* value);
298 void id_card_set_username (IdCard* self, const gchar* value);
299 void id_card_set_issuer (IdCard* self, const gchar* value);
300 void id_card_set_password (IdCard* self, const gchar* value);
301 void id_card_set_temporary (IdCard* self, gboolean value);
302 void identity_manager_view_queue_identity_request (IdentityManagerView* self, IdentityRequest* request);
303 static gboolean __lambda5_ (Block1Data* _data1_);
304 IdCard* identity_manager_view_check_add_password (IdentityManagerView* self, IdCard* identity, IdentityRequest* request, IdentityManagerModel* model);
305 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card, gboolean update_card);
306 static gboolean ___lambda5__gsource_func (gpointer self);
307 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn);
308 MoonshotServer* moonshot_server_new (IdentityManagerApp* app);
309 MoonshotServer* moonshot_server_construct (GType object_type, IdentityManagerApp* app);
310 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
311 static void ___lambda23_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
312 static void ____lambda23__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
313 static void ___lambda24_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name);
314 void moonshot_logger_error (MoonshotLogger* self, const gchar* message, GError* e);
315 static void ____lambda24__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
316 static Block2Data* block2_data_ref (Block2Data* _data2_);
317 static void block2_data_unref (void * _userdata_);
318 static void __lambda25_ (Block2Data* _data2_, GDBusConnection* conn, const gchar* name);
319 static void ___lambda25__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
320 static void __lambda26_ (Block2Data* _data2_);
321 static void ___lambda26__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
322 gboolean identity_manager_app_get_use_flat_file_store (IdentityManagerApp* self);
323 gboolean identity_manager_app_get_headless (IdentityManagerApp* self);
324 static void identity_manager_app_finalize (IdentityManagerApp* obj);
325 gint _vala_main (gchar** args, int args_length1);
326 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
327 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
328 static gint _vala_array_length (gpointer array);
329
330 static const GDBusArgInfo _iidentity_manager_dbus_arg_info_show_ui_result = {-1, "result", "b"};
331 static const GDBusArgInfo * const _iidentity_manager_dbus_arg_info_show_ui_in[] = {NULL};
332 static const GDBusArgInfo * const _iidentity_manager_dbus_arg_info_show_ui_out[] = {&_iidentity_manager_dbus_arg_info_show_ui_result, NULL};
333 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)};
334 static const GDBusMethodInfo * const _iidentity_manager_dbus_method_info[] = {&_iidentity_manager_dbus_method_info_show_ui, NULL};
335 static const GDBusSignalInfo * const _iidentity_manager_dbus_signal_info[] = {NULL};
336 static const GDBusPropertyInfo * const _iidentity_manager_dbus_property_info[] = {NULL};
337 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)};
338 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};
339 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" \
340 "ss operation)", NULL}, {NULL}};
341
342 gboolean iidentity_manager_show_ui (IIdentityManager* self, GError** error) {
343 #line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
344         g_return_val_if_fail (self != NULL, FALSE);
345 #line 41 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
346         return IIDENTITY_MANAGER_GET_INTERFACE (self)->show_ui (self, error);
347 #line 347 "moonshot-identity-manager-app.c"
348 }
349
350
351 static void iidentity_manager_base_init (IIdentityManagerIface * iface) {
352 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
353         static gboolean initialized = FALSE;
354 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
355         if (!initialized) {
356 #line 37 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
357                 initialized = TRUE;
358 #line 358 "moonshot-identity-manager-app.c"
359         }
360 }
361
362
363 GType iidentity_manager_get_type (void) {
364         static volatile gsize iidentity_manager_type_id__volatile = 0;
365         if (g_once_init_enter (&iidentity_manager_type_id__volatile)) {
366                 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 };
367                 GType iidentity_manager_type_id;
368                 iidentity_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "IIdentityManager", &g_define_type_info, 0);
369                 g_type_interface_add_prerequisite (iidentity_manager_type_id, G_TYPE_OBJECT);
370                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) iidentity_manager_proxy_get_type);
371                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.janet.Moonshot");
372                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_iidentity_manager_dbus_interface_info));
373                 g_type_set_qdata (iidentity_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) iidentity_manager_register_object);
374                 g_once_init_leave (&iidentity_manager_type_id__volatile, iidentity_manager_type_id);
375         }
376         return iidentity_manager_type_id__volatile;
377 }
378
379
380 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) )
381 static void iidentity_manager_proxy_class_init (IIdentityManagerProxyClass* klass) {
382         G_DBUS_PROXY_CLASS (klass)->g_signal = iidentity_manager_proxy_g_signal;
383 }
384
385
386 static void iidentity_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
387 }
388
389
390 static void iidentity_manager_proxy_init (IIdentityManagerProxy* self) {
391 }
392
393
394 static gboolean iidentity_manager_proxy_show_ui (IIdentityManager* self, GError** error) {
395         GDBusMessage *_message;
396         GVariant *_arguments;
397         GVariantBuilder _arguments_builder;
398         GDBusMessage *_reply_message;
399         GVariant *_reply;
400         GVariantIter _reply_iter;
401         gboolean _result = FALSE;
402         GVariant* _tmp2_;
403         G_IO_ERROR;
404         _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");
405         g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
406         _arguments = g_variant_builder_end (&_arguments_builder);
407         g_dbus_message_set_body (_message, _arguments);
408         _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);
409         g_object_unref (_message);
410         if (!_reply_message) {
411                 gboolean _tmp0_ = FALSE;
412                 return _tmp0_;
413         }
414         if (g_dbus_message_to_gerror (_reply_message, error)) {
415                 gboolean _tmp1_ = FALSE;
416                 g_object_unref (_reply_message);
417                 return _tmp1_;
418         }
419         _reply = g_dbus_message_get_body (_reply_message);
420         g_variant_iter_init (&_reply_iter, _reply);
421         _tmp2_ = g_variant_iter_next_value (&_reply_iter);
422         _result = g_variant_get_boolean (_tmp2_);
423         g_variant_unref (_tmp2_);
424         g_object_unref (_reply_message);
425         return _result;
426 }
427
428
429 static void iidentity_manager_proxy_iidentity_manager_interface_init (IIdentityManagerIface* iface) {
430         iface->show_ui = iidentity_manager_proxy_show_ui;
431 }
432
433
434 static void _dbus_iidentity_manager_show_ui (IIdentityManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
435         GError* error = NULL;
436         GVariantIter _arguments_iter;
437         GDBusMessage* _reply_message = NULL;
438         GVariant* _reply;
439         GVariantBuilder _reply_builder;
440         gboolean result;
441         g_variant_iter_init (&_arguments_iter, _parameters_);
442         result = iidentity_manager_show_ui (self, &error);
443         if (error) {
444                 g_dbus_method_invocation_return_gerror (invocation, error);
445                 return;
446         }
447         _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
448         g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
449         g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
450         _reply = g_variant_builder_end (&_reply_builder);
451         g_dbus_message_set_body (_reply_message, _reply);
452         g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
453         g_object_unref (invocation);
454         g_object_unref (_reply_message);
455 }
456
457
458 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) {
459         gpointer* data;
460         gpointer object;
461         data = user_data;
462         object = data[0];
463         if (strcmp (method_name, "ShowUi") == 0) {
464                 _dbus_iidentity_manager_show_ui (object, parameters, invocation);
465         } else {
466                 g_object_unref (invocation);
467         }
468 }
469
470
471 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) {
472         gpointer* data;
473         gpointer object;
474         data = user_data;
475         object = data[0];
476         return NULL;
477 }
478
479
480 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) {
481         gpointer* data;
482         gpointer object;
483         data = user_data;
484         object = data[0];
485         return FALSE;
486 }
487
488
489 guint iidentity_manager_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
490         guint result;
491         gpointer *data;
492         data = g_new (gpointer, 3);
493         data[0] = g_object_ref (object);
494         data[1] = g_object_ref (connection);
495         data[2] = g_strdup (path);
496         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);
497         if (!result) {
498                 return 0;
499         }
500         return result;
501 }
502
503
504 static void _iidentity_manager_unregister_object (gpointer user_data) {
505         gpointer* data;
506         data = user_data;
507         g_object_unref (data[0]);
508         g_object_unref (data[1]);
509         g_free (data[2]);
510         g_free (data);
511 }
512
513
514 /** If we're successfully registered with DBus, then show the UI. Otherwise, wait until we're registered. */
515 void identity_manager_app_show (IdentityManagerApp* self) {
516         gboolean _tmp0_ = FALSE;
517 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
518         g_return_if_fail (self != NULL);
519 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
520         _tmp0_ = self->priv->name_is_owned;
521 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
522         if (_tmp0_) {
523 #line 523 "moonshot-identity-manager-app.c"
524                 IdentityManagerView* _tmp1_ = NULL;
525 #line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
526                 _tmp1_ = self->view;
527 #line 77 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
528                 if (_tmp1_ != NULL) {
529 #line 529 "moonshot-identity-manager-app.c"
530                         IdentityManagerView* _tmp2_ = NULL;
531 #line 78 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
532                         _tmp2_ = self->view;
533 #line 78 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
534                         identity_manager_view_make_visible (_tmp2_);
535 #line 535 "moonshot-identity-manager-app.c"
536                 }
537         } else {
538 #line 82 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
539                 self->priv->show_requested = TRUE;
540 #line 540 "moonshot-identity-manager-app.c"
541         }
542 }
543
544
545 IdentityManagerApp* identity_manager_app_construct (GType object_type, gboolean headless, gboolean use_flat_file_store) {
546         IdentityManagerApp* self = NULL;
547         gboolean _tmp0_ = FALSE;
548         gboolean _tmp1_ = FALSE;
549         gboolean _tmp2_ = FALSE;
550         gboolean _tmp3_ = FALSE;
551         gboolean _tmp4_ = FALSE;
552         gboolean _tmp5_ = FALSE;
553         gboolean keyring_available = FALSE;
554         IIdentityCardStoreStoreType store_type = 0;
555         gboolean _tmp7_ = FALSE;
556         gboolean _tmp8_ = FALSE;
557         gboolean _tmp9_ = FALSE;
558         IIdentityCardStoreStoreType _tmp12_ = 0;
559         IdentityManagerModel* _tmp13_ = NULL;
560         gboolean _tmp14_ = FALSE;
561         gboolean _tmp15_ = FALSE;
562         gboolean _tmp16_ = FALSE;
563         gboolean _tmp17_ = FALSE;
564         gboolean _tmp23_ = FALSE;
565         GeeLinkedList* card_list = NULL;
566         IdentityManagerModel* _tmp26_ = NULL;
567         GeeLinkedList* _tmp27_ = NULL;
568         GeeLinkedList* _tmp28_ = NULL;
569         gint _tmp29_ = 0;
570         gint _tmp30_ = 0;
571 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
572         self = (IdentityManagerApp*) g_type_create_instance (object_type);
573 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
574         _tmp0_ = headless;
575 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
576         identity_manager_app_set_headless (self, _tmp0_);
577 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
578         _tmp1_ = use_flat_file_store;
579 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
580         _tmp2_ = UserForcesFlatFileStore ();
581 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
582         use_flat_file_store = _tmp1_ | _tmp2_;
583 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
584         _tmp3_ = use_flat_file_store;
585 #line 95 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
586         identity_manager_app_set_use_flat_file_store (self, _tmp3_);
587 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
588         _tmp5_ = use_flat_file_store;
589 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
590         if (!_tmp5_) {
591 #line 591 "moonshot-identity-manager-app.c"
592                 gboolean _tmp6_ = FALSE;
593 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
594                 _tmp6_ = gnome_keyring_is_available ();
595 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
596                 _tmp4_ = _tmp6_;
597 #line 597 "moonshot-identity-manager-app.c"
598         } else {
599 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
600                 _tmp4_ = FALSE;
601 #line 601 "moonshot-identity-manager-app.c"
602         }
603 #line 98 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
604         keyring_available = _tmp4_;
605 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
606         _tmp9_ = headless;
607 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
608         if (_tmp9_) {
609 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
610                 _tmp8_ = TRUE;
611 #line 611 "moonshot-identity-manager-app.c"
612         } else {
613                 gboolean _tmp10_ = FALSE;
614 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
615                 _tmp10_ = use_flat_file_store;
616 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
617                 _tmp8_ = _tmp10_;
618 #line 618 "moonshot-identity-manager-app.c"
619         }
620 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
621         if (_tmp8_) {
622 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
623                 _tmp7_ = TRUE;
624 #line 624 "moonshot-identity-manager-app.c"
625         } else {
626                 gboolean _tmp11_ = FALSE;
627 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
628                 _tmp11_ = keyring_available;
629 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
630                 _tmp7_ = !_tmp11_;
631 #line 631 "moonshot-identity-manager-app.c"
632         }
633 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
634         if (_tmp7_) {
635 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
636                 store_type = IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE;
637 #line 637 "moonshot-identity-manager-app.c"
638         } else {
639 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
640                 store_type = IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING;
641 #line 641 "moonshot-identity-manager-app.c"
642         }
643 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
644         _tmp12_ = store_type;
645 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
646         _tmp13_ = identity_manager_model_new (self, _tmp12_);
647 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
648         _g_object_unref0 (self->model);
649 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
650         self->model = _tmp13_;
651 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
652         _tmp17_ = headless;
653 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
654         if (_tmp17_) {
655 #line 655 "moonshot-identity-manager-app.c"
656                 gboolean _tmp18_ = FALSE;
657 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
658                 _tmp18_ = keyring_available;
659 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
660                 _tmp16_ = _tmp18_;
661 #line 661 "moonshot-identity-manager-app.c"
662         } else {
663 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
664                 _tmp16_ = FALSE;
665 #line 665 "moonshot-identity-manager-app.c"
666         }
667 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
668         if (_tmp16_) {
669 #line 669 "moonshot-identity-manager-app.c"
670                 gboolean _tmp19_ = FALSE;
671 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
672                 _tmp19_ = use_flat_file_store;
673 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
674                 _tmp15_ = !_tmp19_;
675 #line 675 "moonshot-identity-manager-app.c"
676         } else {
677 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
678                 _tmp15_ = FALSE;
679 #line 679 "moonshot-identity-manager-app.c"
680         }
681 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
682         if (_tmp15_) {
683 #line 683 "moonshot-identity-manager-app.c"
684                 IdentityManagerModel* _tmp20_ = NULL;
685                 gboolean _tmp21_ = FALSE;
686 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
687                 _tmp20_ = self->model;
688 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
689                 _tmp21_ = identity_manager_model_HasNonTrivialIdentities (_tmp20_);
690 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
691                 _tmp14_ = !_tmp21_;
692 #line 692 "moonshot-identity-manager-app.c"
693         } else {
694 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
695                 _tmp14_ = FALSE;
696 #line 696 "moonshot-identity-manager-app.c"
697         }
698 #line 112 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
699         if (_tmp14_) {
700 #line 700 "moonshot-identity-manager-app.c"
701                 IdentityManagerModel* _tmp22_ = NULL;
702 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
703                 _tmp22_ = self->model;
704 #line 113 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
705                 identity_manager_model_set_store_type (_tmp22_, IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING);
706 #line 706 "moonshot-identity-manager-app.c"
707         }
708 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
709         _tmp23_ = headless;
710 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
711         if (!_tmp23_) {
712 #line 712 "moonshot-identity-manager-app.c"
713                 gboolean _tmp24_ = FALSE;
714                 IdentityManagerView* _tmp25_ = NULL;
715 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
716                 _tmp24_ = use_flat_file_store;
717 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
718                 _tmp25_ = identity_manager_view_new (self, _tmp24_);
719 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
720                 g_object_ref_sink (_tmp25_);
721 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
722                 _g_object_unref0 (self->view);
723 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
724                 self->view = _tmp25_;
725 #line 725 "moonshot-identity-manager-app.c"
726         }
727 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
728         _tmp26_ = self->model;
729 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
730         _tmp27_ = identity_manager_model_get_card_list (_tmp26_);
731 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
732         card_list = _tmp27_;
733 #line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
734         _tmp28_ = card_list;
735 #line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
736         _tmp29_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp28_);
737 #line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
738         _tmp30_ = _tmp29_;
739 #line 118 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
740         if (_tmp30_ > 0) {
741 #line 741 "moonshot-identity-manager-app.c"
742                 GeeLinkedList* _tmp31_ = NULL;
743                 gpointer _tmp32_ = NULL;
744 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
745                 _tmp31_ = card_list;
746 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
747                 _tmp32_ = gee_linked_list_last (_tmp31_);
748 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
749                 _g_object_unref0 (self->default_id_card);
750 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
751                 self->default_id_card = (IdCard*) _tmp32_;
752 #line 752 "moonshot-identity-manager-app.c"
753         }
754 #line 121 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
755         identity_manager_app_init_ipc_server (self);
756 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
757         _g_object_unref0 (card_list);
758 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
759         return self;
760 #line 760 "moonshot-identity-manager-app.c"
761 }
762
763
764 IdentityManagerApp* identity_manager_app_new (gboolean headless, gboolean use_flat_file_store) {
765 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
766         return identity_manager_app_construct (TYPE_IDENTITY_MANAGER_APP, headless, use_flat_file_store);
767 #line 767 "moonshot-identity-manager-app.c"
768 }
769
770
771 gboolean identity_manager_app_add_identity (IdentityManagerApp* self, IdCard* id, gboolean force_flat_file_store, GeeArrayList** old_duplicates) {
772         GeeArrayList* _vala_old_duplicates = NULL;
773         gboolean result = FALSE;
774         IdentityManagerView* _tmp0_ = NULL;
775 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
776         g_return_val_if_fail (self != NULL, FALSE);
777 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
778         g_return_val_if_fail (id != NULL, FALSE);
779 #line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
780         _tmp0_ = self->view;
781 #line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
782         if (_tmp0_ != NULL) {
783 #line 783 "moonshot-identity-manager-app.c"
784                 MoonshotLogger* _tmp1_ = NULL;
785                 IdentityManagerView* _tmp2_ = NULL;
786                 IdCard* _tmp3_ = NULL;
787                 gboolean _tmp4_ = FALSE;
788                 GeeArrayList* _tmp5_ = NULL;
789                 gboolean _tmp6_ = FALSE;
790 #line 135 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
791                 _tmp1_ = identity_manager_app_logger;
792 #line 135 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
793                 moonshot_logger_trace (_tmp1_, "add_identity: calling view.add_identity", NULL);
794 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
795                 _tmp2_ = self->view;
796 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
797                 _tmp3_ = id;
798 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
799                 _tmp4_ = force_flat_file_store;
800 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
801                 _tmp6_ = identity_manager_view_add_identity (_tmp2_, _tmp3_, _tmp4_, &_tmp5_);
802 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
803                 _g_object_unref0 (_vala_old_duplicates);
804 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
805                 _vala_old_duplicates = _tmp5_;
806 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
807                 result = _tmp6_;
808 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
809                 if (old_duplicates) {
810 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
811                         *old_duplicates = _vala_old_duplicates;
812 #line 812 "moonshot-identity-manager-app.c"
813                 } else {
814 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
815                         _g_object_unref0 (_vala_old_duplicates);
816 #line 816 "moonshot-identity-manager-app.c"
817                 }
818 #line 136 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
819                 return result;
820 #line 820 "moonshot-identity-manager-app.c"
821         } else {
822                 MoonshotLogger* _tmp7_ = NULL;
823                 IdentityManagerModel* _tmp8_ = NULL;
824                 IdCard* _tmp9_ = NULL;
825                 gboolean _tmp10_ = FALSE;
826                 GeeArrayList* _tmp11_ = NULL;
827 #line 139 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
828                 _tmp7_ = identity_manager_app_logger;
829 #line 139 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
830                 moonshot_logger_trace (_tmp7_, "add_identity: calling model.add_card", NULL);
831 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
832                 _tmp8_ = self->model;
833 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
834                 _tmp9_ = id;
835 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
836                 _tmp10_ = force_flat_file_store;
837 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
838                 identity_manager_model_add_card (_tmp8_, _tmp9_, _tmp10_, &_tmp11_);
839 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
840                 _g_object_unref0 (_vala_old_duplicates);
841 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
842                 _vala_old_duplicates = _tmp11_;
843 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
844                 result = TRUE;
845 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
846                 if (old_duplicates) {
847 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
848                         *old_duplicates = _vala_old_duplicates;
849 #line 849 "moonshot-identity-manager-app.c"
850                 } else {
851 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
852                         _g_object_unref0 (_vala_old_duplicates);
853 #line 853 "moonshot-identity-manager-app.c"
854                 }
855 #line 141 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
856                 return result;
857 #line 857 "moonshot-identity-manager-app.c"
858         }
859 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
860         if (old_duplicates) {
861 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
862                 *old_duplicates = _vala_old_duplicates;
863 #line 863 "moonshot-identity-manager-app.c"
864         } else {
865 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
866                 _g_object_unref0 (_vala_old_duplicates);
867 #line 867 "moonshot-identity-manager-app.c"
868         }
869 }
870
871
872 static gpointer _g_object_ref0 (gpointer self) {
873 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
874         return self ? g_object_ref (self) : NULL;
875 #line 875 "moonshot-identity-manager-app.c"
876 }
877
878
879 static Block1Data* block1_data_ref (Block1Data* _data1_) {
880 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
881         g_atomic_int_inc (&_data1_->_ref_count_);
882 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
883         return _data1_;
884 #line 884 "moonshot-identity-manager-app.c"
885 }
886
887
888 static void block1_data_unref (void * _userdata_) {
889         Block1Data* _data1_;
890         _data1_ = (Block1Data*) _userdata_;
891 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
892         if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
893 #line 893 "moonshot-identity-manager-app.c"
894                 IdentityManagerApp* self;
895 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
896                 self = _data1_->self;
897 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
898                 _g_object_unref0 (_data1_->identity);
899 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
900                 _g_object_unref0 (_data1_->request);
901 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
902                 _identity_manager_app_unref0 (self);
903 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
904                 g_slice_free (Block1Data, _data1_);
905 #line 905 "moonshot-identity-manager-app.c"
906         }
907 }
908
909
910 static const gchar* string_to_string (const gchar* self) {
911         const gchar* result = NULL;
912 #line 1420 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
913         g_return_val_if_fail (self != NULL, NULL);
914 #line 1421 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
915         result = self;
916 #line 1421 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
917         return result;
918 #line 918 "moonshot-identity-manager-app.c"
919 }
920
921
922 static gboolean __lambda5_ (Block1Data* _data1_) {
923         IdentityManagerApp* self;
924         gboolean result = FALSE;
925         IdentityManagerView* _tmp0_ = NULL;
926         IdentityRequest* _tmp7_ = NULL;
927         IdCard* _tmp8_ = NULL;
928 #line 243 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
929         self = _data1_->self;
930 #line 244 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
931         _tmp0_ = self->view;
932 #line 244 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
933         if (_tmp0_ != NULL) {
934 #line 934 "moonshot-identity-manager-app.c"
935                 MoonshotLogger* _tmp1_ = NULL;
936                 IdentityManagerView* _tmp2_ = NULL;
937                 IdCard* _tmp3_ = NULL;
938                 IdentityRequest* _tmp4_ = NULL;
939                 IdentityManagerModel* _tmp5_ = NULL;
940                 IdCard* _tmp6_ = NULL;
941 #line 245 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
942                 _tmp1_ = identity_manager_app_logger;
943 #line 245 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
944                 moonshot_logger_trace (_tmp1_, "select_identity (Idle handler): calling check_add_password", NULL);
945 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
946                 _tmp2_ = self->view;
947 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
948                 _tmp3_ = _data1_->identity;
949 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
950                 _tmp4_ = _data1_->request;
951 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
952                 _tmp5_ = self->model;
953 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
954                 _tmp6_ = identity_manager_view_check_add_password (_tmp2_, _tmp3_, _tmp4_, _tmp5_);
955 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
956                 _g_object_unref0 (_data1_->identity);
957 #line 246 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
958                 _data1_->identity = _tmp6_;
959 #line 959 "moonshot-identity-manager-app.c"
960         }
961 #line 248 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
962         _tmp7_ = _data1_->request;
963 #line 248 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
964         _tmp8_ = _data1_->identity;
965 #line 248 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
966         identity_request_return_identity (_tmp7_, _tmp8_, TRUE);
967 #line 253 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
968         result = FALSE;
969 #line 253 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
970         return result;
971 #line 971 "moonshot-identity-manager-app.c"
972 }
973
974
975 static gboolean ___lambda5__gsource_func (gpointer self) {
976         gboolean result;
977         result = __lambda5_ (self);
978 #line 242 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
979         return result;
980 #line 980 "moonshot-identity-manager-app.c"
981 }
982
983
984 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request) {
985         Block1Data* _data1_;
986         IdentityRequest* _tmp0_ = NULL;
987         IdentityRequest* _tmp1_ = NULL;
988         const gchar* _tmp2_ = NULL;
989         IdentityRequest* _tmp3_ = NULL;
990         const gchar* _tmp4_ = NULL;
991         MoonshotLogger* _tmp5_ = NULL;
992         gchar* _tmp6_ = NULL;
993         gchar* _tmp7_ = NULL;
994         IdentityRequest* _tmp8_ = NULL;
995         gboolean _tmp9_ = FALSE;
996         IdCard* _tmp12_ = NULL;
997 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
998         g_return_if_fail (self != NULL);
999 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1000         g_return_if_fail (request != NULL);
1001 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1002         _data1_ = g_slice_new0 (Block1Data);
1003 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1004         _data1_->_ref_count_ = 1;
1005 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1006         _data1_->self = identity_manager_app_ref (self);
1007 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1008         _tmp0_ = request;
1009 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1010         _tmp1_ = _g_object_ref0 (_tmp0_);
1011 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1012         _g_object_unref0 (_data1_->request);
1013 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1014         _data1_->request = _tmp1_;
1015 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1016         _tmp3_ = _data1_->request;
1017 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1018         _tmp4_ = _tmp3_->nai;
1019 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1020         _tmp2_ = _tmp4_;
1021 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1022         if (_tmp2_ == NULL) {
1023 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1024                 _tmp2_ = "[null]";
1025 #line 1025 "moonshot-identity-manager-app.c"
1026         }
1027 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1028         _tmp5_ = identity_manager_app_logger;
1029 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1030         _tmp6_ = g_strdup_printf ("select_identity: request.nai=%s", _tmp2_);
1031 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1032         _tmp7_ = _tmp6_;
1033 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1034         moonshot_logger_trace (_tmp5_, _tmp7_, NULL);
1035 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1036         _g_free0 (_tmp7_);
1037 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1038         _data1_->identity = NULL;
1039 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1040         _tmp8_ = _data1_->request;
1041 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1042         _tmp9_ = _tmp8_->select_default;
1043 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1044         if (_tmp9_) {
1045 #line 1045 "moonshot-identity-manager-app.c"
1046                 IdCard* _tmp10_ = NULL;
1047                 IdCard* _tmp11_ = NULL;
1048 #line 152 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1049                 _tmp10_ = self->default_id_card;
1050 #line 152 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1051                 _tmp11_ = _g_object_ref0 (_tmp10_);
1052 #line 152 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1053                 _g_object_unref0 (_data1_->identity);
1054 #line 152 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1055                 _data1_->identity = _tmp11_;
1056 #line 1056 "moonshot-identity-manager-app.c"
1057         }
1058 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1059         _tmp12_ = _data1_->identity;
1060 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1061         if (_tmp12_ == NULL) {
1062 #line 1062 "moonshot-identity-manager-app.c"
1063                 gboolean _tmp13_ = FALSE;
1064                 IdentityRequest* _tmp14_ = NULL;
1065                 const gchar* _tmp15_ = NULL;
1066                 gboolean has_nai = FALSE;
1067                 gboolean _tmp18_ = FALSE;
1068                 IdentityRequest* _tmp19_ = NULL;
1069                 const gchar* _tmp20_ = NULL;
1070                 gboolean has_srv = FALSE;
1071                 gboolean confirm = FALSE;
1072                 gboolean _tmp69_ = FALSE;
1073                 gboolean _tmp70_ = FALSE;
1074                 IdCard* _tmp71_ = NULL;
1075                 gboolean _tmp90_ = FALSE;
1076                 IdCard* _tmp91_ = NULL;
1077                 gboolean _tmp128_ = FALSE;
1078                 IdCard* _tmp129_ = NULL;
1079                 IdCard* _tmp151_ = NULL;
1080                 gboolean _tmp165_ = FALSE;
1081                 gboolean _tmp166_ = FALSE;
1082 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1083                 _tmp14_ = _data1_->request;
1084 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1085                 _tmp15_ = _tmp14_->nai;
1086 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1087                 if (_tmp15_ != NULL) {
1088 #line 1088 "moonshot-identity-manager-app.c"
1089                         IdentityRequest* _tmp16_ = NULL;
1090                         const gchar* _tmp17_ = NULL;
1091 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1092                         _tmp16_ = _data1_->request;
1093 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1094                         _tmp17_ = _tmp16_->nai;
1095 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1096                         _tmp13_ = g_strcmp0 (_tmp17_, "") != 0;
1097 #line 1097 "moonshot-identity-manager-app.c"
1098                 } else {
1099 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1100                         _tmp13_ = FALSE;
1101 #line 1101 "moonshot-identity-manager-app.c"
1102                 }
1103 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1104                 has_nai = _tmp13_;
1105 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1106                 _tmp19_ = _data1_->request;
1107 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1108                 _tmp20_ = _tmp19_->service;
1109 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1110                 if (_tmp20_ != NULL) {
1111 #line 1111 "moonshot-identity-manager-app.c"
1112                         IdentityRequest* _tmp21_ = NULL;
1113                         const gchar* _tmp22_ = NULL;
1114 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1115                         _tmp21_ = _data1_->request;
1116 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1117                         _tmp22_ = _tmp21_->service;
1118 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1119                         _tmp18_ = g_strcmp0 (_tmp22_, "") != 0;
1120 #line 1120 "moonshot-identity-manager-app.c"
1121                 } else {
1122 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1123                         _tmp18_ = FALSE;
1124 #line 1124 "moonshot-identity-manager-app.c"
1125                 }
1126 #line 158 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1127                 has_srv = _tmp18_;
1128 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1129                 confirm = FALSE;
1130 #line 1130 "moonshot-identity-manager-app.c"
1131                 {
1132                         GeeLinkedList* _id_list = NULL;
1133                         IdentityManagerModel* _tmp23_ = NULL;
1134                         GeeLinkedList* _tmp24_ = NULL;
1135                         gint _id_size = 0;
1136                         GeeLinkedList* _tmp25_ = NULL;
1137                         gint _tmp26_ = 0;
1138                         gint _tmp27_ = 0;
1139                         gint _id_index = 0;
1140 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1141                         _tmp23_ = self->model;
1142 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1143                         _tmp24_ = identity_manager_model_get_card_list (_tmp23_);
1144 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1145                         _id_list = _tmp24_;
1146 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1147                         _tmp25_ = _id_list;
1148 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1149                         _tmp26_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp25_);
1150 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1151                         _tmp27_ = _tmp26_;
1152 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1153                         _id_size = _tmp27_;
1154 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1155                         _id_index = -1;
1156 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1157                         while (TRUE) {
1158 #line 1158 "moonshot-identity-manager-app.c"
1159                                 gint _tmp28_ = 0;
1160                                 gint _tmp29_ = 0;
1161                                 gint _tmp30_ = 0;
1162                                 IdCard* id = NULL;
1163                                 GeeLinkedList* _tmp31_ = NULL;
1164                                 gint _tmp32_ = 0;
1165                                 gpointer _tmp33_ = NULL;
1166                                 gboolean _tmp34_ = FALSE;
1167                                 gboolean _tmp35_ = FALSE;
1168                                 gboolean _tmp49_ = FALSE;
1169 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1170                                 _tmp28_ = _id_index;
1171 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1172                                 _id_index = _tmp28_ + 1;
1173 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1174                                 _tmp29_ = _id_index;
1175 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1176                                 _tmp30_ = _id_size;
1177 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1178                                 if (!(_tmp29_ < _tmp30_)) {
1179 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1180                                         break;
1181 #line 1181 "moonshot-identity-manager-app.c"
1182                                 }
1183 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1184                                 _tmp31_ = _id_list;
1185 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1186                                 _tmp32_ = _id_index;
1187 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1188                                 _tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp31_, _tmp32_);
1189 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1190                                 id = (IdCard*) _tmp33_;
1191 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1192                                 _tmp35_ = has_nai;
1193 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1194                                 if (_tmp35_) {
1195 #line 1195 "moonshot-identity-manager-app.c"
1196                                         IdentityRequest* _tmp36_ = NULL;
1197                                         const gchar* _tmp37_ = NULL;
1198                                         IdCard* _tmp38_ = NULL;
1199                                         const gchar* _tmp39_ = NULL;
1200                                         const gchar* _tmp40_ = NULL;
1201 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1202                                         _tmp36_ = _data1_->request;
1203 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1204                                         _tmp37_ = _tmp36_->nai;
1205 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1206                                         _tmp38_ = id;
1207 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1208                                         _tmp39_ = id_card_get_nai (_tmp38_);
1209 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1210                                         _tmp40_ = _tmp39_;
1211 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1212                                         _tmp34_ = g_strcmp0 (_tmp37_, _tmp40_) == 0;
1213 #line 1213 "moonshot-identity-manager-app.c"
1214                                 } else {
1215 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1216                                         _tmp34_ = FALSE;
1217 #line 1217 "moonshot-identity-manager-app.c"
1218                                 }
1219 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1220                                 if (_tmp34_) {
1221 #line 1221 "moonshot-identity-manager-app.c"
1222                                         MoonshotLogger* _tmp41_ = NULL;
1223                                         IdCard* _tmp42_ = NULL;
1224                                         const gchar* _tmp43_ = NULL;
1225                                         const gchar* _tmp44_ = NULL;
1226                                         gchar* _tmp45_ = NULL;
1227                                         gchar* _tmp46_ = NULL;
1228                                         IdCard* _tmp47_ = NULL;
1229                                         IdCard* _tmp48_ = NULL;
1230 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1231                                         _tmp41_ = identity_manager_app_logger;
1232 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1233                                         _tmp42_ = id;
1234 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1235                                         _tmp43_ = id_card_get_display_name (_tmp42_);
1236 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1237                                         _tmp44_ = _tmp43_;
1238 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1239                                         _tmp45_ = g_strconcat ("select_identity: request has nai; returning ", _tmp44_, NULL);
1240 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1241                                         _tmp46_ = _tmp45_;
1242 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1243                                         moonshot_logger_trace (_tmp41_, _tmp46_, NULL);
1244 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1245                                         _g_free0 (_tmp46_);
1246 #line 167 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1247                                         _tmp47_ = id;
1248 #line 167 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1249                                         _tmp48_ = _g_object_ref0 (_tmp47_);
1250 #line 167 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1251                                         _g_object_unref0 (_data1_->identity);
1252 #line 167 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1253                                         _data1_->identity = _tmp48_;
1254 #line 168 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1255                                         _g_object_unref0 (id);
1256 #line 168 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1257                                         break;
1258 #line 1258 "moonshot-identity-manager-app.c"
1259                                 }
1260 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1261                                 _tmp49_ = has_srv;
1262 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1263                                 if (_tmp49_) {
1264 #line 1264 "moonshot-identity-manager-app.c"
1265                                         IdCard* _tmp50_ = NULL;
1266                                         GeeArrayList* _tmp51_ = NULL;
1267                                         GeeArrayList* _tmp52_ = NULL;
1268                                         IdentityRequest* _tmp53_ = NULL;
1269                                         const gchar* _tmp54_ = NULL;
1270                                         gboolean _tmp55_ = FALSE;
1271 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1272                                         _tmp50_ = id;
1273 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1274                                         _tmp51_ = id_card_get_services (_tmp50_);
1275 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1276                                         _tmp52_ = _tmp51_;
1277 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1278                                         _tmp53_ = _data1_->request;
1279 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1280                                         _tmp54_ = _tmp53_->service;
1281 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1282                                         _tmp55_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp52_, _tmp54_);
1283 #line 174 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1284                                         if (_tmp55_) {
1285 #line 1285 "moonshot-identity-manager-app.c"
1286                                                 MoonshotLogger* _tmp56_ = NULL;
1287                                                 IdentityRequest* _tmp57_ = NULL;
1288                                                 const gchar* _tmp58_ = NULL;
1289                                                 const gchar* _tmp59_ = NULL;
1290                                                 IdCard* _tmp60_ = NULL;
1291                                                 const gchar* _tmp61_ = NULL;
1292                                                 const gchar* _tmp62_ = NULL;
1293                                                 const gchar* _tmp63_ = NULL;
1294                                                 gchar* _tmp64_ = NULL;
1295                                                 gchar* _tmp65_ = NULL;
1296                                                 IdentityRequest* _tmp66_ = NULL;
1297                                                 IdCard* _tmp67_ = NULL;
1298                                                 IdCard* _tmp68_ = NULL;
1299 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1300                                                 _tmp56_ = identity_manager_app_logger;
1301 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1302                                                 _tmp57_ = _data1_->request;
1303 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1304                                                 _tmp58_ = _tmp57_->service;
1305 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1306                                                 _tmp59_ = string_to_string (_tmp58_);
1307 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1308                                                 _tmp60_ = id;
1309 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1310                                                 _tmp61_ = id_card_get_display_name (_tmp60_);
1311 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1312                                                 _tmp62_ = _tmp61_;
1313 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1314                                                 _tmp63_ = string_to_string (_tmp62_);
1315 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1316                                                 _tmp64_ = g_strconcat ("select_identity: request has service '", _tmp59_, "; matched on '", _tmp63_, "'", NULL);
1317 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1318                                                 _tmp65_ = _tmp64_;
1319 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1320                                                 moonshot_logger_trace (_tmp56_, _tmp65_, NULL);
1321 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1322                                                 _g_free0 (_tmp65_);
1323 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1324                                                 _tmp66_ = _data1_->request;
1325 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1326                                                 _tmp67_ = id;
1327 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1328                                                 _tmp68_ = _g_object_ref0 (_tmp67_);
1329 #line 176 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1330                                                 _tmp66_->candidates = g_slist_append (_tmp66_->candidates, _tmp68_);
1331 #line 1331 "moonshot-identity-manager-app.c"
1332                                         }
1333                                 }
1334 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1335                                 _g_object_unref0 (id);
1336 #line 1336 "moonshot-identity-manager-app.c"
1337                         }
1338 #line 161 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1339                         _g_object_unref0 (_id_list);
1340 #line 1340 "moonshot-identity-manager-app.c"
1341                 }
1342 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1343                 _tmp71_ = _data1_->identity;
1344 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1345                 if (_tmp71_ == NULL) {
1346 #line 1346 "moonshot-identity-manager-app.c"
1347                         gboolean _tmp72_ = FALSE;
1348 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1349                         _tmp72_ = has_srv;
1350 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1351                         _tmp70_ = _tmp72_;
1352 #line 1352 "moonshot-identity-manager-app.c"
1353                 } else {
1354 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1355                         _tmp70_ = FALSE;
1356 #line 1356 "moonshot-identity-manager-app.c"
1357                 }
1358 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1359                 if (_tmp70_) {
1360 #line 1360 "moonshot-identity-manager-app.c"
1361                         IdentityRequest* _tmp73_ = NULL;
1362                         GSList* _tmp74_ = NULL;
1363                         guint _tmp75_ = 0U;
1364 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1365                         _tmp73_ = _data1_->request;
1366 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1367                         _tmp74_ = _tmp73_->candidates;
1368 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1369                         _tmp75_ = g_slist_length (_tmp74_);
1370 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1371                         _tmp69_ = _tmp75_ > ((guint) 1);
1372 #line 1372 "moonshot-identity-manager-app.c"
1373                 } else {
1374 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1375                         _tmp69_ = FALSE;
1376 #line 1376 "moonshot-identity-manager-app.c"
1377                 }
1378 #line 182 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1379                 if (_tmp69_) {
1380 #line 1380 "moonshot-identity-manager-app.c"
1381                         MoonshotLogger* _tmp76_ = NULL;
1382                         IdentityRequest* _tmp77_ = NULL;
1383                         const gchar* _tmp78_ = NULL;
1384                         const gchar* _tmp79_ = NULL;
1385                         gchar* _tmp80_ = NULL;
1386                         gchar* _tmp81_ = NULL;
1387                         IdentityRequest* _tmp82_ = NULL;
1388                         GSList* _tmp83_ = NULL;
1389 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1390                         _tmp76_ = identity_manager_app_logger;
1391 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1392                         _tmp77_ = _data1_->request;
1393 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1394                         _tmp78_ = _tmp77_->service;
1395 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1396                         _tmp79_ = string_to_string (_tmp78_);
1397 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1398                         _tmp80_ = g_strconcat ("select_identity: multiple candidates; removing service '", _tmp79_, " from all.", NULL);
1399 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1400                         _tmp81_ = _tmp80_;
1401 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1402                         moonshot_logger_trace (_tmp76_, _tmp81_, NULL);
1403 #line 184 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1404                         _g_free0 (_tmp81_);
1405 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1406                         _tmp82_ = _data1_->request;
1407 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1408                         _tmp83_ = _tmp82_->candidates;
1409 #line 1409 "moonshot-identity-manager-app.c"
1410                         {
1411                                 GSList* id_collection = NULL;
1412                                 GSList* id_it = NULL;
1413 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1414                                 id_collection = _tmp83_;
1415 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1416                                 for (id_it = id_collection; id_it != NULL; id_it = id_it->next) {
1417 #line 1417 "moonshot-identity-manager-app.c"
1418                                         IdCard* _tmp84_ = NULL;
1419                                         IdCard* id = NULL;
1420 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1421                                         _tmp84_ = _g_object_ref0 ((IdCard*) id_it->data);
1422 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1423                                         id = _tmp84_;
1424 #line 1424 "moonshot-identity-manager-app.c"
1425                                         {
1426                                                 IdCard* _tmp85_ = NULL;
1427                                                 GeeArrayList* _tmp86_ = NULL;
1428                                                 GeeArrayList* _tmp87_ = NULL;
1429                                                 IdentityRequest* _tmp88_ = NULL;
1430                                                 const gchar* _tmp89_ = NULL;
1431 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1432                                                 _tmp85_ = id;
1433 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1434                                                 _tmp86_ = id_card_get_services (_tmp85_);
1435 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1436                                                 _tmp87_ = _tmp86_;
1437 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1438                                                 _tmp88_ = _data1_->request;
1439 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1440                                                 _tmp89_ = _tmp88_->service;
1441 #line 187 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1442                                                 gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp87_, _tmp89_);
1443 #line 185 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1444                                                 _g_object_unref0 (id);
1445 #line 1445 "moonshot-identity-manager-app.c"
1446                                         }
1447                                 }
1448                         }
1449                 }
1450 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1451                 _tmp91_ = _data1_->identity;
1452 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1453                 if (_tmp91_ == NULL) {
1454 #line 1454 "moonshot-identity-manager-app.c"
1455                         IdentityRequest* _tmp92_ = NULL;
1456                         GSList* _tmp93_ = NULL;
1457                         guint _tmp94_ = 0U;
1458 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1459                         _tmp92_ = _data1_->request;
1460 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1461                         _tmp93_ = _tmp92_->candidates;
1462 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1463                         _tmp94_ = g_slist_length (_tmp93_);
1464 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1465                         _tmp90_ = _tmp94_ == ((guint) 0);
1466 #line 1466 "moonshot-identity-manager-app.c"
1467                 } else {
1468 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1469                         _tmp90_ = FALSE;
1470 #line 1470 "moonshot-identity-manager-app.c"
1471                 }
1472 #line 192 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1473                 if (_tmp90_) {
1474 #line 1474 "moonshot-identity-manager-app.c"
1475                         MoonshotLogger* _tmp95_ = NULL;
1476 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1477                         _tmp95_ = identity_manager_app_logger;
1478 #line 194 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1479                         moonshot_logger_trace (_tmp95_, "select_identity: No candidates; using service matching rules.", NULL);
1480 #line 1480 "moonshot-identity-manager-app.c"
1481                         {
1482                                 GeeLinkedList* _id_list = NULL;
1483                                 IdentityManagerModel* _tmp96_ = NULL;
1484                                 GeeLinkedList* _tmp97_ = NULL;
1485                                 gint _id_size = 0;
1486                                 GeeLinkedList* _tmp98_ = NULL;
1487                                 gint _tmp99_ = 0;
1488                                 gint _tmp100_ = 0;
1489                                 gint _id_index = 0;
1490 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1491                                 _tmp96_ = self->model;
1492 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1493                                 _tmp97_ = identity_manager_model_get_card_list (_tmp96_);
1494 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1495                                 _id_list = _tmp97_;
1496 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1497                                 _tmp98_ = _id_list;
1498 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1499                                 _tmp99_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp98_);
1500 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1501                                 _tmp100_ = _tmp99_;
1502 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1503                                 _id_size = _tmp100_;
1504 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1505                                 _id_index = -1;
1506 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1507                                 while (TRUE) {
1508 #line 1508 "moonshot-identity-manager-app.c"
1509                                         gint _tmp101_ = 0;
1510                                         gint _tmp102_ = 0;
1511                                         gint _tmp103_ = 0;
1512                                         IdCard* id = NULL;
1513                                         GeeLinkedList* _tmp104_ = NULL;
1514                                         gint _tmp105_ = 0;
1515                                         gpointer _tmp106_ = NULL;
1516                                         IdCard* _tmp107_ = NULL;
1517                                         Rule* _tmp108_ = NULL;
1518                                         gint _tmp108__length1 = 0;
1519                                         Rule* _tmp109_ = NULL;
1520                                         gint _tmp109__length1 = 0;
1521 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1522                                         _tmp101_ = _id_index;
1523 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1524                                         _id_index = _tmp101_ + 1;
1525 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1526                                         _tmp102_ = _id_index;
1527 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1528                                         _tmp103_ = _id_size;
1529 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1530                                         if (!(_tmp102_ < _tmp103_)) {
1531 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1532                                                 break;
1533 #line 1533 "moonshot-identity-manager-app.c"
1534                                         }
1535 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1536                                         _tmp104_ = _id_list;
1537 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1538                                         _tmp105_ = _id_index;
1539 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1540                                         _tmp106_ = gee_abstract_list_get ((GeeAbstractList*) _tmp104_, _tmp105_);
1541 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1542                                         id = (IdCard*) _tmp106_;
1543 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1544                                         _tmp107_ = id;
1545 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1546                                         _tmp108_ = id_card_get_rules (_tmp107_, &_tmp108__length1);
1547 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1548                                         _tmp109_ = _tmp108_;
1549 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1550                                         _tmp109__length1 = _tmp108__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 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1558                                                 rule_collection = _tmp109_;
1559 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1560                                                 rule_collection_length1 = _tmp109__length1;
1561 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1562                                                 for (rule_it = 0; rule_it < _tmp109__length1; rule_it = rule_it + 1) {
1563 #line 1563 "moonshot-identity-manager-app.c"
1564                                                         Rule _tmp110_ = {0};
1565                                                         Rule rule = {0};
1566 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1567                                                         rule_copy (&rule_collection[rule_it], &_tmp110_);
1568 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1569                                                         rule = _tmp110_;
1570 #line 1570 "moonshot-identity-manager-app.c"
1571                                                         {
1572                                                                 IdentityRequest* _tmp111_ = NULL;
1573                                                                 const gchar* _tmp112_ = NULL;
1574                                                                 Rule _tmp113_ = {0};
1575                                                                 const gchar* _tmp114_ = NULL;
1576                                                                 gboolean _tmp115_ = FALSE;
1577                                                                 MoonshotLogger* _tmp116_ = NULL;
1578                                                                 IdCard* _tmp117_ = NULL;
1579                                                                 const gchar* _tmp118_ = NULL;
1580                                                                 const gchar* _tmp119_ = NULL;
1581                                                                 const gchar* _tmp120_ = NULL;
1582                                                                 gchar* _tmp121_ = NULL;
1583                                                                 gchar* _tmp122_ = NULL;
1584                                                                 IdentityRequest* _tmp123_ = NULL;
1585                                                                 IdCard* _tmp124_ = NULL;
1586                                                                 IdCard* _tmp125_ = NULL;
1587                                                                 Rule _tmp126_ = {0};
1588                                                                 const gchar* _tmp127_ = NULL;
1589 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1590                                                                 _tmp111_ = _data1_->request;
1591 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1592                                                                 _tmp112_ = _tmp111_->service;
1593 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1594                                                                 _tmp113_ = rule;
1595 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1596                                                                 _tmp114_ = _tmp113_.pattern;
1597 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1598                                                                 _tmp115_ = identity_manager_app_match_service_pattern (self, _tmp112_, _tmp114_);
1599 #line 199 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1600                                                                 if (!_tmp115_) {
1601 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1602                                                                         rule_destroy (&rule);
1603 #line 200 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1604                                                                         continue;
1605 #line 1605 "moonshot-identity-manager-app.c"
1606                                                                 }
1607 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1608                                                                 _tmp116_ = identity_manager_app_logger;
1609 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1610                                                                 _tmp117_ = id;
1611 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1612                                                                 _tmp118_ = id_card_get_display_name (_tmp117_);
1613 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1614                                                                 _tmp119_ = _tmp118_;
1615 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1616                                                                 _tmp120_ = string_to_string (_tmp119_);
1617 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1618                                                                 _tmp121_ = g_strconcat ("select_identity: ID ", _tmp120_, " matched on service matching rules.", NULL);
1619 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1620                                                                 _tmp122_ = _tmp121_;
1621 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1622                                                                 moonshot_logger_trace (_tmp116_, _tmp122_, NULL);
1623 #line 202 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1624                                                                 _g_free0 (_tmp122_);
1625 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1626                                                                 _tmp123_ = _data1_->request;
1627 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1628                                                                 _tmp124_ = id;
1629 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1630                                                                 _tmp125_ = _g_object_ref0 (_tmp124_);
1631 #line 203 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1632                                                                 _tmp123_->candidates = g_slist_append (_tmp123_->candidates, _tmp125_);
1633 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1634                                                                 _tmp126_ = rule;
1635 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1636                                                                 _tmp127_ = _tmp126_.always_confirm;
1637 #line 205 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1638                                                                 if (g_strcmp0 (_tmp127_, "true") == 0) {
1639 #line 206 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1640                                                                         confirm = TRUE;
1641 #line 1641 "moonshot-identity-manager-app.c"
1642                                                                 }
1643 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1644                                                                 rule_destroy (&rule);
1645 #line 1645 "moonshot-identity-manager-app.c"
1646                                                         }
1647                                                 }
1648                                         }
1649 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1650                                         _g_object_unref0 (id);
1651 #line 1651 "moonshot-identity-manager-app.c"
1652                                 }
1653 #line 195 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1654                                 _g_object_unref0 (_id_list);
1655 #line 1655 "moonshot-identity-manager-app.c"
1656                         }
1657                 }
1658 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1659                 _tmp129_ = _data1_->identity;
1660 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1661                 if (_tmp129_ == NULL) {
1662 #line 1662 "moonshot-identity-manager-app.c"
1663                         gboolean _tmp130_ = FALSE;
1664 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1665                         _tmp130_ = has_nai;
1666 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1667                         _tmp128_ = _tmp130_;
1668 #line 1668 "moonshot-identity-manager-app.c"
1669                 } else {
1670 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1671                         _tmp128_ = FALSE;
1672 #line 1672 "moonshot-identity-manager-app.c"
1673                 }
1674 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1675                 if (_tmp128_) {
1676 #line 1676 "moonshot-identity-manager-app.c"
1677                         MoonshotLogger* _tmp131_ = NULL;
1678                         gchar** components = NULL;
1679                         IdentityRequest* _tmp132_ = NULL;
1680                         const gchar* _tmp133_ = NULL;
1681                         gchar** _tmp134_ = NULL;
1682                         gchar** _tmp135_ = NULL;
1683                         gint components_length1 = 0;
1684                         gint _components_size_ = 0;
1685                         IdCard* _tmp136_ = NULL;
1686                         IdCard* _tmp137_ = NULL;
1687                         IdentityRequest* _tmp138_ = NULL;
1688                         const gchar* _tmp139_ = NULL;
1689                         IdCard* _tmp140_ = NULL;
1690                         gchar** _tmp141_ = NULL;
1691                         gint _tmp141__length1 = 0;
1692                         const gchar* _tmp142_ = NULL;
1693                         gchar** _tmp143_ = NULL;
1694                         gint _tmp143__length1 = 0;
1695                         IdCard* _tmp147_ = NULL;
1696                         IdentityRequest* _tmp148_ = NULL;
1697                         const gchar* _tmp149_ = NULL;
1698                         IdCard* _tmp150_ = NULL;
1699 #line 212 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1700                         _tmp131_ = identity_manager_app_logger;
1701 #line 212 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1702                         moonshot_logger_trace (_tmp131_, "select_identity: Creating temp identity", NULL);
1703 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1704                         _tmp132_ = _data1_->request;
1705 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1706                         _tmp133_ = _tmp132_->nai;
1707 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1708                         _tmp135_ = _tmp134_ = g_strsplit (_tmp133_, "@", 2);
1709 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1710                         components = _tmp135_;
1711 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1712                         components_length1 = _vala_array_length (_tmp134_);
1713 #line 214 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1714                         _components_size_ = components_length1;
1715 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1716                         _tmp136_ = id_card_new ();
1717 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1718                         _g_object_unref0 (_data1_->identity);
1719 #line 215 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1720                         _data1_->identity = _tmp136_;
1721 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1722                         _tmp137_ = _data1_->identity;
1723 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1724                         _tmp138_ = _data1_->request;
1725 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1726                         _tmp139_ = _tmp138_->nai;
1727 #line 216 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1728                         id_card_set_display_name (_tmp137_, _tmp139_);
1729 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1730                         _tmp140_ = _data1_->identity;
1731 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1732                         _tmp141_ = components;
1733 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1734                         _tmp141__length1 = components_length1;
1735 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1736                         _tmp142_ = _tmp141_[0];
1737 #line 217 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1738                         id_card_set_username (_tmp140_, _tmp142_);
1739 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1740                         _tmp143_ = components;
1741 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1742                         _tmp143__length1 = components_length1;
1743 #line 218 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1744                         if (_tmp143__length1 > 1) {
1745 #line 1745 "moonshot-identity-manager-app.c"
1746                                 IdCard* _tmp144_ = NULL;
1747                                 gchar** _tmp145_ = NULL;
1748                                 gint _tmp145__length1 = 0;
1749                                 const gchar* _tmp146_ = NULL;
1750 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1751                                 _tmp144_ = _data1_->identity;
1752 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1753                                 _tmp145_ = components;
1754 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1755                                 _tmp145__length1 = components_length1;
1756 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1757                                 _tmp146_ = _tmp145_[1];
1758 #line 219 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1759                                 id_card_set_issuer (_tmp144_, _tmp146_);
1760 #line 1760 "moonshot-identity-manager-app.c"
1761                         }
1762 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1763                         _tmp147_ = _data1_->identity;
1764 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1765                         _tmp148_ = _data1_->request;
1766 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1767                         _tmp149_ = _tmp148_->password;
1768 #line 220 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1769                         id_card_set_password (_tmp147_, _tmp149_);
1770 #line 221 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1771                         _tmp150_ = _data1_->identity;
1772 #line 221 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1773                         id_card_set_temporary (_tmp150_, TRUE);
1774 #line 211 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1775                         components = (_vala_array_free (components, components_length1, (GDestroyNotify) g_free), NULL);
1776 #line 1776 "moonshot-identity-manager-app.c"
1777                 }
1778 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1779                 _tmp151_ = _data1_->identity;
1780 #line 223 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1781                 if (_tmp151_ == NULL) {
1782 #line 1782 "moonshot-identity-manager-app.c"
1783                         IdentityRequest* _tmp152_ = NULL;
1784                         GSList* _tmp153_ = NULL;
1785                         guint _tmp154_ = 0U;
1786 #line 224 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1787                         _tmp152_ = _data1_->request;
1788 #line 224 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1789                         _tmp153_ = _tmp152_->candidates;
1790 #line 224 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1791                         _tmp154_ = g_slist_length (_tmp153_);
1792 #line 224 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1793                         if (_tmp154_ != ((guint) 1)) {
1794 #line 1794 "moonshot-identity-manager-app.c"
1795                                 MoonshotLogger* _tmp155_ = NULL;
1796                                 IdentityRequest* _tmp156_ = NULL;
1797                                 GSList* _tmp157_ = NULL;
1798                                 guint _tmp158_ = 0U;
1799                                 gchar* _tmp159_ = NULL;
1800                                 gchar* _tmp160_ = NULL;
1801 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1802                                 _tmp155_ = identity_manager_app_logger;
1803 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1804                                 _tmp156_ = _data1_->request;
1805 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1806                                 _tmp157_ = _tmp156_->candidates;
1807 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1808                                 _tmp158_ = g_slist_length (_tmp157_);
1809 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1810                                 _tmp159_ = g_strdup_printf ("select_identity: Have %u candidates; user must make selection.", _tmp158_);
1811 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1812                                 _tmp160_ = _tmp159_;
1813 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1814                                 moonshot_logger_trace (_tmp155_, _tmp160_, NULL);
1815 #line 225 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1816                                 _g_free0 (_tmp160_);
1817 #line 226 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1818                                 confirm = TRUE;
1819 #line 1819 "moonshot-identity-manager-app.c"
1820                         } else {
1821                                 IdentityRequest* _tmp161_ = NULL;
1822                                 GSList* _tmp162_ = NULL;
1823                                 gconstpointer _tmp163_ = NULL;
1824                                 IdCard* _tmp164_ = NULL;
1825 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1826                                 _tmp161_ = _data1_->request;
1827 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1828                                 _tmp162_ = _tmp161_->candidates;
1829 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1830                                 _tmp163_ = g_slist_nth_data (_tmp162_, (guint) 0);
1831 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1832                                 _tmp164_ = _g_object_ref0 ((IdCard*) _tmp163_);
1833 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1834                                 _g_object_unref0 (_data1_->identity);
1835 #line 228 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1836                                 _data1_->identity = _tmp164_;
1837 #line 1837 "moonshot-identity-manager-app.c"
1838                         }
1839                 }
1840 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1841                 _tmp166_ = confirm;
1842 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1843                 if (_tmp166_) {
1844 #line 1844 "moonshot-identity-manager-app.c"
1845                         IdentityManagerView* _tmp167_ = NULL;
1846 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1847                         _tmp167_ = self->view;
1848 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1849                         _tmp165_ = _tmp167_ != NULL;
1850 #line 1850 "moonshot-identity-manager-app.c"
1851                 } else {
1852 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1853                         _tmp165_ = FALSE;
1854 #line 1854 "moonshot-identity-manager-app.c"
1855                 }
1856 #line 232 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1857                 if (_tmp165_) {
1858 #line 1858 "moonshot-identity-manager-app.c"
1859                         gboolean _tmp168_ = FALSE;
1860                         IdentityManagerView* _tmp169_ = NULL;
1861                         IdentityRequest* _tmp170_ = NULL;
1862 #line 234 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1863                         _tmp168_ = self->explicitly_launched;
1864 #line 234 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1865                         if (!_tmp168_) {
1866 #line 235 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1867                                 identity_manager_app_show (self);
1868 #line 1868 "moonshot-identity-manager-app.c"
1869                         }
1870 #line 236 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1871                         _tmp169_ = self->view;
1872 #line 236 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1873                         _tmp170_ = _data1_->request;
1874 #line 236 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1875                         identity_manager_view_queue_identity_request (_tmp169_, _tmp170_);
1876 #line 237 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1877                         block1_data_unref (_data1_);
1878 #line 237 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1879                         _data1_ = NULL;
1880 #line 237 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1881                         return;
1882 #line 1882 "moonshot-identity-manager-app.c"
1883                 }
1884         }
1885 #line 242 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1886         g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda5__gsource_func, block1_data_ref (_data1_), block1_data_unref);
1887 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1888         block1_data_unref (_data1_);
1889 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1890         _data1_ = NULL;
1891 #line 256 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1892         return;
1893 #line 1893 "moonshot-identity-manager-app.c"
1894 }
1895
1896
1897 static gboolean identity_manager_app_match_service_pattern (IdentityManagerApp* self, const gchar* service, const gchar* pattern) {
1898         gboolean result = FALSE;
1899         GPatternSpec* pspec = NULL;
1900         const gchar* _tmp0_ = NULL;
1901         GPatternSpec* _tmp1_ = NULL;
1902         const gchar* _tmp2_ = NULL;
1903         gboolean _tmp3_ = FALSE;
1904 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1905         g_return_val_if_fail (self != NULL, FALSE);
1906 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1907         g_return_val_if_fail (service != NULL, FALSE);
1908 #line 259 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1909         g_return_val_if_fail (pattern != NULL, FALSE);
1910 #line 260 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1911         _tmp0_ = pattern;
1912 #line 260 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1913         _tmp1_ = g_pattern_spec_new (_tmp0_);
1914 #line 260 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1915         pspec = _tmp1_;
1916 #line 261 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1917         _tmp2_ = service;
1918 #line 261 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1919         _tmp3_ = g_pattern_match_string (pspec, _tmp2_);
1920 #line 261 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1921         result = _tmp3_;
1922 #line 261 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1923         _g_pattern_spec_free0 (pspec);
1924 #line 261 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1925         return result;
1926 #line 1926 "moonshot-identity-manager-app.c"
1927 }
1928
1929
1930 static void _identity_manager_app_bus_acquired_cb_gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1931 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1932         identity_manager_app_bus_acquired_cb ((IdentityManagerApp*) self, connection);
1933 #line 1933 "moonshot-identity-manager-app.c"
1934 }
1935
1936
1937 static void ___lambda23_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1938         const gchar* _tmp0_ = NULL;
1939         GDBusConnection* _tmp1_ = NULL;
1940         MoonshotLogger* _tmp2_ = NULL;
1941         gchar* _tmp3_ = NULL;
1942         gchar* _tmp4_ = NULL;
1943 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1944         g_return_if_fail (conn != NULL);
1945 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1946         g_return_if_fail (name != NULL);
1947 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1948         _tmp1_ = conn;
1949 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1950         if (_tmp1_ == NULL) {
1951 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1952                 _tmp0_ = "null";
1953 #line 1953 "moonshot-identity-manager-app.c"
1954         } else {
1955 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1956                 _tmp0_ = "non-null";
1957 #line 1957 "moonshot-identity-manager-app.c"
1958         }
1959 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1960         _tmp2_ = identity_manager_app_logger;
1961 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1962         _tmp3_ = g_strconcat ("init_ipc_server: name_acquired_closure; conn=", _tmp0_, NULL);
1963 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1964         _tmp4_ = _tmp3_;
1965 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1966         moonshot_logger_trace (_tmp2_, _tmp4_, NULL);
1967 #line 332 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1968         _g_free0 (_tmp4_);
1969 #line 1969 "moonshot-identity-manager-app.c"
1970 }
1971
1972
1973 static void ____lambda23__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
1974 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1975         ___lambda23_ ((IdentityManagerApp*) self, connection, name);
1976 #line 1976 "moonshot-identity-manager-app.c"
1977 }
1978
1979
1980 static void ___lambda24_ (IdentityManagerApp* self, GDBusConnection* conn, const gchar* name) {
1981         const gchar* _tmp0_ = NULL;
1982         GDBusConnection* _tmp1_ = NULL;
1983         MoonshotLogger* _tmp2_ = NULL;
1984         gchar* _tmp3_ = NULL;
1985         gchar* _tmp4_ = NULL;
1986         gboolean shown = FALSE;
1987         gboolean _tmp11_ = FALSE;
1988         GError * _inner_error_ = NULL;
1989 #line 333 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1990         g_return_if_fail (conn != NULL);
1991 #line 333 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1992         g_return_if_fail (name != NULL);
1993 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1994         _tmp1_ = conn;
1995 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1996         if (_tmp1_ == NULL) {
1997 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
1998                 _tmp0_ = "null";
1999 #line 1999 "moonshot-identity-manager-app.c"
2000         } else {
2001 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2002                 _tmp0_ = "non-null";
2003 #line 2003 "moonshot-identity-manager-app.c"
2004         }
2005 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2006         _tmp2_ = identity_manager_app_logger;
2007 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2008         _tmp3_ = g_strconcat ("init_ipc_server: name_lost_closure; conn=", _tmp0_, NULL);
2009 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2010         _tmp4_ = _tmp3_;
2011 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2012         moonshot_logger_trace (_tmp2_, _tmp4_, NULL);
2013 #line 334 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2014         _g_free0 (_tmp4_);
2015 #line 335 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2016         shown = FALSE;
2017 #line 2017 "moonshot-identity-manager-app.c"
2018         {
2019                 IIdentityManager* manager = NULL;
2020                 const gchar* _tmp5_ = NULL;
2021                 IIdentityManager* _tmp6_ = NULL;
2022                 gboolean _tmp7_ = FALSE;
2023                 IIdentityManager* _tmp8_ = NULL;
2024                 gboolean _tmp9_ = FALSE;
2025 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2026                 _tmp5_ = name;
2027 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2028                 _tmp6_ = g_initable_new (TYPE_IIDENTITY_MANAGER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp5_, "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);
2029 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2030                 manager = (IIdentityManager*) _tmp6_;
2031 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2032                 if (G_UNLIKELY (_inner_error_ != NULL)) {
2033 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2034                         if (_inner_error_->domain == G_IO_ERROR) {
2035 #line 2035 "moonshot-identity-manager-app.c"
2036                                 goto __catch1_g_io_error;
2037                         }
2038 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2039                         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);
2040 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2041                         g_clear_error (&_inner_error_);
2042 #line 337 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2043                         return;
2044 #line 2044 "moonshot-identity-manager-app.c"
2045                 }
2046 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2047                 _tmp8_ = manager;
2048 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2049                 _tmp9_ = iidentity_manager_show_ui (_tmp8_, &_inner_error_);
2050 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2051                 _tmp7_ = _tmp9_;
2052 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2053                 if (G_UNLIKELY (_inner_error_ != NULL)) {
2054 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2055                         _g_object_unref0 (manager);
2056 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2057                         if (_inner_error_->domain == G_IO_ERROR) {
2058 #line 2058 "moonshot-identity-manager-app.c"
2059                                 goto __catch1_g_io_error;
2060                         }
2061 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2062                         _g_object_unref0 (manager);
2063 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2064                         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);
2065 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2066                         g_clear_error (&_inner_error_);
2067 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2068                         return;
2069 #line 2069 "moonshot-identity-manager-app.c"
2070                 }
2071 #line 338 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2072                 shown = _tmp7_;
2073 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2074                 _g_object_unref0 (manager);
2075 #line 2075 "moonshot-identity-manager-app.c"
2076         }
2077         goto __finally1;
2078         __catch1_g_io_error:
2079         {
2080                 GError* e = NULL;
2081                 MoonshotLogger* _tmp10_ = NULL;
2082 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2083                 e = _inner_error_;
2084 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2085                 _inner_error_ = NULL;
2086 #line 340 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2087                 _tmp10_ = identity_manager_app_logger;
2088 #line 340 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2089                 moonshot_logger_error (_tmp10_, "init_ipc_server.name_lost_closure: Caught error: ", NULL);
2090 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2091                 _g_error_free0 (e);
2092 #line 2092 "moonshot-identity-manager-app.c"
2093         }
2094         __finally1:
2095 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2096         if (G_UNLIKELY (_inner_error_ != NULL)) {
2097 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2098                 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);
2099 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2100                 g_clear_error (&_inner_error_);
2101 #line 336 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2102                 return;
2103 #line 2103 "moonshot-identity-manager-app.c"
2104         }
2105 #line 342 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2106         _tmp11_ = shown;
2107 #line 342 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2108         if (!_tmp11_) {
2109 #line 2109 "moonshot-identity-manager-app.c"
2110                 MoonshotLogger* _tmp12_ = NULL;
2111                 const gchar* _tmp13_ = NULL;
2112                 gchar* _tmp14_ = NULL;
2113                 gchar* _tmp15_ = NULL;
2114                 const gchar* _tmp16_ = NULL;
2115 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2116                 _tmp12_ = identity_manager_app_logger;
2117 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2118                 _tmp13_ = name;
2119 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2120                 _tmp14_ = g_strdup_printf ("init_ipc_server.name_lost_closure: Couldn't own name %s on dbus or sho" \
2121 "w previously launched identity manager", _tmp13_);
2122 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2123                 _tmp15_ = _tmp14_;
2124 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2125                 moonshot_logger_error (_tmp12_, _tmp15_, NULL);
2126 #line 343 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2127                 _g_free0 (_tmp15_);
2128 #line 344 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2129                 _tmp16_ = name;
2130 #line 344 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2131                 g_error ("moonshot-identity-manager-app.vala:344: Couldn't own name %s on dbus o" \
2132 "r show previously launched identity manager.", _tmp16_);
2133 #line 2131 "moonshot-identity-manager-app.c"
2134         } else {
2135                 MoonshotLogger* _tmp17_ = NULL;
2136                 FILE* _tmp18_ = NULL;
2137 #line 346 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2138                 _tmp17_ = identity_manager_app_logger;
2139 #line 346 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2140                 moonshot_logger_trace (_tmp17_, "init_ipc_server.name_lost_closure: Showed previously launched identity" \
2141 " manager.", NULL);
2142 #line 347 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2143                 _tmp18_ = stdout;
2144 #line 347 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2145                 fprintf (_tmp18_, "Showed previously launched identity manager.\n");
2146 #line 348 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2147                 exit (0);
2148 #line 2145 "moonshot-identity-manager-app.c"
2149         }
2150 }
2151
2152
2153 static void ____lambda24__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
2154 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2155         ___lambda24_ ((IdentityManagerApp*) self, connection, name);
2156 #line 2153 "moonshot-identity-manager-app.c"
2157 }
2158
2159
2160 static void identity_manager_app_bus_acquired_cb (IdentityManagerApp* self, GDBusConnection* conn) {
2161         MoonshotLogger* _tmp0_ = NULL;
2162         GError * _inner_error_ = NULL;
2163 #line 319 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2164         g_return_if_fail (self != NULL);
2165 #line 319 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2166         g_return_if_fail (conn != NULL);
2167 #line 320 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2168         _tmp0_ = identity_manager_app_logger;
2169 #line 320 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2170         moonshot_logger_trace (_tmp0_, "bus_acquired_cb", NULL);
2171 #line 2168 "moonshot-identity-manager-app.c"
2172         {
2173                 GDBusConnection* _tmp1_ = NULL;
2174                 MoonshotServer* _tmp2_ = NULL;
2175 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2176                 _tmp1_ = conn;
2177 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2178                 _tmp2_ = self->priv->ipc_server;
2179 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2180                 moonshot_server_register_object (_tmp2_, _tmp1_, "/org/janet/moonshot", &_inner_error_);
2181 #line 322 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2182                 if (G_UNLIKELY (_inner_error_ != NULL)) {
2183 #line 2180 "moonshot-identity-manager-app.c"
2184                         goto __catch0_g_error;
2185                 }
2186         }
2187         goto __finally0;
2188         __catch0_g_error:
2189         {
2190                 GError* e = NULL;
2191                 MoonshotServer* _tmp3_ = NULL;
2192                 MoonshotLogger* _tmp4_ = NULL;
2193 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2194                 e = _inner_error_;
2195 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2196                 _inner_error_ = NULL;
2197 #line 326 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2198                 _tmp3_ = moonshot_server_new (self);
2199 #line 326 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2200                 _g_object_unref0 (self->priv->ipc_server);
2201 #line 326 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2202                 self->priv->ipc_server = _tmp3_;
2203 #line 327 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2204                 _tmp4_ = identity_manager_app_logger;
2205 #line 327 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2206                 moonshot_logger_trace (_tmp4_, "init_ipc_server: Constructed new MoonshotServer", NULL);
2207 #line 328 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2208                 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), (GClosureNotify) identity_manager_app_unref)), (GClosure*) ((____lambda23__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ____lambda23__gbus_name_acquired_callback, identity_manager_app_ref (self), (GClosureNotify) identity_manager_app_unref)), (GClosure*) ((____lambda24__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ____lambda24__gbus_name_lost_callback, identity_manager_app_ref (self), (GClosureNotify) identity_manager_app_unref)));
2209 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2210                 _g_error_free0 (e);
2211 #line 2208 "moonshot-identity-manager-app.c"
2212         }
2213         __finally0:
2214 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2215         if (G_UNLIKELY (_inner_error_ != NULL)) {
2216 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2217                 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);
2218 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2219                 g_clear_error (&_inner_error_);
2220 #line 321 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2221                 return;
2222 #line 2219 "moonshot-identity-manager-app.c"
2223         }
2224 }
2225
2226
2227 static Block2Data* block2_data_ref (Block2Data* _data2_) {
2228 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2229         g_atomic_int_inc (&_data2_->_ref_count_);
2230 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2231         return _data2_;
2232 #line 2229 "moonshot-identity-manager-app.c"
2233 }
2234
2235
2236 static void block2_data_unref (void * _userdata_) {
2237         Block2Data* _data2_;
2238         _data2_ = (Block2Data*) _userdata_;
2239 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2240         if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
2241 #line 2238 "moonshot-identity-manager-app.c"
2242                 IdentityManagerApp* self;
2243 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2244                 self = _data2_->self;
2245 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2246                 _g_free0 (_data2_->our_name);
2247 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2248                 _identity_manager_app_unref0 (self);
2249 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2250                 g_slice_free (Block2Data, _data2_);
2251 #line 2248 "moonshot-identity-manager-app.c"
2252         }
2253 }
2254
2255
2256 static gchar* bool_to_string (gboolean self) {
2257         gchar* result = NULL;
2258 #line 37 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2259         if (self) {
2260 #line 2257 "moonshot-identity-manager-app.c"
2261                 gchar* _tmp0_ = NULL;
2262 #line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2263                 _tmp0_ = g_strdup ("true");
2264 #line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2265                 result = _tmp0_;
2266 #line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2267                 return result;
2268 #line 2265 "moonshot-identity-manager-app.c"
2269         } else {
2270                 gchar* _tmp1_ = NULL;
2271 #line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2272                 _tmp1_ = g_strdup ("false");
2273 #line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2274                 result = _tmp1_;
2275 #line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
2276                 return result;
2277 #line 2274 "moonshot-identity-manager-app.c"
2278         }
2279 }
2280
2281
2282 static void __lambda25_ (Block2Data* _data2_, GDBusConnection* conn, const gchar* name) {
2283         IdentityManagerApp* self;
2284         gchar* _tmp0_ = NULL;
2285         GDBusConnection* _tmp1_ = NULL;
2286         MoonshotLogger* _tmp7_ = NULL;
2287         gboolean _tmp8_ = FALSE;
2288         gchar* _tmp9_ = NULL;
2289         gchar* _tmp10_ = NULL;
2290         gchar* _tmp11_ = NULL;
2291         gchar* _tmp12_ = NULL;
2292         gchar* _tmp13_ = NULL;
2293         gchar* _tmp14_ = NULL;
2294         gboolean _tmp15_ = FALSE;
2295 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2296         self = _data2_->self;
2297 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2298         g_return_if_fail (conn != NULL);
2299 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2300         g_return_if_fail (name != NULL);
2301 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2302         _tmp1_ = conn;
2303 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2304         if (_tmp1_ == NULL) {
2305 #line 2302 "moonshot-identity-manager-app.c"
2306                 gchar* _tmp2_ = NULL;
2307 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2308                 _tmp2_ = g_strdup ("null");
2309 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2310                 _g_free0 (_tmp0_);
2311 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2312                 _tmp0_ = _tmp2_;
2313 #line 2310 "moonshot-identity-manager-app.c"
2314         } else {
2315                 const gchar* _tmp3_ = NULL;
2316                 gchar* _tmp4_ = NULL;
2317                 gchar* _tmp5_ = NULL;
2318                 gchar* _tmp6_ = NULL;
2319 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2320                 _tmp3_ = name;
2321 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2322                 _tmp4_ = g_strconcat ("non-null; name='", _tmp3_, NULL);
2323 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2324                 _tmp5_ = _tmp4_;
2325 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2326                 _tmp6_ = g_strconcat (_tmp5_, "'", NULL);
2327 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2328                 _g_free0 (_tmp0_);
2329 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2330                 _tmp0_ = _tmp6_;
2331 #line 366 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2332                 _g_free0 (_tmp5_);
2333 #line 2330 "moonshot-identity-manager-app.c"
2334         }
2335 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2336         _tmp7_ = identity_manager_app_logger;
2337 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2338         _tmp8_ = self->priv->show_requested;
2339 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2340         _tmp9_ = bool_to_string (_tmp8_);
2341 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2342         _tmp10_ = _tmp9_;
2343 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2344         _tmp11_ = g_strconcat ("init_ipc_server: name_acquired_closure; show_requested=", _tmp10_, "; conn=", NULL);
2345 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2346         _tmp12_ = _tmp11_;
2347 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2348         _tmp13_ = g_strconcat (_tmp12_, _tmp0_, NULL);
2349 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2350         _tmp14_ = _tmp13_;
2351 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2352         moonshot_logger_trace (_tmp7_, _tmp14_, NULL);
2353 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2354         _g_free0 (_tmp14_);
2355 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2356         _g_free0 (_tmp12_);
2357 #line 365 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2358         _g_free0 (_tmp10_);
2359 #line 368 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2360         self->priv->name_is_owned = TRUE;
2361 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2362         _tmp15_ = self->priv->show_requested;
2363 #line 371 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2364         if (_tmp15_) {
2365 #line 372 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2366                 identity_manager_app_show (self);
2367 #line 373 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2368                 self->priv->show_requested = FALSE;
2369 #line 2366 "moonshot-identity-manager-app.c"
2370         }
2371 #line 375 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2372         _data2_->shown = TRUE;
2373 #line 364 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2374         _g_free0 (_tmp0_);
2375 #line 2372 "moonshot-identity-manager-app.c"
2376 }
2377
2378
2379 static void ___lambda25__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
2380 #line 358 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2381         __lambda25_ (self, connection, name);
2382 #line 2379 "moonshot-identity-manager-app.c"
2383 }
2384
2385
2386 static void __lambda26_ (Block2Data* _data2_) {
2387         IdentityManagerApp* self;
2388         MoonshotLogger* _tmp0_ = NULL;
2389         GError * _inner_error_ = NULL;
2390 #line 379 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2391         self = _data2_->self;
2392 #line 380 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2393         _tmp0_ = identity_manager_app_logger;
2394 #line 380 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2395         moonshot_logger_trace (_tmp0_, "init_ipc_server: name_lost_closure", NULL);
2396 #line 386 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2397         self->priv->name_is_owned = FALSE;
2398 #line 387 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2399         self->priv->show_requested = FALSE;
2400 #line 2397 "moonshot-identity-manager-app.c"
2401         {
2402 #line 390 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2403                 if (!_data2_->shown) {
2404 #line 2401 "moonshot-identity-manager-app.c"
2405                         IIdentityManager* manager = NULL;
2406                         IIdentityManager* _tmp1_ = NULL;
2407                         gboolean _tmp2_ = FALSE;
2408                         IIdentityManager* _tmp3_ = NULL;
2409                         gboolean _tmp4_ = FALSE;
2410 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2411                         _tmp1_ = g_initable_new (TYPE_IIDENTITY_MANAGER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _data2_->our_name, "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);
2412 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2413                         manager = (IIdentityManager*) _tmp1_;
2414 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2415                         if (G_UNLIKELY (_inner_error_ != NULL)) {
2416 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2417                                 if (_inner_error_->domain == G_IO_ERROR) {
2418 #line 2415 "moonshot-identity-manager-app.c"
2419                                         goto __catch2_g_io_error;
2420                                 }
2421 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2422                                 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);
2423 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2424                                 g_clear_error (&_inner_error_);
2425 #line 391 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2426                                 return;
2427 #line 2424 "moonshot-identity-manager-app.c"
2428                         }
2429 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2430                         _tmp3_ = manager;
2431 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2432                         _tmp4_ = iidentity_manager_show_ui (_tmp3_, &_inner_error_);
2433 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2434                         _tmp2_ = _tmp4_;
2435 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2436                         if (G_UNLIKELY (_inner_error_ != NULL)) {
2437 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2438                                 _g_object_unref0 (manager);
2439 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2440                                 if (_inner_error_->domain == G_IO_ERROR) {
2441 #line 2438 "moonshot-identity-manager-app.c"
2442                                         goto __catch2_g_io_error;
2443                                 }
2444 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2445                                 _g_object_unref0 (manager);
2446 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2447                                 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);
2448 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2449                                 g_clear_error (&_inner_error_);
2450 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2451                                 return;
2452 #line 2449 "moonshot-identity-manager-app.c"
2453                         }
2454 #line 392 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2455                         _data2_->shown = _tmp2_;
2456 #line 390 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2457                         _g_object_unref0 (manager);
2458 #line 2455 "moonshot-identity-manager-app.c"
2459                 }
2460         }
2461         goto __finally2;
2462         __catch2_g_io_error:
2463         {
2464                 GError* e = NULL;
2465                 MoonshotLogger* _tmp5_ = NULL;
2466                 GError* _tmp6_ = NULL;
2467                 const gchar* _tmp7_ = NULL;
2468                 gchar* _tmp8_ = NULL;
2469                 gchar* _tmp9_ = NULL;
2470 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2471                 e = _inner_error_;
2472 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2473                 _inner_error_ = NULL;
2474 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2475                 _tmp5_ = identity_manager_app_logger;
2476 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2477                 _tmp6_ = e;
2478 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2479                 _tmp7_ = _tmp6_->message;
2480 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2481                 _tmp8_ = g_strconcat ("init_ipc_server.name_lost_closure: Caught IOError: ", _tmp7_, NULL);
2482 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2483                 _tmp9_ = _tmp8_;
2484 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2485                 moonshot_logger_error (_tmp5_, _tmp9_, NULL);
2486 #line 395 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2487                 _g_free0 (_tmp9_);
2488 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2489                 _g_error_free0 (e);
2490 #line 2487 "moonshot-identity-manager-app.c"
2491         }
2492         __finally2:
2493 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2494         if (G_UNLIKELY (_inner_error_ != NULL)) {
2495 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2496                 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);
2497 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2498                 g_clear_error (&_inner_error_);
2499 #line 389 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2500                 return;
2501 #line 2498 "moonshot-identity-manager-app.c"
2502         }
2503 #line 397 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2504         if (!_data2_->shown) {
2505 #line 2502 "moonshot-identity-manager-app.c"
2506                 MoonshotLogger* _tmp10_ = NULL;
2507                 gchar* _tmp11_ = NULL;
2508                 gchar* _tmp12_ = NULL;
2509 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2510                 _tmp10_ = identity_manager_app_logger;
2511 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2512                 _tmp11_ = g_strdup_printf ("init_ipc_server.name_lost_closure: Couldn't own name '%s' on dbus or s" \
2513 "how previously launched identity manager", _data2_->our_name);
2514 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2515                 _tmp12_ = _tmp11_;
2516 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2517                 moonshot_logger_error (_tmp10_, _tmp12_, NULL);
2518 #line 398 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2519                 _g_free0 (_tmp12_);
2520 #line 399 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2521                 g_error ("moonshot-identity-manager-app.vala:399: Couldn't own name '%s' on dbus" \
2522 " or show previously launched identity manager.", _data2_->our_name);
2523 #line 2518 "moonshot-identity-manager-app.c"
2524         } else {
2525                 MoonshotLogger* _tmp13_ = NULL;
2526                 FILE* _tmp14_ = NULL;
2527 #line 401 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2528                 _tmp13_ = identity_manager_app_logger;
2529 #line 401 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2530                 moonshot_logger_trace (_tmp13_, "init_ipc_server.name_lost_closure: Showed previously launched identity" \
2531 " manager.", NULL);
2532 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2533                 _tmp14_ = stdout;
2534 #line 402 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2535                 fprintf (_tmp14_, "Showed previously launched identity manager.\n");
2536 #line 403 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2537                 exit (0);
2538 #line 2532 "moonshot-identity-manager-app.c"
2539         }
2540 }
2541
2542
2543 static void ___lambda26__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
2544 #line 358 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2545         __lambda26_ (self);
2546 #line 2540 "moonshot-identity-manager-app.c"
2547 }
2548
2549
2550 static void identity_manager_app_init_ipc_server (IdentityManagerApp* self) {
2551         Block2Data* _data2_;
2552         MoonshotServer* _tmp0_ = NULL;
2553         gchar* _tmp1_ = NULL;
2554 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2555         g_return_if_fail (self != NULL);
2556 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2557         _data2_ = g_slice_new0 (Block2Data);
2558 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2559         _data2_->_ref_count_ = 1;
2560 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2561         _data2_->self = identity_manager_app_ref (self);
2562 #line 355 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2563         _tmp0_ = moonshot_server_new (self);
2564 #line 355 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2565         _g_object_unref0 (self->priv->ipc_server);
2566 #line 355 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2567         self->priv->ipc_server = _tmp0_;
2568 #line 356 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2569         _data2_->shown = FALSE;
2570 #line 357 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2571         _tmp1_ = g_strdup ("org.janet.Moonshot");
2572 #line 357 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2573         _data2_->our_name = _tmp1_;
2574 #line 358 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2575         g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, _data2_->our_name, 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), (GClosureNotify) identity_manager_app_unref)), (GClosure*) ((___lambda25__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda25__gbus_name_acquired_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)), (GClosure*) ((___lambda26__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda26__gbus_name_lost_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)));
2576 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2577         block2_data_unref (_data2_);
2578 #line 354 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2579         _data2_ = NULL;
2580 #line 2574 "moonshot-identity-manager-app.c"
2581 }
2582
2583
2584 gboolean identity_manager_app_get_use_flat_file_store (IdentityManagerApp* self) {
2585         gboolean result;
2586         gboolean _tmp0_ = FALSE;
2587 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2588         g_return_val_if_fail (self != NULL, FALSE);
2589 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2590         _tmp0_ = self->priv->_use_flat_file_store;
2591 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2592         result = _tmp0_;
2593 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2594         return result;
2595 #line 2589 "moonshot-identity-manager-app.c"
2596 }
2597
2598
2599 static void identity_manager_app_set_use_flat_file_store (IdentityManagerApp* self, gboolean value) {
2600         gboolean _tmp0_ = FALSE;
2601 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2602         g_return_if_fail (self != NULL);
2603 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2604         _tmp0_ = value;
2605 #line 57 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2606         self->priv->_use_flat_file_store = _tmp0_;
2607 #line 2601 "moonshot-identity-manager-app.c"
2608 }
2609
2610
2611 gboolean identity_manager_app_get_headless (IdentityManagerApp* self) {
2612         gboolean result;
2613         gboolean _tmp0_ = FALSE;
2614 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2615         g_return_val_if_fail (self != NULL, FALSE);
2616 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2617         _tmp0_ = self->priv->_headless;
2618 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2619         result = _tmp0_;
2620 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2621         return result;
2622 #line 2616 "moonshot-identity-manager-app.c"
2623 }
2624
2625
2626 static void identity_manager_app_set_headless (IdentityManagerApp* self, gboolean value) {
2627         gboolean _tmp0_ = FALSE;
2628 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2629         g_return_if_fail (self != NULL);
2630 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2631         _tmp0_ = value;
2632 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2633         self->priv->_headless = _tmp0_;
2634 #line 2628 "moonshot-identity-manager-app.c"
2635 }
2636
2637
2638 static void value_identity_manager_app_init (GValue* value) {
2639 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2640         value->data[0].v_pointer = NULL;
2641 #line 2635 "moonshot-identity-manager-app.c"
2642 }
2643
2644
2645 static void value_identity_manager_app_free_value (GValue* value) {
2646 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2647         if (value->data[0].v_pointer) {
2648 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2649                 identity_manager_app_unref (value->data[0].v_pointer);
2650 #line 2644 "moonshot-identity-manager-app.c"
2651         }
2652 }
2653
2654
2655 static void value_identity_manager_app_copy_value (const GValue* src_value, GValue* dest_value) {
2656 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2657         if (src_value->data[0].v_pointer) {
2658 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2659                 dest_value->data[0].v_pointer = identity_manager_app_ref (src_value->data[0].v_pointer);
2660 #line 2654 "moonshot-identity-manager-app.c"
2661         } else {
2662 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2663                 dest_value->data[0].v_pointer = NULL;
2664 #line 2658 "moonshot-identity-manager-app.c"
2665         }
2666 }
2667
2668
2669 static gpointer value_identity_manager_app_peek_pointer (const GValue* value) {
2670 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2671         return value->data[0].v_pointer;
2672 #line 2666 "moonshot-identity-manager-app.c"
2673 }
2674
2675
2676 static gchar* value_identity_manager_app_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2677 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2678         if (collect_values[0].v_pointer) {
2679 #line 2673 "moonshot-identity-manager-app.c"
2680                 IdentityManagerApp* object;
2681                 object = collect_values[0].v_pointer;
2682 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2683                 if (object->parent_instance.g_class == NULL) {
2684 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2685                         return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2686 #line 2680 "moonshot-identity-manager-app.c"
2687                 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
2688 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2689                         return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2690 #line 2684 "moonshot-identity-manager-app.c"
2691                 }
2692 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2693                 value->data[0].v_pointer = identity_manager_app_ref (object);
2694 #line 2688 "moonshot-identity-manager-app.c"
2695         } else {
2696 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2697                 value->data[0].v_pointer = NULL;
2698 #line 2692 "moonshot-identity-manager-app.c"
2699         }
2700 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2701         return NULL;
2702 #line 2696 "moonshot-identity-manager-app.c"
2703 }
2704
2705
2706 static gchar* value_identity_manager_app_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2707         IdentityManagerApp** object_p;
2708         object_p = collect_values[0].v_pointer;
2709 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2710         if (!object_p) {
2711 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2712                 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
2713 #line 2707 "moonshot-identity-manager-app.c"
2714         }
2715 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2716         if (!value->data[0].v_pointer) {
2717 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2718                 *object_p = NULL;
2719 #line 2713 "moonshot-identity-manager-app.c"
2720         } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
2721 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2722                 *object_p = value->data[0].v_pointer;
2723 #line 2717 "moonshot-identity-manager-app.c"
2724         } else {
2725 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2726                 *object_p = identity_manager_app_ref (value->data[0].v_pointer);
2727 #line 2721 "moonshot-identity-manager-app.c"
2728         }
2729 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2730         return NULL;
2731 #line 2725 "moonshot-identity-manager-app.c"
2732 }
2733
2734
2735 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
2736         ParamSpecIdentityManagerApp* spec;
2737 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2738         g_return_val_if_fail (g_type_is_a (object_type, TYPE_IDENTITY_MANAGER_APP), NULL);
2739 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2740         spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
2741 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2742         G_PARAM_SPEC (spec)->value_type = object_type;
2743 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2744         return G_PARAM_SPEC (spec);
2745 #line 2739 "moonshot-identity-manager-app.c"
2746 }
2747
2748
2749 gpointer value_get_identity_manager_app (const GValue* value) {
2750 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2751         g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP), NULL);
2752 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2753         return value->data[0].v_pointer;
2754 #line 2748 "moonshot-identity-manager-app.c"
2755 }
2756
2757
2758 void value_set_identity_manager_app (GValue* value, gpointer v_object) {
2759         IdentityManagerApp* old;
2760 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2761         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
2762 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2763         old = value->data[0].v_pointer;
2764 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2765         if (v_object) {
2766 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2767                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
2768 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2769                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2770 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2771                 value->data[0].v_pointer = v_object;
2772 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2773                 identity_manager_app_ref (value->data[0].v_pointer);
2774 #line 2768 "moonshot-identity-manager-app.c"
2775         } else {
2776 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2777                 value->data[0].v_pointer = NULL;
2778 #line 2772 "moonshot-identity-manager-app.c"
2779         }
2780 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2781         if (old) {
2782 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2783                 identity_manager_app_unref (old);
2784 #line 2778 "moonshot-identity-manager-app.c"
2785         }
2786 }
2787
2788
2789 void value_take_identity_manager_app (GValue* value, gpointer v_object) {
2790         IdentityManagerApp* old;
2791 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2792         g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IDENTITY_MANAGER_APP));
2793 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2794         old = value->data[0].v_pointer;
2795 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2796         if (v_object) {
2797 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2798                 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IDENTITY_MANAGER_APP));
2799 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2800                 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2801 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2802                 value->data[0].v_pointer = v_object;
2803 #line 2797 "moonshot-identity-manager-app.c"
2804         } else {
2805 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2806                 value->data[0].v_pointer = NULL;
2807 #line 2801 "moonshot-identity-manager-app.c"
2808         }
2809 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2810         if (old) {
2811 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2812                 identity_manager_app_unref (old);
2813 #line 2807 "moonshot-identity-manager-app.c"
2814         }
2815 }
2816
2817
2818 static void identity_manager_app_class_init (IdentityManagerAppClass * klass) {
2819         MoonshotLogger* _tmp0_ = NULL;
2820 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2821         identity_manager_app_parent_class = g_type_class_peek_parent (klass);
2822 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2823         ((IdentityManagerAppClass *) klass)->finalize = identity_manager_app_finalize;
2824 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2825         g_type_class_add_private (klass, sizeof (IdentityManagerAppPrivate));
2826 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2827         _tmp0_ = get_logger ("IdentityManagerApp");
2828 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2829         identity_manager_app_logger = _tmp0_;
2830 #line 2824 "moonshot-identity-manager-app.c"
2831 }
2832
2833
2834 static void identity_manager_app_instance_init (IdentityManagerApp * self) {
2835 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2836         self->priv = IDENTITY_MANAGER_APP_GET_PRIVATE (self);
2837 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2838         self->ref_count = 1;
2839 #line 2833 "moonshot-identity-manager-app.c"
2840 }
2841
2842
2843 static void identity_manager_app_finalize (IdentityManagerApp* obj) {
2844         IdentityManagerApp * self;
2845 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2846         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp);
2847 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2848         g_signal_handlers_destroy (self);
2849 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2850         _g_object_unref0 (self->model);
2851 #line 51 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2852         _g_object_unref0 (self->default_id_card);
2853 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2854         _g_object_unref0 (self->view);
2855 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2856         _g_object_unref0 (self->priv->ipc_server);
2857 #line 2851 "moonshot-identity-manager-app.c"
2858 }
2859
2860
2861 GType identity_manager_app_get_type (void) {
2862         static volatile gsize identity_manager_app_type_id__volatile = 0;
2863         if (g_once_init_enter (&identity_manager_app_type_id__volatile)) {
2864                 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 };
2865                 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 };
2866                 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) };
2867                 GType identity_manager_app_type_id;
2868                 identity_manager_app_type_id = g_type_register_fundamental (g_type_fundamental_next (), "IdentityManagerApp", &g_define_type_info, &g_define_type_fundamental_info, 0);
2869                 g_once_init_leave (&identity_manager_app_type_id__volatile, identity_manager_app_type_id);
2870         }
2871         return identity_manager_app_type_id__volatile;
2872 }
2873
2874
2875 gpointer identity_manager_app_ref (gpointer instance) {
2876         IdentityManagerApp* self;
2877         self = instance;
2878 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2879         g_atomic_int_inc (&self->ref_count);
2880 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2881         return instance;
2882 #line 2876 "moonshot-identity-manager-app.c"
2883 }
2884
2885
2886 void identity_manager_app_unref (gpointer instance) {
2887         IdentityManagerApp* self;
2888         self = instance;
2889 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2890         if (g_atomic_int_dec_and_test (&self->ref_count)) {
2891 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2892                 IDENTITY_MANAGER_APP_GET_CLASS (self)->finalize (self);
2893 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2894                 g_type_free_instance ((GTypeInstance *) self);
2895 #line 2889 "moonshot-identity-manager-app.c"
2896         }
2897 }
2898
2899
2900 gint _vala_main (gchar** args, int args_length1) {
2901         gint result = 0;
2902         gboolean headless = FALSE;
2903         const gchar* _tmp0_ = NULL;
2904         gboolean _tmp1_ = FALSE;
2905         IdentityManagerApp* app = NULL;
2906         gboolean _tmp30_ = FALSE;
2907         gboolean _tmp31_ = FALSE;
2908         IdentityManagerApp* _tmp32_ = NULL;
2909         IdentityManagerApp* _tmp33_ = NULL;
2910         gboolean _tmp34_ = FALSE;
2911         MoonshotLogger* _tmp35_ = NULL;
2912         gboolean _tmp36_ = FALSE;
2913         gchar* _tmp37_ = NULL;
2914         gchar* _tmp38_ = NULL;
2915         gchar* _tmp39_ = NULL;
2916         gchar* _tmp40_ = NULL;
2917         IdentityManagerApp* _tmp41_ = NULL;
2918         gboolean _tmp42_ = FALSE;
2919         gboolean _tmp44_ = FALSE;
2920         GError * _inner_error_ = NULL;
2921 #line 431 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2922         _tmp0_ = g_getenv ("DISPLAY");
2923 #line 431 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2924         headless = _tmp0_ == NULL;
2925 #line 434 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2926         _tmp1_ = headless;
2927 #line 434 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2928         if (_tmp1_) {
2929 #line 2923 "moonshot-identity-manager-app.c"
2930                 {
2931                         GOptionContext* opt_context = NULL;
2932                         GOptionContext* _tmp2_ = NULL;
2933                         GOptionContext* _tmp3_ = NULL;
2934                         GOptionContext* _tmp4_ = NULL;
2935                         GOptionContext* _tmp5_ = NULL;
2936 #line 436 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2937                         _tmp2_ = g_option_context_new (NULL);
2938 #line 436 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2939                         opt_context = _tmp2_;
2940 #line 437 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2941                         _tmp3_ = opt_context;
2942 #line 437 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2943                         g_option_context_set_help_enabled (_tmp3_, TRUE);
2944 #line 438 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2945                         _tmp4_ = opt_context;
2946 #line 438 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2947                         g_option_context_add_main_entries (_tmp4_, options, NULL);
2948 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2949                         _tmp5_ = opt_context;
2950 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2951                         g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
2952 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2953                         if (G_UNLIKELY (_inner_error_ != NULL)) {
2954 #line 2948 "moonshot-identity-manager-app.c"
2955                                 gint _tmp6_ = 0;
2956 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2957                                 _g_option_context_free0 (opt_context);
2958 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2959                                 if (_inner_error_->domain == G_OPTION_ERROR) {
2960 #line 2954 "moonshot-identity-manager-app.c"
2961                                         goto __catch3_g_option_error;
2962                                 }
2963 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2964                                 _g_option_context_free0 (opt_context);
2965 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2966                                 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);
2967 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2968                                 g_clear_error (&_inner_error_);
2969 #line 439 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2970                                 return _tmp6_;
2971 #line 2965 "moonshot-identity-manager-app.c"
2972                         }
2973 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2974                         _g_option_context_free0 (opt_context);
2975 #line 2969 "moonshot-identity-manager-app.c"
2976                 }
2977                 goto __finally3;
2978                 __catch3_g_option_error:
2979                 {
2980                         GError* e = NULL;
2981                         FILE* _tmp7_ = NULL;
2982                         const gchar* _tmp8_ = NULL;
2983                         GError* _tmp9_ = NULL;
2984                         const gchar* _tmp10_ = NULL;
2985                         FILE* _tmp11_ = NULL;
2986                         const gchar* _tmp12_ = NULL;
2987                         gchar** _tmp13_ = NULL;
2988                         gint _tmp13__length1 = 0;
2989                         const gchar* _tmp14_ = NULL;
2990 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2991                         e = _inner_error_;
2992 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2993                         _inner_error_ = NULL;
2994 #line 441 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2995                         _tmp7_ = stdout;
2996 #line 441 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2997                         _tmp8_ = _ ("error: %s\n");
2998 #line 441 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
2999                         _tmp9_ = e;
3000 #line 441 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3001                         _tmp10_ = _tmp9_->message;
3002 #line 441 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3003                         fprintf (_tmp7_, _tmp8_, _tmp10_);
3004 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3005                         _tmp11_ = stdout;
3006 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3007                         _tmp12_ = _ ("Run '%s --help' to see a full list of available options\n");
3008 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3009                         _tmp13_ = args;
3010 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3011                         _tmp13__length1 = args_length1;
3012 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3013                         _tmp14_ = _tmp13_[0];
3014 #line 442 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3015                         fprintf (_tmp11_, _tmp12_, _tmp14_);
3016 #line 443 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3017                         result = -1;
3018 #line 443 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3019                         _g_error_free0 (e);
3020 #line 443 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3021                         return result;
3022 #line 3016 "moonshot-identity-manager-app.c"
3023                 }
3024                 __finally3:
3025 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3026                 if (G_UNLIKELY (_inner_error_ != NULL)) {
3027 #line 3021 "moonshot-identity-manager-app.c"
3028                         gint _tmp15_ = 0;
3029 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3030                         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);
3031 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3032                         g_clear_error (&_inner_error_);
3033 #line 435 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3034                         return _tmp15_;
3035 #line 3029 "moonshot-identity-manager-app.c"
3036                 }
3037 #line 445 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3038                 explicitly_launched = FALSE;
3039 #line 3033 "moonshot-identity-manager-app.c"
3040         } else {
3041                 {
3042                         gboolean _tmp16_ = FALSE;
3043                         const gchar* _tmp17_ = NULL;
3044                         gboolean _tmp18_ = FALSE;
3045 #line 448 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3046                         _tmp17_ = _ ("");
3047 #line 448 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3048                         _tmp18_ = gtk_init_with_args (&args_length1, &args, _tmp17_, options, NULL, &_inner_error_);
3049 #line 448 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3050                         _tmp16_ = _tmp18_;
3051 #line 448 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3052                         if (G_UNLIKELY (_inner_error_ != NULL)) {
3053 #line 3047 "moonshot-identity-manager-app.c"
3054                                 goto __catch4_g_error;
3055                         }
3056 #line 448 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3057                         if (!_tmp16_) {
3058 #line 3052 "moonshot-identity-manager-app.c"
3059                                 FILE* _tmp19_ = NULL;
3060                                 const gchar* _tmp20_ = NULL;
3061 #line 449 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3062                                 _tmp19_ = stdout;
3063 #line 449 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3064                                 _tmp20_ = _ ("unable to initialize window\n");
3065 #line 449 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3066                                 fprintf (_tmp19_, "%s", _tmp20_);
3067 #line 450 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3068                                 result = -1;
3069 #line 450 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3070                                 return result;
3071 #line 3065 "moonshot-identity-manager-app.c"
3072                         }
3073                 }
3074                 goto __finally4;
3075                 __catch4_g_error:
3076                 {
3077                         GError* e = NULL;
3078                         FILE* _tmp21_ = NULL;
3079                         const gchar* _tmp22_ = NULL;
3080                         GError* _tmp23_ = NULL;
3081                         const gchar* _tmp24_ = NULL;
3082                         FILE* _tmp25_ = NULL;
3083                         const gchar* _tmp26_ = NULL;
3084                         gchar** _tmp27_ = NULL;
3085                         gint _tmp27__length1 = 0;
3086                         const gchar* _tmp28_ = NULL;
3087 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3088                         e = _inner_error_;
3089 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3090                         _inner_error_ = NULL;
3091 #line 453 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3092                         _tmp21_ = stdout;
3093 #line 453 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3094                         _tmp22_ = _ ("error: %s\n");
3095 #line 453 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3096                         _tmp23_ = e;
3097 #line 453 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3098                         _tmp24_ = _tmp23_->message;
3099 #line 453 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3100                         fprintf (_tmp21_, _tmp22_, _tmp24_);
3101 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3102                         _tmp25_ = stdout;
3103 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3104                         _tmp26_ = _ ("Run '%s --help' to see a full list of available options\n");
3105 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3106                         _tmp27_ = args;
3107 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3108                         _tmp27__length1 = args_length1;
3109 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3110                         _tmp28_ = _tmp27_[0];
3111 #line 454 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3112                         fprintf (_tmp25_, _tmp26_, _tmp28_);
3113 #line 455 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3114                         result = -1;
3115 #line 455 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3116                         _g_error_free0 (e);
3117 #line 455 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3118                         return result;
3119 #line 3113 "moonshot-identity-manager-app.c"
3120                 }
3121                 __finally4:
3122 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3123                 if (G_UNLIKELY (_inner_error_ != NULL)) {
3124 #line 3118 "moonshot-identity-manager-app.c"
3125                         gint _tmp29_ = 0;
3126 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3127                         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);
3128 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3129                         g_clear_error (&_inner_error_);
3130 #line 447 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3131                         return _tmp29_;
3132 #line 3126 "moonshot-identity-manager-app.c"
3133                 }
3134 #line 457 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3135                 gtk_available = TRUE;
3136 #line 3130 "moonshot-identity-manager-app.c"
3137         }
3138 #line 468 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3139         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
3140 #line 469 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3141         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
3142 #line 470 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3143         textdomain (GETTEXT_PACKAGE);
3144 #line 473 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3145         _tmp30_ = headless;
3146 #line 473 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3147         _tmp31_ = use_flat_file_store;
3148 #line 473 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3149         _tmp32_ = identity_manager_app_new (_tmp30_, _tmp31_);
3150 #line 473 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3151         app = _tmp32_;
3152 #line 474 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3153         _tmp33_ = app;
3154 #line 474 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3155         _tmp34_ = explicitly_launched;
3156 #line 474 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3157         _tmp33_->explicitly_launched = _tmp34_;
3158 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3159         _tmp35_ = identity_manager_app_logger;
3160 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3161         _tmp36_ = explicitly_launched;
3162 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3163         _tmp37_ = bool_to_string (_tmp36_);
3164 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3165         _tmp38_ = _tmp37_;
3166 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3167         _tmp39_ = g_strconcat ("main: explicitly_launched=", _tmp38_, NULL);
3168 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3169         _tmp40_ = _tmp39_;
3170 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3171         moonshot_logger_trace (_tmp35_, _tmp40_, NULL);
3172 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3173         _g_free0 (_tmp40_);
3174 #line 475 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3175         _g_free0 (_tmp38_);
3176 #line 477 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3177         _tmp41_ = app;
3178 #line 477 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3179         _tmp42_ = _tmp41_->explicitly_launched;
3180 #line 477 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3181         if (_tmp42_) {
3182 #line 3176 "moonshot-identity-manager-app.c"
3183                 IdentityManagerApp* _tmp43_ = NULL;
3184 #line 478 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3185                 _tmp43_ = app;
3186 #line 478 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3187                 identity_manager_app_show (_tmp43_);
3188 #line 3182 "moonshot-identity-manager-app.c"
3189         }
3190 #line 481 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3191         _tmp44_ = headless;
3192 #line 481 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3193         if (_tmp44_) {
3194 #line 3188 "moonshot-identity-manager-app.c"
3195                 GMainLoop* loop = NULL;
3196                 GMainLoop* _tmp45_ = NULL;
3197                 GMainLoop* _tmp46_ = NULL;
3198 #line 483 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3199                 _tmp45_ = g_main_loop_new (NULL, FALSE);
3200 #line 483 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3201                 loop = _tmp45_;
3202 #line 484 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3203                 _tmp46_ = loop;
3204 #line 484 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3205                 g_main_loop_run (_tmp46_);
3206 #line 481 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3207                 _g_main_loop_unref0 (loop);
3208 #line 3202 "moonshot-identity-manager-app.c"
3209         } else {
3210 #line 488 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3211                 gtk_main ();
3212 #line 3206 "moonshot-identity-manager-app.c"
3213         }
3214 #line 491 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3215         result = 0;
3216 #line 491 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3217         _identity_manager_app_unref0 (app);
3218 #line 491 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3219         return result;
3220 #line 3214 "moonshot-identity-manager-app.c"
3221 }
3222
3223
3224 int main (int argc, char ** argv) {
3225 #if !GLIB_CHECK_VERSION (2,35,0)
3226         g_type_init ();
3227 #endif
3228 #line 421 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-identity-manager-app.vala"
3229         return _vala_main (argv, argc);
3230 #line 3224 "moonshot-identity-manager-app.c"
3231 }
3232
3233
3234 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
3235         if ((array != NULL) && (destroy_func != NULL)) {
3236                 int i;
3237                 for (i = 0; i < array_length; i = i + 1) {
3238                         if (((gpointer*) array)[i] != NULL) {
3239                                 destroy_func (((gpointer*) array)[i]);
3240                         }
3241                 }
3242         }
3243 }
3244
3245
3246 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
3247         _vala_array_destroy (array, array_length, destroy_func);
3248         g_free (array);
3249 }
3250
3251
3252 static gint _vala_array_length (gpointer array) {
3253         int length;
3254         length = 0;
3255         if (array) {
3256                 while (((gpointer*) array)[length]) {
3257                         length++;
3258                 }
3259         }
3260         return length;
3261 }
3262
3263
3264