vala
[moonshot-ui.git] / src / moonshot-local-flat-file-store.c
1 /* moonshot-local-flat-file-store.c generated by valac 0.26.1, the Vala compiler
2  * generated from moonshot-local-flat-file-store.vala, do not modify */
3
4 /*
5  * Copyright (c) 2011-2014, JANET(UK)
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of JANET(UK) nor the names of its contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34 */
35
36 #include <glib.h>
37 #include <glib-object.h>
38 #include <gee.h>
39 #include <stdlib.h>
40 #include <string.h>
41 #include <stdio.h>
42 #include "config.h"
43 #include <glib/gstdio.h>
44 #include <gio/gio.h>
45
46
47 #define TYPE_IIDENTITY_CARD_STORE (iidentity_card_store_get_type ())
48 #define IIDENTITY_CARD_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IIDENTITY_CARD_STORE, IIdentityCardStore))
49 #define IS_IIDENTITY_CARD_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IIDENTITY_CARD_STORE))
50 #define IIDENTITY_CARD_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IIDENTITY_CARD_STORE, IIdentityCardStoreIface))
51
52 typedef struct _IIdentityCardStore IIdentityCardStore;
53 typedef struct _IIdentityCardStoreIface IIdentityCardStoreIface;
54
55 #define TYPE_ID_CARD (id_card_get_type ())
56 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
57 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
58 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
59 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
60 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
61
62 typedef struct _IdCard IdCard;
63 typedef struct _IdCardClass IdCardClass;
64
65 #define IIDENTITY_CARD_STORE_TYPE_STORE_TYPE (iidentity_card_store_store_type_get_type ())
66
67 #define TYPE_LOCAL_FLAT_FILE_STORE (local_flat_file_store_get_type ())
68 #define LOCAL_FLAT_FILE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LOCAL_FLAT_FILE_STORE, LocalFlatFileStore))
69 #define LOCAL_FLAT_FILE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LOCAL_FLAT_FILE_STORE, LocalFlatFileStoreClass))
70 #define IS_LOCAL_FLAT_FILE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LOCAL_FLAT_FILE_STORE))
71 #define IS_LOCAL_FLAT_FILE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LOCAL_FLAT_FILE_STORE))
72 #define LOCAL_FLAT_FILE_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LOCAL_FLAT_FILE_STORE, LocalFlatFileStoreClass))
73
74 typedef struct _LocalFlatFileStore LocalFlatFileStore;
75 typedef struct _LocalFlatFileStoreClass LocalFlatFileStoreClass;
76 typedef struct _LocalFlatFileStorePrivate LocalFlatFileStorePrivate;
77 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
78 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
79 #define _g_free0(var) (var = (g_free (var), NULL))
80 #define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
81
82 #define TYPE_RULE (rule_get_type ())
83 typedef struct _Rule Rule;
84
85 #define TYPE_TRUST_ANCHOR (trust_anchor_get_type ())
86 #define TRUST_ANCHOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRUST_ANCHOR, TrustAnchor))
87 #define TRUST_ANCHOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRUST_ANCHOR, TrustAnchorClass))
88 #define IS_TRUST_ANCHOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRUST_ANCHOR))
89 #define IS_TRUST_ANCHOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRUST_ANCHOR))
90 #define TRUST_ANCHOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRUST_ANCHOR, TrustAnchorClass))
91
92 typedef struct _TrustAnchor TrustAnchor;
93 typedef struct _TrustAnchorClass TrustAnchorClass;
94
95 typedef enum  {
96         IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE,
97         IIDENTITY_CARD_STORE_STORE_TYPE_KEYRING
98 } IIdentityCardStoreStoreType;
99
100 struct _IIdentityCardStoreIface {
101         GTypeInterface parent_iface;
102         void (*add_card) (IIdentityCardStore* self, IdCard* card);
103         gboolean (*remove_card) (IIdentityCardStore* self, IdCard* card);
104         IdCard* (*update_card) (IIdentityCardStore* self, IdCard* card);
105         IIdentityCardStoreStoreType (*get_store_type) (IIdentityCardStore* self);
106         GeeLinkedList* (*get_card_list) (IIdentityCardStore* self);
107 };
108
109 struct _LocalFlatFileStore {
110         GObject parent_instance;
111         LocalFlatFileStorePrivate * priv;
112 };
113
114 struct _LocalFlatFileStoreClass {
115         GObjectClass parent_class;
116 };
117
118 struct _LocalFlatFileStorePrivate {
119         GeeLinkedList* id_card_list;
120 };
121
122 struct _Rule {
123         gchar* pattern;
124         gchar* always_confirm;
125 };
126
127
128 static gpointer local_flat_file_store_parent_class = NULL;
129 static IIdentityCardStoreIface* local_flat_file_store_iidentity_card_store_parent_iface = NULL;
130
131 GType id_card_get_type (void) G_GNUC_CONST;
132 GType iidentity_card_store_store_type_get_type (void) G_GNUC_CONST;
133 GType iidentity_card_store_get_type (void) G_GNUC_CONST;
134 GType local_flat_file_store_get_type (void) G_GNUC_CONST;
135 #define LOCAL_FLAT_FILE_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LOCAL_FLAT_FILE_STORE, LocalFlatFileStorePrivate))
136 enum  {
137         LOCAL_FLAT_FILE_STORE_DUMMY_PROPERTY
138 };
139 #define LOCAL_FLAT_FILE_STORE_FILE_NAME "identities.txt"
140 static void local_flat_file_store_real_add_card (IIdentityCardStore* base, IdCard* card);
141 void local_flat_file_store_store_id_cards (LocalFlatFileStore* self);
142 static IdCard* local_flat_file_store_real_update_card (IIdentityCardStore* base, IdCard* card);
143 const gchar* id_card_get_display_name (IdCard* self);
144 static gboolean local_flat_file_store_real_remove_card (IIdentityCardStore* base, IdCard* card);
145 static GeeLinkedList* local_flat_file_store_real_get_card_list (IIdentityCardStore* base);
146 static IIdentityCardStoreStoreType local_flat_file_store_real_get_store_type (IIdentityCardStore* base);
147 static void local_flat_file_store_load_id_cards (LocalFlatFileStore* self);
148 static gchar* local_flat_file_store_get_data_dir (LocalFlatFileStore* self);
149 IdCard* id_card_new (void);
150 IdCard* id_card_construct (GType object_type);
151 void id_card_set_issuer (IdCard* self, const gchar* value);
152 void id_card_set_username (IdCard* self, const gchar* value);
153 void id_card_set_password (IdCard* self, const gchar* value);
154 void id_card_set_services (IdCard* self, gchar** value, int value_length1);
155 void id_card_set_display_name (IdCard* self, const gchar* value);
156 void id_card_set_store_password (IdCard* self, gboolean value);
157 const gchar* id_card_get_password (IdCard* self);
158 GType rule_get_type (void) G_GNUC_CONST;
159 Rule* rule_dup (const Rule* self);
160 void rule_free (Rule* self);
161 void rule_copy (const Rule* self, Rule* dest);
162 void rule_destroy (Rule* self);
163 void id_card_set_rules (IdCard* self, Rule* value, int value_length1);
164 static void _vala_Rule_array_free (Rule* array, gint array_length);
165 GType trust_anchor_get_type (void) G_GNUC_CONST;
166 TrustAnchor* id_card_get_trust_anchor (IdCard* self);
167 void trust_anchor_set_ca_cert (TrustAnchor* self, const gchar* value);
168 void trust_anchor_set_subject (TrustAnchor* self, const gchar* value);
169 void trust_anchor_set_subject_alt (TrustAnchor* self, const gchar* value);
170 void trust_anchor_set_server_cert (TrustAnchor* self, const gchar* value);
171 Rule* id_card_get_rules (IdCard* self, int* result_length1);
172 static Rule* _vala_array_dup1 (Rule* self, int length);
173 gchar** id_card_get_services (IdCard* self, int* result_length1);
174 static gchar** _vala_array_dup2 (gchar** self, int length);
175 const gchar* id_card_get_issuer (IdCard* self);
176 const gchar* id_card_get_username (IdCard* self);
177 gboolean id_card_get_store_password (IdCard* self);
178 const gchar* trust_anchor_get_ca_cert (TrustAnchor* self);
179 const gchar* trust_anchor_get_subject (TrustAnchor* self);
180 const gchar* trust_anchor_get_subject_alt (TrustAnchor* self);
181 const gchar* trust_anchor_get_server_cert (TrustAnchor* self);
182 LocalFlatFileStore* local_flat_file_store_new (void);
183 LocalFlatFileStore* local_flat_file_store_construct (GType object_type);
184 static void local_flat_file_store_finalize (GObject* obj);
185 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
186 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
187
188
189 static void local_flat_file_store_real_add_card (IIdentityCardStore* base, IdCard* card) {
190         LocalFlatFileStore * self;
191         GeeLinkedList* _tmp0_ = NULL;
192         IdCard* _tmp1_ = NULL;
193 #line 38 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
194         self = (LocalFlatFileStore*) base;
195 #line 38 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
196         g_return_if_fail (card != NULL);
197 #line 39 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
198         _tmp0_ = self->priv->id_card_list;
199 #line 39 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
200         _tmp1_ = card;
201 #line 39 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
202         gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, _tmp1_);
203 #line 40 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
204         local_flat_file_store_store_id_cards (self);
205 #line 206 "moonshot-local-flat-file-store.c"
206 }
207
208
209 static gpointer _g_object_ref0 (gpointer self) {
210 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
211         return self ? g_object_ref (self) : NULL;
212 #line 213 "moonshot-local-flat-file-store.c"
213 }
214
215
216 static IdCard* local_flat_file_store_real_update_card (IIdentityCardStore* base, IdCard* card) {
217         LocalFlatFileStore * self;
218         IdCard* result = NULL;
219         GeeLinkedList* _tmp0_ = NULL;
220         IdCard* _tmp1_ = NULL;
221         GeeLinkedList* _tmp2_ = NULL;
222         IdCard* _tmp3_ = NULL;
223 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
224         self = (LocalFlatFileStore*) base;
225 #line 43 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
226         g_return_val_if_fail (card != NULL, NULL);
227 #line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
228         _tmp0_ = self->priv->id_card_list;
229 #line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
230         _tmp1_ = card;
231 #line 44 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
232         gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
233 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
234         _tmp2_ = self->priv->id_card_list;
235 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
236         _tmp3_ = card;
237 #line 45 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
238         gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp3_);
239 #line 46 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
240         local_flat_file_store_store_id_cards (self);
241 #line 242 "moonshot-local-flat-file-store.c"
242         {
243                 GeeLinkedList* _idcard_list = NULL;
244                 GeeLinkedList* _tmp4_ = NULL;
245                 GeeLinkedList* _tmp5_ = NULL;
246                 gint _idcard_size = 0;
247                 GeeLinkedList* _tmp6_ = NULL;
248                 gint _tmp7_ = 0;
249                 gint _tmp8_ = 0;
250                 gint _idcard_index = 0;
251 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
252                 _tmp4_ = self->priv->id_card_list;
253 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
254                 _tmp5_ = _g_object_ref0 (_tmp4_);
255 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
256                 _idcard_list = _tmp5_;
257 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
258                 _tmp6_ = _idcard_list;
259 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
260                 _tmp7_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp6_);
261 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
262                 _tmp8_ = _tmp7_;
263 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
264                 _idcard_size = _tmp8_;
265 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
266                 _idcard_index = -1;
267 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
268                 while (TRUE) {
269 #line 270 "moonshot-local-flat-file-store.c"
270                         gint _tmp9_ = 0;
271                         gint _tmp10_ = 0;
272                         gint _tmp11_ = 0;
273                         IdCard* idcard = NULL;
274                         GeeLinkedList* _tmp12_ = NULL;
275                         gint _tmp13_ = 0;
276                         gpointer _tmp14_ = NULL;
277                         IdCard* _tmp15_ = NULL;
278                         const gchar* _tmp16_ = NULL;
279                         const gchar* _tmp17_ = NULL;
280                         IdCard* _tmp18_ = NULL;
281                         const gchar* _tmp19_ = NULL;
282                         const gchar* _tmp20_ = NULL;
283 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
284                         _tmp9_ = _idcard_index;
285 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
286                         _idcard_index = _tmp9_ + 1;
287 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
288                         _tmp10_ = _idcard_index;
289 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
290                         _tmp11_ = _idcard_size;
291 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
292                         if (!(_tmp10_ < _tmp11_)) {
293 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
294                                 break;
295 #line 296 "moonshot-local-flat-file-store.c"
296                         }
297 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
298                         _tmp12_ = _idcard_list;
299 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
300                         _tmp13_ = _idcard_index;
301 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
302                         _tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _tmp13_);
303 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
304                         idcard = (IdCard*) _tmp14_;
305 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
306                         _tmp15_ = idcard;
307 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
308                         _tmp16_ = id_card_get_display_name (_tmp15_);
309 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
310                         _tmp17_ = _tmp16_;
311 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
312                         _tmp18_ = card;
313 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
314                         _tmp19_ = id_card_get_display_name (_tmp18_);
315 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
316                         _tmp20_ = _tmp19_;
317 #line 48 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
318                         if (g_strcmp0 (_tmp17_, _tmp20_) == 0) {
319 #line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
320                                 result = idcard;
321 #line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
322                                 _g_object_unref0 (_idcard_list);
323 #line 49 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
324                                 return result;
325 #line 326 "moonshot-local-flat-file-store.c"
326                         }
327 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
328                         _g_object_unref0 (idcard);
329 #line 330 "moonshot-local-flat-file-store.c"
330                 }
331 #line 47 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
332                 _g_object_unref0 (_idcard_list);
333 #line 334 "moonshot-local-flat-file-store.c"
334         }
335 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
336         result = NULL;
337 #line 50 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
338         return result;
339 #line 340 "moonshot-local-flat-file-store.c"
340 }
341
342
343 static gboolean local_flat_file_store_real_remove_card (IIdentityCardStore* base, IdCard* card) {
344         LocalFlatFileStore * self;
345         gboolean result = FALSE;
346         GeeLinkedList* _tmp0_ = NULL;
347         IdCard* _tmp1_ = NULL;
348         gboolean _tmp2_ = FALSE;
349 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
350         self = (LocalFlatFileStore*) base;
351 #line 53 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
352         g_return_val_if_fail (card != NULL, FALSE);
353 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
354         _tmp0_ = self->priv->id_card_list;
355 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
356         _tmp1_ = card;
357 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
358         _tmp2_ = gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
359 #line 54 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
360         if (_tmp2_) {
361 #line 55 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
362                 local_flat_file_store_store_id_cards (self);
363 #line 56 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
364                 result = TRUE;
365 #line 56 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
366                 return result;
367 #line 368 "moonshot-local-flat-file-store.c"
368         }
369 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
370         result = FALSE;
371 #line 58 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
372         return result;
373 #line 374 "moonshot-local-flat-file-store.c"
374 }
375
376
377 static GeeLinkedList* local_flat_file_store_real_get_card_list (IIdentityCardStore* base) {
378         LocalFlatFileStore * self;
379         GeeLinkedList* result = NULL;
380         GeeLinkedList* _tmp0_ = NULL;
381         GeeLinkedList* _tmp1_ = NULL;
382 #line 61 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
383         self = (LocalFlatFileStore*) base;
384 #line 62 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
385         _tmp0_ = self->priv->id_card_list;
386 #line 62 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
387         _tmp1_ = _g_object_ref0 (_tmp0_);
388 #line 62 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
389         result = _tmp1_;
390 #line 62 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
391         return result;
392 #line 393 "moonshot-local-flat-file-store.c"
393 }
394
395
396 static IIdentityCardStoreStoreType local_flat_file_store_real_get_store_type (IIdentityCardStore* base) {
397         LocalFlatFileStore * self;
398         IIdentityCardStoreStoreType result = 0;
399 #line 65 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
400         self = (LocalFlatFileStore*) base;
401 #line 66 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
402         result = IIDENTITY_CARD_STORE_STORE_TYPE_FLAT_FILE;
403 #line 66 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
404         return result;
405 #line 406 "moonshot-local-flat-file-store.c"
406 }
407
408
409 static void _vala_Rule_array_free (Rule* array, gint array_length) {
410 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
411         if (array != NULL) {
412 #line 413 "moonshot-local-flat-file-store.c"
413                 int i;
414 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
415                 for (i = 0; i < array_length; i = i + 1) {
416 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
417                         rule_destroy (&array[i]);
418 #line 419 "moonshot-local-flat-file-store.c"
419                 }
420         }
421 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
422         g_free (array);
423 #line 424 "moonshot-local-flat-file-store.c"
424 }
425
426
427 static gchar* string_strip (const gchar* self) {
428         gchar* result = NULL;
429         gchar* _result_ = NULL;
430         gchar* _tmp0_ = NULL;
431         const gchar* _tmp1_ = NULL;
432 #line 1115 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
433         g_return_val_if_fail (self != NULL, NULL);
434 #line 1116 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
435         _tmp0_ = g_strdup (self);
436 #line 1116 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
437         _result_ = _tmp0_;
438 #line 1117 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
439         _tmp1_ = _result_;
440 #line 1117 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
441         g_strstrip (_tmp1_);
442 #line 1118 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
443         result = _result_;
444 #line 1118 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
445         return result;
446 #line 447 "moonshot-local-flat-file-store.c"
447 }
448
449
450 static void local_flat_file_store_load_id_cards (LocalFlatFileStore* self) {
451         GeeLinkedList* _tmp0_ = NULL;
452         GKeyFile* key_file = NULL;
453         GKeyFile* _tmp1_ = NULL;
454         gchar* path = NULL;
455         gchar* _tmp2_ = NULL;
456         gchar* filename = NULL;
457         const gchar* _tmp3_ = NULL;
458         gchar* _tmp4_ = NULL;
459         gchar** identities_uris = NULL;
460         GKeyFile* _tmp10_ = NULL;
461         gsize _tmp11_;
462         gchar** _tmp12_ = NULL;
463         gint identities_uris_length1 = 0;
464         gint _identities_uris_size_ = 0;
465         gchar** _tmp13_ = NULL;
466         gint _tmp13__length1 = 0;
467         GError * _inner_error_ = NULL;
468 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
469         g_return_if_fail (self != NULL);
470 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
471         _tmp0_ = self->priv->id_card_list;
472 #line 70 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
473         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
474 #line 71 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
475         _tmp1_ = g_key_file_new ();
476 #line 71 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
477         key_file = _tmp1_;
478 #line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
479         _tmp2_ = local_flat_file_store_get_data_dir (self);
480 #line 72 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
481         path = _tmp2_;
482 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
483         _tmp3_ = path;
484 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
485         _tmp4_ = g_build_filename (_tmp3_, LOCAL_FLAT_FILE_STORE_FILE_NAME, NULL);
486 #line 73 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
487         filename = _tmp4_;
488 #line 489 "moonshot-local-flat-file-store.c"
489         {
490                 GKeyFile* _tmp5_ = NULL;
491                 const gchar* _tmp6_ = NULL;
492 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
493                 _tmp5_ = key_file;
494 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
495                 _tmp6_ = filename;
496 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
497                 g_key_file_load_from_file (_tmp5_, _tmp6_, G_KEY_FILE_NONE, &_inner_error_);
498 #line 76 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
499                 if (G_UNLIKELY (_inner_error_ != NULL)) {
500 #line 501 "moonshot-local-flat-file-store.c"
501                         goto __catch5_g_error;
502                 }
503         }
504         goto __finally5;
505         __catch5_g_error:
506         {
507                 GError* e = NULL;
508                 FILE* _tmp7_ = NULL;
509                 GError* _tmp8_ = NULL;
510                 const gchar* _tmp9_ = NULL;
511 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
512                 e = _inner_error_;
513 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
514                 _inner_error_ = NULL;
515 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
516                 _tmp7_ = stdout;
517 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
518                 _tmp8_ = e;
519 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
520                 _tmp9_ = _tmp8_->message;
521 #line 79 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
522                 fprintf (_tmp7_, "Error: %s\n", _tmp9_);
523 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
524                 _g_error_free0 (e);
525 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
526                 _g_free0 (filename);
527 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
528                 _g_free0 (path);
529 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
530                 _g_key_file_free0 (key_file);
531 #line 80 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
532                 return;
533 #line 534 "moonshot-local-flat-file-store.c"
534         }
535         __finally5:
536 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
537         if (G_UNLIKELY (_inner_error_ != NULL)) {
538 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
539                 _g_free0 (filename);
540 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
541                 _g_free0 (path);
542 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
543                 _g_key_file_free0 (key_file);
544 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
545                 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);
546 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
547                 g_clear_error (&_inner_error_);
548 #line 75 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
549                 return;
550 #line 551 "moonshot-local-flat-file-store.c"
551         }
552 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
553         _tmp10_ = key_file;
554 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
555         _tmp12_ = g_key_file_get_groups (_tmp10_, &_tmp11_);
556 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
557         identities_uris = _tmp12_;
558 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
559         identities_uris_length1 = _tmp11_;
560 #line 83 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
561         _identities_uris_size_ = identities_uris_length1;
562 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
563         _tmp13_ = identities_uris;
564 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
565         _tmp13__length1 = identities_uris_length1;
566 #line 567 "moonshot-local-flat-file-store.c"
567         {
568                 gchar** identity_collection = NULL;
569                 gint identity_collection_length1 = 0;
570                 gint _identity_collection_size_ = 0;
571                 gint identity_it = 0;
572 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
573                 identity_collection = _tmp13_;
574 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
575                 identity_collection_length1 = _tmp13__length1;
576 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
577                 for (identity_it = 0; identity_it < _tmp13__length1; identity_it = identity_it + 1) {
578 #line 579 "moonshot-local-flat-file-store.c"
579                         gchar* _tmp14_ = NULL;
580                         gchar* identity = NULL;
581 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
582                         _tmp14_ = g_strdup (identity_collection[identity_it]);
583 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
584                         identity = _tmp14_;
585 #line 586 "moonshot-local-flat-file-store.c"
586                         {
587                                 {
588                                         IdCard* id_card = NULL;
589                                         IdCard* _tmp15_ = NULL;
590                                         gchar* _tmp16_ = NULL;
591                                         GKeyFile* _tmp17_ = NULL;
592                                         const gchar* _tmp18_ = NULL;
593                                         gchar* _tmp19_ = NULL;
594                                         IdCard* _tmp20_ = NULL;
595                                         gchar* _tmp21_ = NULL;
596                                         GKeyFile* _tmp22_ = NULL;
597                                         const gchar* _tmp23_ = NULL;
598                                         gchar* _tmp24_ = NULL;
599                                         IdCard* _tmp25_ = NULL;
600                                         gchar* _tmp26_ = NULL;
601                                         GKeyFile* _tmp27_ = NULL;
602                                         const gchar* _tmp28_ = NULL;
603                                         gchar* _tmp29_ = NULL;
604                                         IdCard* _tmp30_ = NULL;
605                                         gchar** _tmp31_ = NULL;
606                                         GKeyFile* _tmp32_ = NULL;
607                                         const gchar* _tmp33_ = NULL;
608                                         gsize _tmp34_;
609                                         gchar** _tmp35_ = NULL;
610                                         gint _tmp31__length1 = 0;
611                                         gint __tmp31__size_ = 0;
612                                         IdCard* _tmp36_ = NULL;
613                                         gchar* _tmp37_ = NULL;
614                                         GKeyFile* _tmp38_ = NULL;
615                                         const gchar* _tmp39_ = NULL;
616                                         gchar* _tmp40_ = NULL;
617                                         IdCard* _tmp41_ = NULL;
618                                         gboolean _tmp42_ = FALSE;
619                                         GKeyFile* _tmp43_ = NULL;
620                                         const gchar* _tmp44_ = NULL;
621                                         gboolean _tmp45_ = FALSE;
622                                         gboolean _tmp61_ = FALSE;
623                                         gboolean _tmp62_ = FALSE;
624                                         GKeyFile* _tmp63_ = NULL;
625                                         const gchar* _tmp64_ = NULL;
626                                         gboolean _tmp65_ = FALSE;
627                                         gchar* _tmp100_ = NULL;
628                                         GKeyFile* _tmp101_ = NULL;
629                                         const gchar* _tmp102_ = NULL;
630                                         gchar* _tmp103_ = NULL;
631                                         IdCard* _tmp104_ = NULL;
632                                         TrustAnchor* _tmp105_ = NULL;
633                                         TrustAnchor* _tmp106_ = NULL;
634                                         gchar* _tmp107_ = NULL;
635                                         gchar* _tmp108_ = NULL;
636                                         gchar* _tmp109_ = NULL;
637                                         gchar* _tmp110_ = NULL;
638                                         gchar* _tmp111_ = NULL;
639                                         GKeyFile* _tmp112_ = NULL;
640                                         const gchar* _tmp113_ = NULL;
641                                         gchar* _tmp114_ = NULL;
642                                         IdCard* _tmp115_ = NULL;
643                                         TrustAnchor* _tmp116_ = NULL;
644                                         TrustAnchor* _tmp117_ = NULL;
645                                         gchar* _tmp118_ = NULL;
646                                         GKeyFile* _tmp119_ = NULL;
647                                         const gchar* _tmp120_ = NULL;
648                                         gchar* _tmp121_ = NULL;
649                                         IdCard* _tmp122_ = NULL;
650                                         TrustAnchor* _tmp123_ = NULL;
651                                         TrustAnchor* _tmp124_ = NULL;
652                                         gchar* _tmp125_ = NULL;
653                                         GKeyFile* _tmp126_ = NULL;
654                                         const gchar* _tmp127_ = NULL;
655                                         gchar* _tmp128_ = NULL;
656                                         IdCard* _tmp129_ = NULL;
657                                         TrustAnchor* _tmp130_ = NULL;
658                                         TrustAnchor* _tmp131_ = NULL;
659                                         GeeLinkedList* _tmp132_ = NULL;
660                                         IdCard* _tmp133_ = NULL;
661 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
662                                         _tmp15_ = id_card_new ();
663 #line 86 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
664                                         id_card = _tmp15_;
665 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
666                                         _tmp17_ = key_file;
667 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
668                                         _tmp18_ = identity;
669 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
670                                         _tmp19_ = g_key_file_get_string (_tmp17_, _tmp18_, "Issuer", &_inner_error_);
671 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
672                                         _tmp16_ = _tmp19_;
673 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
674                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
675 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
676                                                 _g_object_unref0 (id_card);
677 #line 678 "moonshot-local-flat-file-store.c"
678                                                 goto __catch6_g_error;
679                                         }
680 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
681                                         _tmp20_ = id_card;
682 #line 88 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
683                                         id_card_set_issuer (_tmp20_, _tmp16_);
684 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
685                                         _tmp22_ = key_file;
686 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
687                                         _tmp23_ = identity;
688 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
689                                         _tmp24_ = g_key_file_get_string (_tmp22_, _tmp23_, "Username", &_inner_error_);
690 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
691                                         _tmp21_ = _tmp24_;
692 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
693                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
694 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
695                                                 _g_free0 (_tmp16_);
696 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
697                                                 _g_object_unref0 (id_card);
698 #line 699 "moonshot-local-flat-file-store.c"
699                                                 goto __catch6_g_error;
700                                         }
701 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
702                                         _tmp25_ = id_card;
703 #line 89 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
704                                         id_card_set_username (_tmp25_, _tmp21_);
705 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
706                                         _tmp27_ = key_file;
707 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
708                                         _tmp28_ = identity;
709 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
710                                         _tmp29_ = g_key_file_get_string (_tmp27_, _tmp28_, "Password", &_inner_error_);
711 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
712                                         _tmp26_ = _tmp29_;
713 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
714                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
715 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
716                                                 _g_free0 (_tmp21_);
717 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
718                                                 _g_free0 (_tmp16_);
719 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
720                                                 _g_object_unref0 (id_card);
721 #line 722 "moonshot-local-flat-file-store.c"
722                                                 goto __catch6_g_error;
723                                         }
724 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
725                                         _tmp30_ = id_card;
726 #line 90 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
727                                         id_card_set_password (_tmp30_, _tmp26_);
728 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
729                                         _tmp32_ = key_file;
730 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
731                                         _tmp33_ = identity;
732 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
733                                         _tmp35_ = g_key_file_get_string_list (_tmp32_, _tmp33_, "Services", &_tmp34_, &_inner_error_);
734 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
735                                         _tmp31_ = _tmp35_;
736 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
737                                         _tmp31__length1 = _tmp34_;
738 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
739                                         __tmp31__size_ = _tmp31__length1;
740 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
741                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
742 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
743                                                 _g_free0 (_tmp26_);
744 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
745                                                 _g_free0 (_tmp21_);
746 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
747                                                 _g_free0 (_tmp16_);
748 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
749                                                 _g_object_unref0 (id_card);
750 #line 751 "moonshot-local-flat-file-store.c"
751                                                 goto __catch6_g_error;
752                                         }
753 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
754                                         _tmp36_ = id_card;
755 #line 91 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
756                                         id_card_set_services (_tmp36_, _tmp31_, _tmp31__length1);
757 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
758                                         _tmp38_ = key_file;
759 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
760                                         _tmp39_ = identity;
761 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
762                                         _tmp40_ = g_key_file_get_string (_tmp38_, _tmp39_, "DisplayName", &_inner_error_);
763 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
764                                         _tmp37_ = _tmp40_;
765 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
766                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
767 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
768                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
769 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
770                                                 _g_free0 (_tmp26_);
771 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
772                                                 _g_free0 (_tmp21_);
773 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
774                                                 _g_free0 (_tmp16_);
775 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
776                                                 _g_object_unref0 (id_card);
777 #line 778 "moonshot-local-flat-file-store.c"
778                                                 goto __catch6_g_error;
779                                         }
780 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
781                                         _tmp41_ = id_card;
782 #line 92 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
783                                         id_card_set_display_name (_tmp41_, _tmp37_);
784 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
785                                         _tmp43_ = key_file;
786 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
787                                         _tmp44_ = identity;
788 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
789                                         _tmp45_ = g_key_file_has_key (_tmp43_, _tmp44_, "StorePassword", &_inner_error_);
790 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
791                                         _tmp42_ = _tmp45_;
792 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
793                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
794 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
795                                                 _g_free0 (_tmp37_);
796 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
797                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
798 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
799                                                 _g_free0 (_tmp26_);
800 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
801                                                 _g_free0 (_tmp21_);
802 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
803                                                 _g_free0 (_tmp16_);
804 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
805                                                 _g_object_unref0 (id_card);
806 #line 807 "moonshot-local-flat-file-store.c"
807                                                 goto __catch6_g_error;
808                                         }
809 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
810                                         if (_tmp42_) {
811 #line 812 "moonshot-local-flat-file-store.c"
812                                                 gchar* _tmp46_ = NULL;
813                                                 GKeyFile* _tmp47_ = NULL;
814                                                 const gchar* _tmp48_ = NULL;
815                                                 gchar* _tmp49_ = NULL;
816                                                 IdCard* _tmp50_ = NULL;
817                                                 gchar* _tmp51_ = NULL;
818                                                 gchar* _tmp52_ = NULL;
819 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
820                                                 _tmp47_ = key_file;
821 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
822                                                 _tmp48_ = identity;
823 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
824                                                 _tmp49_ = g_key_file_get_string (_tmp47_, _tmp48_, "StorePassword", &_inner_error_);
825 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
826                                                 _tmp46_ = _tmp49_;
827 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
828                                                 if (G_UNLIKELY (_inner_error_ != NULL)) {
829 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
830                                                         _g_free0 (_tmp37_);
831 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
832                                                         _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
833 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
834                                                         _g_free0 (_tmp26_);
835 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
836                                                         _g_free0 (_tmp21_);
837 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
838                                                         _g_free0 (_tmp16_);
839 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
840                                                         _g_object_unref0 (id_card);
841 #line 842 "moonshot-local-flat-file-store.c"
842                                                         goto __catch6_g_error;
843                                                 }
844 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
845                                                 _tmp50_ = id_card;
846 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
847                                                 _tmp51_ = _tmp46_;
848 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
849                                                 _tmp46_ = NULL;
850 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
851                                                 _tmp52_ = _tmp51_;
852 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
853                                                 id_card_set_store_password (_tmp50_, g_strcmp0 (_tmp52_, "yes") == 0);
854 #line 94 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
855                                                 _g_free0 (_tmp52_);
856 #line 93 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
857                                                 _g_free0 (_tmp46_);
858 #line 859 "moonshot-local-flat-file-store.c"
859                                         } else {
860                                                 gboolean _tmp53_ = FALSE;
861                                                 IdCard* _tmp54_ = NULL;
862                                                 const gchar* _tmp55_ = NULL;
863                                                 const gchar* _tmp56_ = NULL;
864                                                 IdCard* _tmp60_ = NULL;
865 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
866                                                 _tmp54_ = id_card;
867 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
868                                                 _tmp55_ = id_card_get_password (_tmp54_);
869 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
870                                                 _tmp56_ = _tmp55_;
871 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
872                                                 if (_tmp56_ != NULL) {
873 #line 874 "moonshot-local-flat-file-store.c"
874                                                         IdCard* _tmp57_ = NULL;
875                                                         const gchar* _tmp58_ = NULL;
876                                                         const gchar* _tmp59_ = NULL;
877 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
878                                                         _tmp57_ = id_card;
879 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
880                                                         _tmp58_ = id_card_get_password (_tmp57_);
881 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
882                                                         _tmp59_ = _tmp58_;
883 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
884                                                         _tmp53_ = g_strcmp0 (_tmp59_, "") != 0;
885 #line 886 "moonshot-local-flat-file-store.c"
886                                                 } else {
887 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
888                                                         _tmp53_ = FALSE;
889 #line 890 "moonshot-local-flat-file-store.c"
890                                                 }
891 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
892                                                 _tmp60_ = id_card;
893 #line 96 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
894                                                 id_card_set_store_password (_tmp60_, _tmp53_);
895 #line 896 "moonshot-local-flat-file-store.c"
896                                         }
897 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
898                                         _tmp63_ = key_file;
899 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
900                                         _tmp64_ = identity;
901 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
902                                         _tmp65_ = g_key_file_has_key (_tmp63_, _tmp64_, "Rules-Patterns", &_inner_error_);
903 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
904                                         _tmp62_ = _tmp65_;
905 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
906                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
907 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
908                                                 _g_free0 (_tmp37_);
909 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
910                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
911 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
912                                                 _g_free0 (_tmp26_);
913 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
914                                                 _g_free0 (_tmp21_);
915 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
916                                                 _g_free0 (_tmp16_);
917 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
918                                                 _g_object_unref0 (id_card);
919 #line 920 "moonshot-local-flat-file-store.c"
920                                                 goto __catch6_g_error;
921                                         }
922 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
923                                         if (_tmp62_) {
924 #line 925 "moonshot-local-flat-file-store.c"
925                                                 gboolean _tmp66_ = FALSE;
926                                                 GKeyFile* _tmp67_ = NULL;
927                                                 const gchar* _tmp68_ = NULL;
928                                                 gboolean _tmp69_ = FALSE;
929 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
930                                                 _tmp67_ = key_file;
931 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
932                                                 _tmp68_ = identity;
933 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
934                                                 _tmp69_ = g_key_file_has_key (_tmp67_, _tmp68_, "Rules-AlwaysConfirm", &_inner_error_);
935 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
936                                                 _tmp66_ = _tmp69_;
937 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
938                                                 if (G_UNLIKELY (_inner_error_ != NULL)) {
939 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
940                                                         _g_free0 (_tmp37_);
941 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
942                                                         _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
943 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
944                                                         _g_free0 (_tmp26_);
945 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
946                                                         _g_free0 (_tmp21_);
947 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
948                                                         _g_free0 (_tmp16_);
949 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
950                                                         _g_object_unref0 (id_card);
951 #line 952 "moonshot-local-flat-file-store.c"
952                                                         goto __catch6_g_error;
953                                                 }
954 #line 100 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
955                                                 _tmp61_ = _tmp66_;
956 #line 957 "moonshot-local-flat-file-store.c"
957                                         } else {
958 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
959                                                 _tmp61_ = FALSE;
960 #line 961 "moonshot-local-flat-file-store.c"
961                                         }
962 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
963                                         if (_tmp61_) {
964 #line 965 "moonshot-local-flat-file-store.c"
965                                                 gchar** rules_patterns = NULL;
966                                                 GKeyFile* _tmp70_ = NULL;
967                                                 const gchar* _tmp71_ = NULL;
968                                                 gsize _tmp72_;
969                                                 gchar** _tmp73_ = NULL;
970                                                 gint rules_patterns_length1 = 0;
971                                                 gint _rules_patterns_size_ = 0;
972                                                 gchar** rules_always_conf = NULL;
973                                                 GKeyFile* _tmp74_ = NULL;
974                                                 const gchar* _tmp75_ = NULL;
975                                                 gsize _tmp76_;
976                                                 gchar** _tmp77_ = NULL;
977                                                 gint rules_always_conf_length1 = 0;
978                                                 gint _rules_always_conf_size_ = 0;
979                                                 gchar** _tmp78_ = NULL;
980                                                 gint _tmp78__length1 = 0;
981                                                 gchar** _tmp79_ = NULL;
982                                                 gint _tmp79__length1 = 0;
983 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
984                                                 _tmp70_ = key_file;
985 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
986                                                 _tmp71_ = identity;
987 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
988                                                 _tmp73_ = g_key_file_get_string_list (_tmp70_, _tmp71_, "Rules-Patterns", &_tmp72_, &_inner_error_);
989 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
990                                                 rules_patterns = _tmp73_;
991 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
992                                                 rules_patterns_length1 = _tmp72_;
993 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
994                                                 _rules_patterns_size_ = rules_patterns_length1;
995 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
996                                                 if (G_UNLIKELY (_inner_error_ != NULL)) {
997 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
998                                                         _g_free0 (_tmp37_);
999 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1000                                                         _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1001 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1002                                                         _g_free0 (_tmp26_);
1003 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1004                                                         _g_free0 (_tmp21_);
1005 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1006                                                         _g_free0 (_tmp16_);
1007 #line 101 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1008                                                         _g_object_unref0 (id_card);
1009 #line 1010 "moonshot-local-flat-file-store.c"
1010                                                         goto __catch6_g_error;
1011                                                 }
1012 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1013                                                 _tmp74_ = key_file;
1014 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1015                                                 _tmp75_ = identity;
1016 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1017                                                 _tmp77_ = g_key_file_get_string_list (_tmp74_, _tmp75_, "Rules-AlwaysConfirm", &_tmp76_, &_inner_error_);
1018 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1019                                                 rules_always_conf = _tmp77_;
1020 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1021                                                 rules_always_conf_length1 = _tmp76_;
1022 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1023                                                 _rules_always_conf_size_ = rules_always_conf_length1;
1024 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1025                                                 if (G_UNLIKELY (_inner_error_ != NULL)) {
1026 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1027                                                         rules_patterns = (_vala_array_free (rules_patterns, rules_patterns_length1, (GDestroyNotify) g_free), NULL);
1028 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1029                                                         _g_free0 (_tmp37_);
1030 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1031                                                         _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1032 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1033                                                         _g_free0 (_tmp26_);
1034 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1035                                                         _g_free0 (_tmp21_);
1036 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1037                                                         _g_free0 (_tmp16_);
1038 #line 102 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1039                                                         _g_object_unref0 (id_card);
1040 #line 1041 "moonshot-local-flat-file-store.c"
1041                                                         goto __catch6_g_error;
1042                                                 }
1043 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1044                                                 _tmp78_ = rules_patterns;
1045 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1046                                                 _tmp78__length1 = rules_patterns_length1;
1047 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1048                                                 _tmp79_ = rules_always_conf;
1049 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1050                                                 _tmp79__length1 = rules_always_conf_length1;
1051 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1052                                                 if (_tmp78__length1 == _tmp79__length1) {
1053 #line 1054 "moonshot-local-flat-file-store.c"
1054                                                         Rule* rules = NULL;
1055                                                         gchar** _tmp80_ = NULL;
1056                                                         gint _tmp80__length1 = 0;
1057                                                         Rule* _tmp81_ = NULL;
1058                                                         gint rules_length1 = 0;
1059                                                         gint _rules_size_ = 0;
1060                                                         IdCard* _tmp98_ = NULL;
1061                                                         Rule* _tmp99_ = NULL;
1062                                                         gint _tmp99__length1 = 0;
1063 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1064                                                         _tmp80_ = rules_patterns;
1065 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1066                                                         _tmp80__length1 = rules_patterns_length1;
1067 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1068                                                         _tmp81_ = g_new0 (Rule, _tmp80__length1);
1069 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1070                                                         rules = _tmp81_;
1071 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1072                                                         rules_length1 = _tmp80__length1;
1073 #line 105 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1074                                                         _rules_size_ = rules_length1;
1075 #line 1076 "moonshot-local-flat-file-store.c"
1076                                                         {
1077                                                                 gint i = 0;
1078 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1079                                                                 i = 0;
1080 #line 1081 "moonshot-local-flat-file-store.c"
1081                                                                 {
1082                                                                         gboolean _tmp82_ = FALSE;
1083 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1084                                                                         _tmp82_ = TRUE;
1085 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1086                                                                         while (TRUE) {
1087 #line 1088 "moonshot-local-flat-file-store.c"
1088                                                                                 gint _tmp84_ = 0;
1089                                                                                 gchar** _tmp85_ = NULL;
1090                                                                                 gint _tmp85__length1 = 0;
1091                                                                                 Rule* _tmp86_ = NULL;
1092                                                                                 gint _tmp86__length1 = 0;
1093                                                                                 gint _tmp87_ = 0;
1094                                                                                 gchar** _tmp88_ = NULL;
1095                                                                                 gint _tmp88__length1 = 0;
1096                                                                                 gint _tmp89_ = 0;
1097                                                                                 const gchar* _tmp90_ = NULL;
1098                                                                                 gchar* _tmp91_ = NULL;
1099                                                                                 gchar** _tmp92_ = NULL;
1100                                                                                 gint _tmp92__length1 = 0;
1101                                                                                 gint _tmp93_ = 0;
1102                                                                                 const gchar* _tmp94_ = NULL;
1103                                                                                 gchar* _tmp95_ = NULL;
1104                                                                                 Rule _tmp96_ = {0};
1105                                                                                 Rule _tmp97_ = {0};
1106 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1107                                                                                 if (!_tmp82_) {
1108 #line 1109 "moonshot-local-flat-file-store.c"
1109                                                                                         gint _tmp83_ = 0;
1110 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1111                                                                                         _tmp83_ = i;
1112 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1113                                                                                         i = _tmp83_ + 1;
1114 #line 1115 "moonshot-local-flat-file-store.c"
1115                                                                                 }
1116 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1117                                                                                 _tmp82_ = FALSE;
1118 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1119                                                                                 _tmp84_ = i;
1120 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1121                                                                                 _tmp85_ = rules_patterns;
1122 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1123                                                                                 _tmp85__length1 = rules_patterns_length1;
1124 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1125                                                                                 if (!(_tmp84_ < _tmp85__length1)) {
1126 #line 106 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1127                                                                                         break;
1128 #line 1129 "moonshot-local-flat-file-store.c"
1129                                                                                 }
1130 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1131                                                                                 _tmp86_ = rules;
1132 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1133                                                                                 _tmp86__length1 = rules_length1;
1134 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1135                                                                                 _tmp87_ = i;
1136 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1137                                                                                 _tmp88_ = rules_patterns;
1138 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1139                                                                                 _tmp88__length1 = rules_patterns_length1;
1140 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1141                                                                                 _tmp89_ = i;
1142 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1143                                                                                 _tmp90_ = _tmp88_[_tmp89_];
1144 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1145                                                                                 _tmp91_ = g_strdup (_tmp90_);
1146 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1147                                                                                 _tmp92_ = rules_always_conf;
1148 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1149                                                                                 _tmp92__length1 = rules_always_conf_length1;
1150 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1151                                                                                 _tmp93_ = i;
1152 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1153                                                                                 _tmp94_ = _tmp92_[_tmp93_];
1154 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1155                                                                                 _tmp95_ = g_strdup (_tmp94_);
1156 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1157                                                                                 _g_free0 (_tmp96_.pattern);
1158 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1159                                                                                 _tmp96_.pattern = _tmp91_;
1160 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1161                                                                                 _g_free0 (_tmp96_.always_confirm);
1162 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1163                                                                                 _tmp96_.always_confirm = _tmp95_;
1164 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1165                                                                                 rule_destroy (&_tmp86_[_tmp87_]);
1166 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1167                                                                                 _tmp86_[_tmp87_] = _tmp96_;
1168 #line 107 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1169                                                                                 _tmp97_ = _tmp86_[_tmp87_];
1170 #line 1171 "moonshot-local-flat-file-store.c"
1171                                                                         }
1172                                                                 }
1173                                                         }
1174 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1175                                                         _tmp98_ = id_card;
1176 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1177                                                         _tmp99_ = rules;
1178 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1179                                                         _tmp99__length1 = rules_length1;
1180 #line 109 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1181                                                         id_card_set_rules (_tmp98_, _tmp99_, _tmp99__length1);
1182 #line 104 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1183                                                         rules = (_vala_Rule_array_free (rules, rules_length1), NULL);
1184 #line 1185 "moonshot-local-flat-file-store.c"
1185                                                 }
1186 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1187                                                 rules_always_conf = (_vala_array_free (rules_always_conf, rules_always_conf_length1, (GDestroyNotify) g_free), NULL);
1188 #line 99 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1189                                                 rules_patterns = (_vala_array_free (rules_patterns, rules_patterns_length1, (GDestroyNotify) g_free), NULL);
1190 #line 1191 "moonshot-local-flat-file-store.c"
1191                                         }
1192 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1193                                         _tmp101_ = key_file;
1194 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1195                                         _tmp102_ = identity;
1196 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1197                                         _tmp103_ = g_key_file_get_string (_tmp101_, _tmp102_, "CA-Cert", &_inner_error_);
1198 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1199                                         _tmp100_ = _tmp103_;
1200 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1201                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
1202 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1203                                                 _g_free0 (_tmp37_);
1204 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1205                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1206 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1207                                                 _g_free0 (_tmp26_);
1208 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1209                                                 _g_free0 (_tmp21_);
1210 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1211                                                 _g_free0 (_tmp16_);
1212 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1213                                                 _g_object_unref0 (id_card);
1214 #line 1215 "moonshot-local-flat-file-store.c"
1215                                                 goto __catch6_g_error;
1216                                         }
1217 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1218                                         _tmp104_ = id_card;
1219 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1220                                         _tmp105_ = id_card_get_trust_anchor (_tmp104_);
1221 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1222                                         _tmp106_ = _tmp105_;
1223 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1224                                         _tmp107_ = _tmp100_;
1225 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1226                                         _tmp100_ = NULL;
1227 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1228                                         _tmp108_ = _tmp107_;
1229 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1230                                         _tmp109_ = string_strip (_tmp108_);
1231 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1232                                         _tmp110_ = _tmp109_;
1233 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1234                                         trust_anchor_set_ca_cert (_tmp106_, _tmp110_);
1235 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1236                                         _g_free0 (_tmp110_);
1237 #line 114 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1238                                         _g_free0 (_tmp108_);
1239 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1240                                         _tmp112_ = key_file;
1241 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1242                                         _tmp113_ = identity;
1243 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1244                                         _tmp114_ = g_key_file_get_string (_tmp112_, _tmp113_, "Subject", &_inner_error_);
1245 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1246                                         _tmp111_ = _tmp114_;
1247 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1248                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
1249 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1250                                                 _g_free0 (_tmp100_);
1251 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1252                                                 _g_free0 (_tmp37_);
1253 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1254                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1255 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1256                                                 _g_free0 (_tmp26_);
1257 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1258                                                 _g_free0 (_tmp21_);
1259 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1260                                                 _g_free0 (_tmp16_);
1261 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1262                                                 _g_object_unref0 (id_card);
1263 #line 1264 "moonshot-local-flat-file-store.c"
1264                                                 goto __catch6_g_error;
1265                                         }
1266 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1267                                         _tmp115_ = id_card;
1268 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1269                                         _tmp116_ = id_card_get_trust_anchor (_tmp115_);
1270 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1271                                         _tmp117_ = _tmp116_;
1272 #line 115 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1273                                         trust_anchor_set_subject (_tmp117_, _tmp111_);
1274 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1275                                         _tmp119_ = key_file;
1276 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1277                                         _tmp120_ = identity;
1278 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1279                                         _tmp121_ = g_key_file_get_string (_tmp119_, _tmp120_, "SubjectAlt", &_inner_error_);
1280 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1281                                         _tmp118_ = _tmp121_;
1282 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1283                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
1284 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1285                                                 _g_free0 (_tmp111_);
1286 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1287                                                 _g_free0 (_tmp100_);
1288 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1289                                                 _g_free0 (_tmp37_);
1290 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1291                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1292 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1293                                                 _g_free0 (_tmp26_);
1294 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1295                                                 _g_free0 (_tmp21_);
1296 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1297                                                 _g_free0 (_tmp16_);
1298 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1299                                                 _g_object_unref0 (id_card);
1300 #line 1301 "moonshot-local-flat-file-store.c"
1301                                                 goto __catch6_g_error;
1302                                         }
1303 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1304                                         _tmp122_ = id_card;
1305 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1306                                         _tmp123_ = id_card_get_trust_anchor (_tmp122_);
1307 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1308                                         _tmp124_ = _tmp123_;
1309 #line 116 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1310                                         trust_anchor_set_subject_alt (_tmp124_, _tmp118_);
1311 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1312                                         _tmp126_ = key_file;
1313 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1314                                         _tmp127_ = identity;
1315 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1316                                         _tmp128_ = g_key_file_get_string (_tmp126_, _tmp127_, "ServerCert", &_inner_error_);
1317 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1318                                         _tmp125_ = _tmp128_;
1319 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1320                                         if (G_UNLIKELY (_inner_error_ != NULL)) {
1321 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1322                                                 _g_free0 (_tmp118_);
1323 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1324                                                 _g_free0 (_tmp111_);
1325 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1326                                                 _g_free0 (_tmp100_);
1327 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1328                                                 _g_free0 (_tmp37_);
1329 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1330                                                 _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1331 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1332                                                 _g_free0 (_tmp26_);
1333 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1334                                                 _g_free0 (_tmp21_);
1335 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1336                                                 _g_free0 (_tmp16_);
1337 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1338                                                 _g_object_unref0 (id_card);
1339 #line 1340 "moonshot-local-flat-file-store.c"
1340                                                 goto __catch6_g_error;
1341                                         }
1342 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1343                                         _tmp129_ = id_card;
1344 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1345                                         _tmp130_ = id_card_get_trust_anchor (_tmp129_);
1346 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1347                                         _tmp131_ = _tmp130_;
1348 #line 117 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1349                                         trust_anchor_set_server_cert (_tmp131_, _tmp125_);
1350 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1351                                         _tmp132_ = self->priv->id_card_list;
1352 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1353                                         _tmp133_ = id_card;
1354 #line 119 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1355                                         gee_abstract_collection_add ((GeeAbstractCollection*) _tmp132_, _tmp133_);
1356 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1357                                         _g_free0 (_tmp125_);
1358 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1359                                         _g_free0 (_tmp118_);
1360 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1361                                         _g_free0 (_tmp111_);
1362 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1363                                         _g_free0 (_tmp100_);
1364 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1365                                         _g_free0 (_tmp37_);
1366 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1367                                         _tmp31_ = (_vala_array_free (_tmp31_, _tmp31__length1, (GDestroyNotify) g_free), NULL);
1368 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1369                                         _g_free0 (_tmp26_);
1370 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1371                                         _g_free0 (_tmp21_);
1372 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1373                                         _g_free0 (_tmp16_);
1374 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1375                                         _g_object_unref0 (id_card);
1376 #line 1377 "moonshot-local-flat-file-store.c"
1377                                 }
1378                                 goto __finally6;
1379                                 __catch6_g_error:
1380                                 {
1381                                         GError* e = NULL;
1382                                         FILE* _tmp134_ = NULL;
1383                                         GError* _tmp135_ = NULL;
1384                                         const gchar* _tmp136_ = NULL;
1385 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1386                                         e = _inner_error_;
1387 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1388                                         _inner_error_ = NULL;
1389 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1390                                         _tmp134_ = stdout;
1391 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1392                                         _tmp135_ = e;
1393 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1394                                         _tmp136_ = _tmp135_->message;
1395 #line 122 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1396                                         fprintf (_tmp134_, "Error:  %s\n", _tmp136_);
1397 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1398                                         _g_error_free0 (e);
1399 #line 1400 "moonshot-local-flat-file-store.c"
1400                                 }
1401                                 __finally6:
1402 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1403                                 if (G_UNLIKELY (_inner_error_ != NULL)) {
1404 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1405                                         _g_free0 (identity);
1406 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1407                                         identities_uris = (_vala_array_free (identities_uris, identities_uris_length1, (GDestroyNotify) g_free), NULL);
1408 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1409                                         _g_free0 (filename);
1410 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1411                                         _g_free0 (path);
1412 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1413                                         _g_key_file_free0 (key_file);
1414 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1415                                         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);
1416 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1417                                         g_clear_error (&_inner_error_);
1418 #line 85 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1419                                         return;
1420 #line 1421 "moonshot-local-flat-file-store.c"
1421                                 }
1422 #line 84 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1423                                 _g_free0 (identity);
1424 #line 1425 "moonshot-local-flat-file-store.c"
1425                         }
1426                 }
1427         }
1428 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1429         identities_uris = (_vala_array_free (identities_uris, identities_uris_length1, (GDestroyNotify) g_free), NULL);
1430 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1431         _g_free0 (filename);
1432 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1433         _g_free0 (path);
1434 #line 69 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1435         _g_key_file_free0 (key_file);
1436 #line 1437 "moonshot-local-flat-file-store.c"
1437 }
1438
1439
1440 static gchar* local_flat_file_store_get_data_dir (LocalFlatFileStore* self) {
1441         gchar* result = NULL;
1442         gchar* path = NULL;
1443         const gchar* _tmp0_ = NULL;
1444         gchar* _tmp1_ = NULL;
1445         const gchar* _tmp2_ = NULL;
1446         gboolean _tmp3_ = FALSE;
1447 #line 127 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1448         g_return_val_if_fail (self != NULL, NULL);
1449 #line 129 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1450         _tmp0_ = g_get_user_data_dir ();
1451 #line 129 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1452         _tmp1_ = g_build_filename (_tmp0_, PACKAGE_TARNAME, NULL);
1453 #line 129 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1454         _g_free0 (path);
1455 #line 129 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1456         path = _tmp1_;
1457 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1458         _tmp2_ = path;
1459 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1460         _tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_EXISTS);
1461 #line 132 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1462         if (!_tmp3_) {
1463 #line 1464 "moonshot-local-flat-file-store.c"
1464                 const gchar* _tmp4_ = NULL;
1465 #line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1466                 _tmp4_ = path;
1467 #line 133 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1468                 g_mkdir_with_parents (_tmp4_, 0700);
1469 #line 1470 "moonshot-local-flat-file-store.c"
1470         }
1471 #line 135 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1472         result = path;
1473 #line 135 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1474         return result;
1475 #line 1476 "moonshot-local-flat-file-store.c"
1476 }
1477
1478
1479 static Rule* _vala_array_dup1 (Rule* self, int length) {
1480         Rule* result;
1481         int i;
1482 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1483         result = g_new0 (Rule, length);
1484 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1485         for (i = 0; i < length; i++) {
1486 #line 1487 "moonshot-local-flat-file-store.c"
1487                 Rule _tmp0_ = {0};
1488 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1489                 rule_copy (&self[i], &_tmp0_);
1490 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1491                 result[i] = _tmp0_;
1492 #line 1493 "moonshot-local-flat-file-store.c"
1493         }
1494 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1495         return result;
1496 #line 1497 "moonshot-local-flat-file-store.c"
1497 }
1498
1499
1500 static gchar** _vala_array_dup2 (gchar** self, int length) {
1501         gchar** result;
1502         int i;
1503 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1504         result = g_new0 (gchar*, length + 1);
1505 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1506         for (i = 0; i < length; i++) {
1507 #line 1508 "moonshot-local-flat-file-store.c"
1508                 gchar* _tmp0_ = NULL;
1509 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1510                 _tmp0_ = g_strdup (self[i]);
1511 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1512                 result[i] = _tmp0_;
1513 #line 1514 "moonshot-local-flat-file-store.c"
1514         }
1515 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1516         return result;
1517 #line 1518 "moonshot-local-flat-file-store.c"
1518 }
1519
1520
1521 static guint8* string_get_data (const gchar* self, int* result_length1) {
1522         guint8* result;
1523         guint8* res = NULL;
1524         gint res_length1 = 0;
1525         gint _res_size_ = 0;
1526         gint _tmp0_ = 0;
1527         gint _tmp1_ = 0;
1528         gint _tmp2_ = 0;
1529         guint8* _tmp3_ = NULL;
1530         gint _tmp3__length1 = 0;
1531         guint8* _tmp4_ = NULL;
1532         gint _tmp4__length1 = 0;
1533 #line 1300 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1534         g_return_val_if_fail (self != NULL, NULL);
1535 #line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1536         res = (guint8*) self;
1537 #line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1538         res_length1 = -1;
1539 #line 1301 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1540         _res_size_ = res_length1;
1541 #line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1542         _tmp0_ = strlen (self);
1543 #line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1544         _tmp1_ = _tmp0_;
1545 #line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1546         res_length1 = (gint) _tmp1_;
1547 #line 1302 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1548         _tmp2_ = res_length1;
1549 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1550         _tmp3_ = res;
1551 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1552         _tmp3__length1 = res_length1;
1553 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1554         _tmp4_ = _tmp3_;
1555 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1556         _tmp4__length1 = _tmp3__length1;
1557 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1558         if (result_length1) {
1559 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1560                 *result_length1 = _tmp4__length1;
1561 #line 1562 "moonshot-local-flat-file-store.c"
1562         }
1563 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1564         result = _tmp4_;
1565 #line 1303 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
1566         return result;
1567 #line 1568 "moonshot-local-flat-file-store.c"
1568 }
1569
1570
1571 void local_flat_file_store_store_id_cards (LocalFlatFileStore* self) {
1572         GKeyFile* key_file = NULL;
1573         GKeyFile* _tmp0_ = NULL;
1574         gchar* text = NULL;
1575         GKeyFile* _tmp153_ = NULL;
1576         gchar* _tmp154_ = NULL;
1577         GError * _inner_error_ = NULL;
1578 #line 138 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1579         g_return_if_fail (self != NULL);
1580 #line 139 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1581         _tmp0_ = g_key_file_new ();
1582 #line 139 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1583         key_file = _tmp0_;
1584 #line 1585 "moonshot-local-flat-file-store.c"
1585         {
1586                 GeeLinkedList* _id_card_list = NULL;
1587                 GeeLinkedList* _tmp1_ = NULL;
1588                 GeeLinkedList* _tmp2_ = NULL;
1589                 gint _id_card_size = 0;
1590                 GeeLinkedList* _tmp3_ = NULL;
1591                 gint _tmp4_ = 0;
1592                 gint _tmp5_ = 0;
1593                 gint _id_card_index = 0;
1594 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1595                 _tmp1_ = self->priv->id_card_list;
1596 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1597                 _tmp2_ = _g_object_ref0 (_tmp1_);
1598 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1599                 _id_card_list = _tmp2_;
1600 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1601                 _tmp3_ = _id_card_list;
1602 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1603                 _tmp4_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp3_);
1604 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1605                 _tmp5_ = _tmp4_;
1606 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1607                 _id_card_size = _tmp5_;
1608 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1609                 _id_card_index = -1;
1610 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1611                 while (TRUE) {
1612 #line 1613 "moonshot-local-flat-file-store.c"
1613                         gint _tmp6_ = 0;
1614                         gint _tmp7_ = 0;
1615                         gint _tmp8_ = 0;
1616                         IdCard* id_card = NULL;
1617                         GeeLinkedList* _tmp9_ = NULL;
1618                         gint _tmp10_ = 0;
1619                         gpointer _tmp11_ = NULL;
1620                         Rule* rules = NULL;
1621                         IdCard* _tmp12_ = NULL;
1622                         Rule* _tmp13_ = NULL;
1623                         gint _tmp13__length1 = 0;
1624                         Rule* _tmp14_ = NULL;
1625                         gint _tmp14__length1 = 0;
1626                         Rule* _tmp15_ = NULL;
1627                         gint _tmp15__length1 = 0;
1628                         gint rules_length1 = 0;
1629                         gint _rules_size_ = 0;
1630                         gchar** services = NULL;
1631                         IdCard* _tmp16_ = NULL;
1632                         gchar** _tmp17_ = NULL;
1633                         gint _tmp17__length1 = 0;
1634                         gchar** _tmp18_ = NULL;
1635                         gint _tmp18__length1 = 0;
1636                         gchar** _tmp19_ = NULL;
1637                         gint _tmp19__length1 = 0;
1638                         gint services_length1 = 0;
1639                         gint _services_size_ = 0;
1640                         gchar** empty = NULL;
1641                         gchar** _tmp20_ = NULL;
1642                         gint empty_length1 = 0;
1643                         gint _empty_size_ = 0;
1644                         gchar** rules_patterns = NULL;
1645                         Rule* _tmp21_ = NULL;
1646                         gint _tmp21__length1 = 0;
1647                         gchar** _tmp22_ = NULL;
1648                         gint rules_patterns_length1 = 0;
1649                         gint _rules_patterns_size_ = 0;
1650                         gchar** rules_always_conf = NULL;
1651                         Rule* _tmp23_ = NULL;
1652                         gint _tmp23__length1 = 0;
1653                         gchar** _tmp24_ = NULL;
1654                         gint rules_always_conf_length1 = 0;
1655                         gint _rules_always_conf_size_ = 0;
1656                         const gchar* _tmp45_ = NULL;
1657                         IdCard* _tmp46_ = NULL;
1658                         const gchar* _tmp47_ = NULL;
1659                         const gchar* _tmp48_ = NULL;
1660                         GKeyFile* _tmp49_ = NULL;
1661                         IdCard* _tmp50_ = NULL;
1662                         const gchar* _tmp51_ = NULL;
1663                         const gchar* _tmp52_ = NULL;
1664                         const gchar* _tmp53_ = NULL;
1665                         IdCard* _tmp54_ = NULL;
1666                         const gchar* _tmp55_ = NULL;
1667                         const gchar* _tmp56_ = NULL;
1668                         GKeyFile* _tmp57_ = NULL;
1669                         IdCard* _tmp58_ = NULL;
1670                         const gchar* _tmp59_ = NULL;
1671                         const gchar* _tmp60_ = NULL;
1672                         const gchar* _tmp61_ = NULL;
1673                         IdCard* _tmp62_ = NULL;
1674                         const gchar* _tmp63_ = NULL;
1675                         const gchar* _tmp64_ = NULL;
1676                         GKeyFile* _tmp65_ = NULL;
1677                         IdCard* _tmp66_ = NULL;
1678                         const gchar* _tmp67_ = NULL;
1679                         const gchar* _tmp68_ = NULL;
1680                         gboolean _tmp69_ = FALSE;
1681                         IdCard* _tmp70_ = NULL;
1682                         gboolean _tmp71_ = FALSE;
1683                         gboolean _tmp72_ = FALSE;
1684                         gchar** _tmp87_ = NULL;
1685                         gchar** _tmp88_ = NULL;
1686                         gint _tmp88__length1 = 0;
1687                         gint _tmp87__length1 = 0;
1688                         gint __tmp87__size_ = 0;
1689                         GKeyFile* _tmp90_ = NULL;
1690                         IdCard* _tmp91_ = NULL;
1691                         const gchar* _tmp92_ = NULL;
1692                         const gchar* _tmp93_ = NULL;
1693                         Rule* _tmp94_ = NULL;
1694                         gint _tmp94__length1 = 0;
1695                         const gchar* _tmp105_ = NULL;
1696                         IdCard* _tmp106_ = NULL;
1697                         gboolean _tmp107_ = FALSE;
1698                         gboolean _tmp108_ = FALSE;
1699                         GKeyFile* _tmp109_ = NULL;
1700                         IdCard* _tmp110_ = NULL;
1701                         const gchar* _tmp111_ = NULL;
1702                         const gchar* _tmp112_ = NULL;
1703                         const gchar* _tmp113_ = NULL;
1704                         IdCard* _tmp114_ = NULL;
1705                         TrustAnchor* _tmp115_ = NULL;
1706                         TrustAnchor* _tmp116_ = NULL;
1707                         const gchar* _tmp117_ = NULL;
1708                         const gchar* _tmp118_ = NULL;
1709                         GKeyFile* _tmp119_ = NULL;
1710                         IdCard* _tmp120_ = NULL;
1711                         const gchar* _tmp121_ = NULL;
1712                         const gchar* _tmp122_ = NULL;
1713                         const gchar* _tmp123_ = NULL;
1714                         IdCard* _tmp124_ = NULL;
1715                         TrustAnchor* _tmp125_ = NULL;
1716                         TrustAnchor* _tmp126_ = NULL;
1717                         const gchar* _tmp127_ = NULL;
1718                         const gchar* _tmp128_ = NULL;
1719                         GKeyFile* _tmp129_ = NULL;
1720                         IdCard* _tmp130_ = NULL;
1721                         const gchar* _tmp131_ = NULL;
1722                         const gchar* _tmp132_ = NULL;
1723                         const gchar* _tmp133_ = NULL;
1724                         IdCard* _tmp134_ = NULL;
1725                         TrustAnchor* _tmp135_ = NULL;
1726                         TrustAnchor* _tmp136_ = NULL;
1727                         const gchar* _tmp137_ = NULL;
1728                         const gchar* _tmp138_ = NULL;
1729                         GKeyFile* _tmp139_ = NULL;
1730                         IdCard* _tmp140_ = NULL;
1731                         const gchar* _tmp141_ = NULL;
1732                         const gchar* _tmp142_ = NULL;
1733                         const gchar* _tmp143_ = NULL;
1734                         IdCard* _tmp144_ = NULL;
1735                         TrustAnchor* _tmp145_ = NULL;
1736                         TrustAnchor* _tmp146_ = NULL;
1737                         const gchar* _tmp147_ = NULL;
1738                         const gchar* _tmp148_ = NULL;
1739                         GKeyFile* _tmp149_ = NULL;
1740                         IdCard* _tmp150_ = NULL;
1741                         const gchar* _tmp151_ = NULL;
1742                         const gchar* _tmp152_ = NULL;
1743 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1744                         _tmp6_ = _id_card_index;
1745 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1746                         _id_card_index = _tmp6_ + 1;
1747 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1748                         _tmp7_ = _id_card_index;
1749 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1750                         _tmp8_ = _id_card_size;
1751 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1752                         if (!(_tmp7_ < _tmp8_)) {
1753 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1754                                 break;
1755 #line 1756 "moonshot-local-flat-file-store.c"
1756                         }
1757 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1758                         _tmp9_ = _id_card_list;
1759 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1760                         _tmp10_ = _id_card_index;
1761 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1762                         _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _tmp10_);
1763 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1764                         id_card = (IdCard*) _tmp11_;
1765 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1766                         _tmp12_ = id_card;
1767 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1768                         _tmp13_ = id_card_get_rules (_tmp12_, &_tmp13__length1);
1769 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1770                         _tmp14_ = _tmp13_;
1771 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1772                         _tmp14__length1 = _tmp13__length1;
1773 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1774                         _tmp15_ = (_tmp14_ != NULL) ? _vala_array_dup1 (_tmp14_, _tmp14__length1) : ((gpointer) _tmp14_);
1775 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1776                         _tmp15__length1 = _tmp14__length1;
1777 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1778                         rules = _tmp15_;
1779 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1780                         rules_length1 = _tmp15__length1;
1781 #line 142 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1782                         _rules_size_ = rules_length1;
1783 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1784                         _tmp16_ = id_card;
1785 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1786                         _tmp17_ = id_card_get_services (_tmp16_, &_tmp17__length1);
1787 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1788                         _tmp18_ = _tmp17_;
1789 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1790                         _tmp18__length1 = _tmp17__length1;
1791 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1792                         _tmp19_ = (_tmp18_ != NULL) ? _vala_array_dup2 (_tmp18_, _tmp18__length1) : ((gpointer) _tmp18_);
1793 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1794                         _tmp19__length1 = _tmp18__length1;
1795 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1796                         services = _tmp19_;
1797 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1798                         services_length1 = _tmp19__length1;
1799 #line 143 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1800                         _services_size_ = services_length1;
1801 #line 144 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1802                         _tmp20_ = g_new0 (gchar*, 0 + 1);
1803 #line 144 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1804                         empty = _tmp20_;
1805 #line 144 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1806                         empty_length1 = 0;
1807 #line 144 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1808                         _empty_size_ = empty_length1;
1809 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1810                         _tmp21_ = rules;
1811 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1812                         _tmp21__length1 = rules_length1;
1813 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1814                         _tmp22_ = g_new0 (gchar*, _tmp21__length1 + 1);
1815 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1816                         rules_patterns = _tmp22_;
1817 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1818                         rules_patterns_length1 = _tmp21__length1;
1819 #line 145 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1820                         _rules_patterns_size_ = rules_patterns_length1;
1821 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1822                         _tmp23_ = rules;
1823 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1824                         _tmp23__length1 = rules_length1;
1825 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1826                         _tmp24_ = g_new0 (gchar*, _tmp23__length1 + 1);
1827 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1828                         rules_always_conf = _tmp24_;
1829 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1830                         rules_always_conf_length1 = _tmp23__length1;
1831 #line 146 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1832                         _rules_always_conf_size_ = rules_always_conf_length1;
1833 #line 1834 "moonshot-local-flat-file-store.c"
1834                         {
1835                                 gint i = 0;
1836 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1837                                 i = 0;
1838 #line 1839 "moonshot-local-flat-file-store.c"
1839                                 {
1840                                         gboolean _tmp25_ = FALSE;
1841 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1842                                         _tmp25_ = TRUE;
1843 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1844                                         while (TRUE) {
1845 #line 1846 "moonshot-local-flat-file-store.c"
1846                                                 gint _tmp27_ = 0;
1847                                                 Rule* _tmp28_ = NULL;
1848                                                 gint _tmp28__length1 = 0;
1849                                                 gchar** _tmp29_ = NULL;
1850                                                 gint _tmp29__length1 = 0;
1851                                                 gint _tmp30_ = 0;
1852                                                 Rule* _tmp31_ = NULL;
1853                                                 gint _tmp31__length1 = 0;
1854                                                 gint _tmp32_ = 0;
1855                                                 Rule _tmp33_ = {0};
1856                                                 const gchar* _tmp34_ = NULL;
1857                                                 gchar* _tmp35_ = NULL;
1858                                                 gchar* _tmp36_ = NULL;
1859                                                 gchar** _tmp37_ = NULL;
1860                                                 gint _tmp37__length1 = 0;
1861                                                 gint _tmp38_ = 0;
1862                                                 Rule* _tmp39_ = NULL;
1863                                                 gint _tmp39__length1 = 0;
1864                                                 gint _tmp40_ = 0;
1865                                                 Rule _tmp41_ = {0};
1866                                                 const gchar* _tmp42_ = NULL;
1867                                                 gchar* _tmp43_ = NULL;
1868                                                 gchar* _tmp44_ = NULL;
1869 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1870                                                 if (!_tmp25_) {
1871 #line 1872 "moonshot-local-flat-file-store.c"
1872                                                         gint _tmp26_ = 0;
1873 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1874                                                         _tmp26_ = i;
1875 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1876                                                         i = _tmp26_ + 1;
1877 #line 1878 "moonshot-local-flat-file-store.c"
1878                                                 }
1879 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1880                                                 _tmp25_ = FALSE;
1881 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1882                                                 _tmp27_ = i;
1883 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1884                                                 _tmp28_ = rules;
1885 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1886                                                 _tmp28__length1 = rules_length1;
1887 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1888                                                 if (!(_tmp27_ < _tmp28__length1)) {
1889 #line 148 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1890                                                         break;
1891 #line 1892 "moonshot-local-flat-file-store.c"
1892                                                 }
1893 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1894                                                 _tmp29_ = rules_patterns;
1895 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1896                                                 _tmp29__length1 = rules_patterns_length1;
1897 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1898                                                 _tmp30_ = i;
1899 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1900                                                 _tmp31_ = rules;
1901 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1902                                                 _tmp31__length1 = rules_length1;
1903 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1904                                                 _tmp32_ = i;
1905 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1906                                                 _tmp33_ = _tmp31_[_tmp32_];
1907 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1908                                                 _tmp34_ = _tmp33_.pattern;
1909 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1910                                                 _tmp35_ = g_strdup (_tmp34_);
1911 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1912                                                 _g_free0 (_tmp29_[_tmp30_]);
1913 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1914                                                 _tmp29_[_tmp30_] = _tmp35_;
1915 #line 149 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1916                                                 _tmp36_ = _tmp29_[_tmp30_];
1917 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1918                                                 _tmp37_ = rules_always_conf;
1919 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1920                                                 _tmp37__length1 = rules_always_conf_length1;
1921 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1922                                                 _tmp38_ = i;
1923 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1924                                                 _tmp39_ = rules;
1925 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1926                                                 _tmp39__length1 = rules_length1;
1927 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1928                                                 _tmp40_ = i;
1929 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1930                                                 _tmp41_ = _tmp39_[_tmp40_];
1931 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1932                                                 _tmp42_ = _tmp41_.always_confirm;
1933 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1934                                                 _tmp43_ = g_strdup (_tmp42_);
1935 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1936                                                 _g_free0 (_tmp37_[_tmp38_]);
1937 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1938                                                 _tmp37_[_tmp38_] = _tmp43_;
1939 #line 150 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1940                                                 _tmp44_ = _tmp37_[_tmp38_];
1941 #line 1942 "moonshot-local-flat-file-store.c"
1942                                         }
1943                                 }
1944                         }
1945 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1946                         _tmp46_ = id_card;
1947 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1948                         _tmp47_ = id_card_get_issuer (_tmp46_);
1949 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1950                         _tmp48_ = _tmp47_;
1951 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1952                         _tmp45_ = _tmp48_;
1953 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1954                         if (_tmp45_ == NULL) {
1955 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1956                                 _tmp45_ = "";
1957 #line 1958 "moonshot-local-flat-file-store.c"
1958                         }
1959 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1960                         _tmp49_ = key_file;
1961 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1962                         _tmp50_ = id_card;
1963 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1964                         _tmp51_ = id_card_get_display_name (_tmp50_);
1965 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1966                         _tmp52_ = _tmp51_;
1967 #line 153 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1968                         g_key_file_set_string (_tmp49_, _tmp52_, "Issuer", _tmp45_);
1969 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1970                         _tmp54_ = id_card;
1971 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1972                         _tmp55_ = id_card_get_display_name (_tmp54_);
1973 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1974                         _tmp56_ = _tmp55_;
1975 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1976                         _tmp53_ = _tmp56_;
1977 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1978                         if (_tmp53_ == NULL) {
1979 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1980                                 _tmp53_ = "";
1981 #line 1982 "moonshot-local-flat-file-store.c"
1982                         }
1983 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1984                         _tmp57_ = key_file;
1985 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1986                         _tmp58_ = id_card;
1987 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1988                         _tmp59_ = id_card_get_display_name (_tmp58_);
1989 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1990                         _tmp60_ = _tmp59_;
1991 #line 154 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1992                         g_key_file_set_string (_tmp57_, _tmp60_, "DisplayName", _tmp53_);
1993 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1994                         _tmp62_ = id_card;
1995 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1996                         _tmp63_ = id_card_get_username (_tmp62_);
1997 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
1998                         _tmp64_ = _tmp63_;
1999 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2000                         _tmp61_ = _tmp64_;
2001 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2002                         if (_tmp61_ == NULL) {
2003 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2004                                 _tmp61_ = "";
2005 #line 2006 "moonshot-local-flat-file-store.c"
2006                         }
2007 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2008                         _tmp65_ = key_file;
2009 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2010                         _tmp66_ = id_card;
2011 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2012                         _tmp67_ = id_card_get_display_name (_tmp66_);
2013 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2014                         _tmp68_ = _tmp67_;
2015 #line 155 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2016                         g_key_file_set_string (_tmp65_, _tmp68_, "Username", _tmp61_);
2017 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2018                         _tmp70_ = id_card;
2019 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2020                         _tmp71_ = id_card_get_store_password (_tmp70_);
2021 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2022                         _tmp72_ = _tmp71_;
2023 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2024                         if (_tmp72_) {
2025 #line 2026 "moonshot-local-flat-file-store.c"
2026                                 IdCard* _tmp73_ = NULL;
2027                                 const gchar* _tmp74_ = NULL;
2028                                 const gchar* _tmp75_ = NULL;
2029 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2030                                 _tmp73_ = id_card;
2031 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2032                                 _tmp74_ = id_card_get_password (_tmp73_);
2033 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2034                                 _tmp75_ = _tmp74_;
2035 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2036                                 _tmp69_ = _tmp75_ != NULL;
2037 #line 2038 "moonshot-local-flat-file-store.c"
2038                         } else {
2039 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2040                                 _tmp69_ = FALSE;
2041 #line 2042 "moonshot-local-flat-file-store.c"
2042                         }
2043 #line 156 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2044                         if (_tmp69_) {
2045 #line 2046 "moonshot-local-flat-file-store.c"
2046                                 GKeyFile* _tmp76_ = NULL;
2047                                 IdCard* _tmp77_ = NULL;
2048                                 const gchar* _tmp78_ = NULL;
2049                                 const gchar* _tmp79_ = NULL;
2050                                 IdCard* _tmp80_ = NULL;
2051                                 const gchar* _tmp81_ = NULL;
2052                                 const gchar* _tmp82_ = NULL;
2053 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2054                                 _tmp76_ = key_file;
2055 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2056                                 _tmp77_ = id_card;
2057 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2058                                 _tmp78_ = id_card_get_display_name (_tmp77_);
2059 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2060                                 _tmp79_ = _tmp78_;
2061 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2062                                 _tmp80_ = id_card;
2063 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2064                                 _tmp81_ = id_card_get_password (_tmp80_);
2065 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2066                                 _tmp82_ = _tmp81_;
2067 #line 157 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2068                                 g_key_file_set_string (_tmp76_, _tmp79_, "Password", _tmp82_);
2069 #line 2070 "moonshot-local-flat-file-store.c"
2070                         } else {
2071                                 GKeyFile* _tmp83_ = NULL;
2072                                 IdCard* _tmp84_ = NULL;
2073                                 const gchar* _tmp85_ = NULL;
2074                                 const gchar* _tmp86_ = NULL;
2075 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2076                                 _tmp83_ = key_file;
2077 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2078                                 _tmp84_ = id_card;
2079 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2080                                 _tmp85_ = id_card_get_display_name (_tmp84_);
2081 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2082                                 _tmp86_ = _tmp85_;
2083 #line 159 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2084                                 g_key_file_set_string (_tmp83_, _tmp86_, "Password", "");
2085 #line 2086 "moonshot-local-flat-file-store.c"
2086                         }
2087 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2088                         _tmp88_ = services;
2089 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2090                         _tmp88__length1 = services_length1;
2091 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2092                         _tmp87_ = _tmp88_;
2093 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2094                         _tmp87__length1 = _tmp88__length1;
2095 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2096                         __tmp87__size_ = _tmp87__length1;
2097 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2098                         if (_tmp87_ == NULL) {
2099 #line 2100 "moonshot-local-flat-file-store.c"
2100                                 gchar** _tmp89_ = NULL;
2101                                 gint _tmp89__length1 = 0;
2102 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2103                                 _tmp89_ = empty;
2104 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2105                                 _tmp89__length1 = empty_length1;
2106 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2107                                 _tmp87_ = _tmp89_;
2108 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2109                                 _tmp87__length1 = _tmp89__length1;
2110 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2111                                 __tmp87__size_ = _tmp87__length1;
2112 #line 2113 "moonshot-local-flat-file-store.c"
2113                         }
2114 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2115                         _tmp90_ = key_file;
2116 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2117                         _tmp91_ = id_card;
2118 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2119                         _tmp92_ = id_card_get_display_name (_tmp91_);
2120 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2121                         _tmp93_ = _tmp92_;
2122 #line 160 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2123                         g_key_file_set_string_list (_tmp90_, _tmp93_, "Services", (const gchar* const*) _tmp87_, _tmp87__length1);
2124 #line 162 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2125                         _tmp94_ = rules;
2126 #line 162 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2127                         _tmp94__length1 = rules_length1;
2128 #line 162 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2129                         if (_tmp94__length1 > 0) {
2130 #line 2131 "moonshot-local-flat-file-store.c"
2131                                 GKeyFile* _tmp95_ = NULL;
2132                                 IdCard* _tmp96_ = NULL;
2133                                 const gchar* _tmp97_ = NULL;
2134                                 const gchar* _tmp98_ = NULL;
2135                                 gchar** _tmp99_ = NULL;
2136                                 gint _tmp99__length1 = 0;
2137                                 GKeyFile* _tmp100_ = NULL;
2138                                 IdCard* _tmp101_ = NULL;
2139                                 const gchar* _tmp102_ = NULL;
2140                                 const gchar* _tmp103_ = NULL;
2141                                 gchar** _tmp104_ = NULL;
2142                                 gint _tmp104__length1 = 0;
2143 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2144                                 _tmp95_ = key_file;
2145 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2146                                 _tmp96_ = id_card;
2147 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2148                                 _tmp97_ = id_card_get_display_name (_tmp96_);
2149 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2150                                 _tmp98_ = _tmp97_;
2151 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2152                                 _tmp99_ = rules_patterns;
2153 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2154                                 _tmp99__length1 = rules_patterns_length1;
2155 #line 163 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2156                                 g_key_file_set_string_list (_tmp95_, _tmp98_, "Rules-Patterns", (const gchar* const*) _tmp99_, _tmp99__length1);
2157 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2158                                 _tmp100_ = key_file;
2159 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2160                                 _tmp101_ = id_card;
2161 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2162                                 _tmp102_ = id_card_get_display_name (_tmp101_);
2163 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2164                                 _tmp103_ = _tmp102_;
2165 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2166                                 _tmp104_ = rules_always_conf;
2167 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2168                                 _tmp104__length1 = rules_always_conf_length1;
2169 #line 164 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2170                                 g_key_file_set_string_list (_tmp100_, _tmp103_, "Rules-AlwaysConfirm", (const gchar* const*) _tmp104_, _tmp104__length1);
2171 #line 2172 "moonshot-local-flat-file-store.c"
2172                         }
2173 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2174                         _tmp106_ = id_card;
2175 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2176                         _tmp107_ = id_card_get_store_password (_tmp106_);
2177 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2178                         _tmp108_ = _tmp107_;
2179 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2180                         if (_tmp108_) {
2181 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2182                                 _tmp105_ = "yes";
2183 #line 2184 "moonshot-local-flat-file-store.c"
2184                         } else {
2185 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2186                                 _tmp105_ = "no";
2187 #line 2188 "moonshot-local-flat-file-store.c"
2188                         }
2189 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2190                         _tmp109_ = key_file;
2191 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2192                         _tmp110_ = id_card;
2193 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2194                         _tmp111_ = id_card_get_display_name (_tmp110_);
2195 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2196                         _tmp112_ = _tmp111_;
2197 #line 166 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2198                         g_key_file_set_string (_tmp109_, _tmp112_, "StorePassword", _tmp105_);
2199 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2200                         _tmp114_ = id_card;
2201 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2202                         _tmp115_ = id_card_get_trust_anchor (_tmp114_);
2203 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2204                         _tmp116_ = _tmp115_;
2205 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2206                         _tmp117_ = trust_anchor_get_ca_cert (_tmp116_);
2207 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2208                         _tmp118_ = _tmp117_;
2209 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2210                         _tmp113_ = _tmp118_;
2211 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2212                         if (_tmp113_ == NULL) {
2213 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2214                                 _tmp113_ = "";
2215 #line 2216 "moonshot-local-flat-file-store.c"
2216                         }
2217 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2218                         _tmp119_ = key_file;
2219 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2220                         _tmp120_ = id_card;
2221 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2222                         _tmp121_ = id_card_get_display_name (_tmp120_);
2223 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2224                         _tmp122_ = _tmp121_;
2225 #line 169 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2226                         g_key_file_set_string (_tmp119_, _tmp122_, "CA-Cert", _tmp113_);
2227 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2228                         _tmp124_ = id_card;
2229 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2230                         _tmp125_ = id_card_get_trust_anchor (_tmp124_);
2231 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2232                         _tmp126_ = _tmp125_;
2233 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2234                         _tmp127_ = trust_anchor_get_subject (_tmp126_);
2235 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2236                         _tmp128_ = _tmp127_;
2237 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2238                         _tmp123_ = _tmp128_;
2239 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2240                         if (_tmp123_ == NULL) {
2241 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2242                                 _tmp123_ = "";
2243 #line 2244 "moonshot-local-flat-file-store.c"
2244                         }
2245 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2246                         _tmp129_ = key_file;
2247 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2248                         _tmp130_ = id_card;
2249 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2250                         _tmp131_ = id_card_get_display_name (_tmp130_);
2251 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2252                         _tmp132_ = _tmp131_;
2253 #line 170 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2254                         g_key_file_set_string (_tmp129_, _tmp132_, "Subject", _tmp123_);
2255 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2256                         _tmp134_ = id_card;
2257 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2258                         _tmp135_ = id_card_get_trust_anchor (_tmp134_);
2259 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2260                         _tmp136_ = _tmp135_;
2261 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2262                         _tmp137_ = trust_anchor_get_subject_alt (_tmp136_);
2263 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2264                         _tmp138_ = _tmp137_;
2265 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2266                         _tmp133_ = _tmp138_;
2267 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2268                         if (_tmp133_ == NULL) {
2269 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2270                                 _tmp133_ = "";
2271 #line 2272 "moonshot-local-flat-file-store.c"
2272                         }
2273 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2274                         _tmp139_ = key_file;
2275 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2276                         _tmp140_ = id_card;
2277 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2278                         _tmp141_ = id_card_get_display_name (_tmp140_);
2279 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2280                         _tmp142_ = _tmp141_;
2281 #line 171 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2282                         g_key_file_set_string (_tmp139_, _tmp142_, "SubjectAlt", _tmp133_);
2283 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2284                         _tmp144_ = id_card;
2285 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2286                         _tmp145_ = id_card_get_trust_anchor (_tmp144_);
2287 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2288                         _tmp146_ = _tmp145_;
2289 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2290                         _tmp147_ = trust_anchor_get_server_cert (_tmp146_);
2291 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2292                         _tmp148_ = _tmp147_;
2293 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2294                         _tmp143_ = _tmp148_;
2295 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2296                         if (_tmp143_ == NULL) {
2297 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2298                                 _tmp143_ = "";
2299 #line 2300 "moonshot-local-flat-file-store.c"
2300                         }
2301 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2302                         _tmp149_ = key_file;
2303 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2304                         _tmp150_ = id_card;
2305 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2306                         _tmp151_ = id_card_get_display_name (_tmp150_);
2307 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2308                         _tmp152_ = _tmp151_;
2309 #line 172 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2310                         g_key_file_set_string (_tmp149_, _tmp152_, "ServerCert", _tmp143_);
2311 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2312                         rules_always_conf = (_vala_array_free (rules_always_conf, rules_always_conf_length1, (GDestroyNotify) g_free), NULL);
2313 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2314                         rules_patterns = (_vala_array_free (rules_patterns, rules_patterns_length1, (GDestroyNotify) g_free), NULL);
2315 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2316                         empty = (_vala_array_free (empty, empty_length1, (GDestroyNotify) g_free), NULL);
2317 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2318                         services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
2319 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2320                         rules = (_vala_Rule_array_free (rules, rules_length1), NULL);
2321 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2322                         _g_object_unref0 (id_card);
2323 #line 2324 "moonshot-local-flat-file-store.c"
2324                 }
2325 #line 140 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2326                 _g_object_unref0 (_id_card_list);
2327 #line 2328 "moonshot-local-flat-file-store.c"
2328         }
2329 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2330         _tmp153_ = key_file;
2331 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2332         _tmp154_ = g_key_file_to_data (_tmp153_, NULL, NULL);
2333 #line 175 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2334         text = _tmp154_;
2335 #line 2336 "moonshot-local-flat-file-store.c"
2336         {
2337                 gchar* path = NULL;
2338                 gchar* _tmp155_ = NULL;
2339                 gchar* filename = NULL;
2340                 const gchar* _tmp156_ = NULL;
2341                 gchar* _tmp157_ = NULL;
2342                 GFile* file = NULL;
2343                 const gchar* _tmp158_ = NULL;
2344                 GFile* _tmp159_ = NULL;
2345                 GFileOutputStream* stream = NULL;
2346                 GFile* _tmp160_ = NULL;
2347                 GFileOutputStream* _tmp161_ = NULL;
2348                 GFileOutputStream* _tmp162_ = NULL;
2349                 const gchar* _tmp163_ = NULL;
2350                 guint8* _tmp164_ = NULL;
2351                 gint _tmp164__length1 = 0;
2352                 guint8* _tmp165_ = NULL;
2353                 gint _tmp165__length1 = 0;
2354 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2355                 _tmp155_ = local_flat_file_store_get_data_dir (self);
2356 #line 178 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2357                 path = _tmp155_;
2358 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2359                 _tmp156_ = path;
2360 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2361                 _tmp157_ = g_build_filename (_tmp156_, LOCAL_FLAT_FILE_STORE_FILE_NAME, NULL);
2362 #line 179 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2363                 filename = _tmp157_;
2364 #line 180 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2365                 _tmp158_ = filename;
2366 #line 180 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2367                 _tmp159_ = g_file_new_for_path (_tmp158_);
2368 #line 180 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2369                 file = _tmp159_;
2370 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2371                 _tmp160_ = file;
2372 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2373                 _tmp161_ = g_file_replace (_tmp160_, NULL, FALSE, G_FILE_CREATE_PRIVATE, NULL, &_inner_error_);
2374 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2375                 stream = _tmp161_;
2376 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2377                 if (G_UNLIKELY (_inner_error_ != NULL)) {
2378 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2379                         _g_object_unref0 (file);
2380 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2381                         _g_free0 (filename);
2382 #line 181 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2383                         _g_free0 (path);
2384 #line 2385 "moonshot-local-flat-file-store.c"
2385                         goto __catch7_g_error;
2386                 }
2387 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2388                 _tmp162_ = stream;
2389 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2390                 _tmp163_ = text;
2391 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2392                 _tmp164_ = string_get_data (_tmp163_, &_tmp164__length1);
2393 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2394                 _tmp165_ = _tmp164_;
2395 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2396                 _tmp165__length1 = _tmp164__length1;
2397 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2398                 g_output_stream_write ((GOutputStream*) _tmp162_, _tmp165_, (gsize) _tmp165__length1, NULL, &_inner_error_);
2399 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2400                 if (G_UNLIKELY (_inner_error_ != NULL)) {
2401 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2402                         _g_object_unref0 (stream);
2403 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2404                         _g_object_unref0 (file);
2405 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2406                         _g_free0 (filename);
2407 #line 183 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2408                         _g_free0 (path);
2409 #line 2410 "moonshot-local-flat-file-store.c"
2410                         goto __catch7_g_error;
2411                 }
2412 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2413                 _g_object_unref0 (stream);
2414 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2415                 _g_object_unref0 (file);
2416 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2417                 _g_free0 (filename);
2418 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2419                 _g_free0 (path);
2420 #line 2421 "moonshot-local-flat-file-store.c"
2421         }
2422         goto __finally7;
2423         __catch7_g_error:
2424         {
2425                 GError* e = NULL;
2426                 FILE* _tmp166_ = NULL;
2427                 GError* _tmp167_ = NULL;
2428                 const gchar* _tmp168_ = NULL;
2429 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2430                 e = _inner_error_;
2431 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2432                 _inner_error_ = NULL;
2433 #line 190 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2434                 _tmp166_ = stdout;
2435 #line 190 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2436                 _tmp167_ = e;
2437 #line 190 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2438                 _tmp168_ = _tmp167_->message;
2439 #line 190 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2440                 fprintf (_tmp166_, "Error:  %s\n", _tmp168_);
2441 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2442                 _g_error_free0 (e);
2443 #line 2444 "moonshot-local-flat-file-store.c"
2444         }
2445         __finally7:
2446 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2447         if (G_UNLIKELY (_inner_error_ != NULL)) {
2448 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2449                 _g_free0 (text);
2450 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2451                 _g_key_file_free0 (key_file);
2452 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2453                 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);
2454 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2455                 g_clear_error (&_inner_error_);
2456 #line 177 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2457                 return;
2458 #line 2459 "moonshot-local-flat-file-store.c"
2459         }
2460 #line 193 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2461         local_flat_file_store_load_id_cards (self);
2462 #line 138 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2463         _g_free0 (text);
2464 #line 138 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2465         _g_key_file_free0 (key_file);
2466 #line 2467 "moonshot-local-flat-file-store.c"
2467 }
2468
2469
2470 LocalFlatFileStore* local_flat_file_store_construct (GType object_type) {
2471         LocalFlatFileStore * self = NULL;
2472         GeeLinkedList* _tmp0_ = NULL;
2473 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2474         self = (LocalFlatFileStore*) g_object_new (object_type, NULL);
2475 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2476         _tmp0_ = gee_linked_list_new (TYPE_ID_CARD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
2477 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2478         _g_object_unref0 (self->priv->id_card_list);
2479 #line 197 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2480         self->priv->id_card_list = _tmp0_;
2481 #line 198 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2482         local_flat_file_store_load_id_cards (self);
2483 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2484         return self;
2485 #line 2486 "moonshot-local-flat-file-store.c"
2486 }
2487
2488
2489 LocalFlatFileStore* local_flat_file_store_new (void) {
2490 #line 196 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2491         return local_flat_file_store_construct (TYPE_LOCAL_FLAT_FILE_STORE);
2492 #line 2493 "moonshot-local-flat-file-store.c"
2493 }
2494
2495
2496 static void local_flat_file_store_class_init (LocalFlatFileStoreClass * klass) {
2497 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2498         local_flat_file_store_parent_class = g_type_class_peek_parent (klass);
2499 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2500         g_type_class_add_private (klass, sizeof (LocalFlatFileStorePrivate));
2501 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2502         G_OBJECT_CLASS (klass)->finalize = local_flat_file_store_finalize;
2503 #line 2504 "moonshot-local-flat-file-store.c"
2504 }
2505
2506
2507 static void local_flat_file_store_iidentity_card_store_interface_init (IIdentityCardStoreIface * iface) {
2508 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2509         local_flat_file_store_iidentity_card_store_parent_iface = g_type_interface_peek_parent (iface);
2510 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2511         iface->add_card = (void (*)(IIdentityCardStore*, IdCard*)) local_flat_file_store_real_add_card;
2512 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2513         iface->update_card = (IdCard* (*)(IIdentityCardStore*, IdCard*)) local_flat_file_store_real_update_card;
2514 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2515         iface->remove_card = (gboolean (*)(IIdentityCardStore*, IdCard*)) local_flat_file_store_real_remove_card;
2516 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2517         iface->get_card_list = (GeeLinkedList* (*)(IIdentityCardStore*)) local_flat_file_store_real_get_card_list;
2518 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2519         iface->get_store_type = (IIdentityCardStoreStoreType (*)(IIdentityCardStore*)) local_flat_file_store_real_get_store_type;
2520 #line 2521 "moonshot-local-flat-file-store.c"
2521 }
2522
2523
2524 static void local_flat_file_store_instance_init (LocalFlatFileStore * self) {
2525 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2526         self->priv = LOCAL_FLAT_FILE_STORE_GET_PRIVATE (self);
2527 #line 2528 "moonshot-local-flat-file-store.c"
2528 }
2529
2530
2531 static void local_flat_file_store_finalize (GObject* obj) {
2532         LocalFlatFileStore * self;
2533 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2534         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LOCAL_FLAT_FILE_STORE, LocalFlatFileStore);
2535 #line 35 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2536         _g_object_unref0 (self->priv->id_card_list);
2537 #line 34 "/home/hartmans/moonshot/moonshot/ui/src/moonshot-local-flat-file-store.vala"
2538         G_OBJECT_CLASS (local_flat_file_store_parent_class)->finalize (obj);
2539 #line 2540 "moonshot-local-flat-file-store.c"
2540 }
2541
2542
2543 GType local_flat_file_store_get_type (void) {
2544         static volatile gsize local_flat_file_store_type_id__volatile = 0;
2545         if (g_once_init_enter (&local_flat_file_store_type_id__volatile)) {
2546                 static const GTypeInfo g_define_type_info = { sizeof (LocalFlatFileStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) local_flat_file_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LocalFlatFileStore), 0, (GInstanceInitFunc) local_flat_file_store_instance_init, NULL };
2547                 static const GInterfaceInfo iidentity_card_store_info = { (GInterfaceInitFunc) local_flat_file_store_iidentity_card_store_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
2548                 GType local_flat_file_store_type_id;
2549                 local_flat_file_store_type_id = g_type_register_static (G_TYPE_OBJECT, "LocalFlatFileStore", &g_define_type_info, 0);
2550                 g_type_add_interface_static (local_flat_file_store_type_id, TYPE_IIDENTITY_CARD_STORE, &iidentity_card_store_info);
2551                 g_once_init_leave (&local_flat_file_store_type_id__volatile, local_flat_file_store_type_id);
2552         }
2553         return local_flat_file_store_type_id__volatile;
2554 }
2555
2556
2557 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2558         if ((array != NULL) && (destroy_func != NULL)) {
2559                 int i;
2560                 for (i = 0; i < array_length; i = i + 1) {
2561                         if (((gpointer*) array)[i] != NULL) {
2562                                 destroy_func (((gpointer*) array)[i]);
2563                         }
2564                 }
2565         }
2566 }
2567
2568
2569 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2570         _vala_array_destroy (array, array_length, destroy_func);
2571         g_free (array);
2572 }
2573
2574
2575