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