1 /* moonshot-identity-request.c generated by valac 0.16.1, the Vala compiler
2 * generated from moonshot-identity-request.vala, do not modify */
6 #include <glib-object.h>
11 #define TYPE_IDENTITY_REQUEST (identity_request_get_type ())
12 #define IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_REQUEST, IdentityRequest))
13 #define IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
14 #define IS_IDENTITY_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_REQUEST))
15 #define IS_IDENTITY_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_REQUEST))
16 #define IDENTITY_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_REQUEST, IdentityRequestClass))
18 typedef struct _IdentityRequest IdentityRequest;
19 typedef struct _IdentityRequestClass IdentityRequestClass;
20 typedef struct _IdentityRequestPrivate IdentityRequestPrivate;
22 #define TYPE_ID_CARD (id_card_get_type ())
23 #define ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ID_CARD, IdCard))
24 #define ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ID_CARD, IdCardClass))
25 #define IS_ID_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ID_CARD))
26 #define IS_ID_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ID_CARD))
27 #define ID_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ID_CARD, IdCardClass))
29 typedef struct _IdCard IdCard;
30 typedef struct _IdCardClass IdCardClass;
32 #define TYPE_IDENTITY_MANAGER_APP (identity_manager_app_get_type ())
33 #define IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerApp))
34 #define IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
35 #define IS_IDENTITY_MANAGER_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_APP))
36 #define IS_IDENTITY_MANAGER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_APP))
37 #define IDENTITY_MANAGER_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_APP, IdentityManagerAppClass))
39 typedef struct _IdentityManagerApp IdentityManagerApp;
40 typedef struct _IdentityManagerAppClass IdentityManagerAppClass;
41 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
42 #define _identity_manager_app_unref0(var) ((var == NULL) ? NULL : (var = (identity_manager_app_unref (var), NULL)))
43 #define _g_free0(var) (var = (g_free (var), NULL))
44 #define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
45 typedef struct _IdentityManagerAppPrivate IdentityManagerAppPrivate;
47 #define TYPE_IDENTITY_MANAGER_MODEL (identity_manager_model_get_type ())
48 #define IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModel))
49 #define IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
50 #define IS_IDENTITY_MANAGER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IDENTITY_MANAGER_MODEL))
51 #define IS_IDENTITY_MANAGER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IDENTITY_MANAGER_MODEL))
52 #define IDENTITY_MANAGER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IDENTITY_MANAGER_MODEL, IdentityManagerModelClass))
54 typedef struct _IdentityManagerModel IdentityManagerModel;
55 typedef struct _IdentityManagerModelClass IdentityManagerModelClass;
57 typedef void (*ReturnIdentityCallback) (IdentityRequest* request, void* user_data);
58 struct _IdentityRequest {
59 GObject parent_instance;
60 IdentityRequestPrivate * priv;
63 gboolean select_default;
70 struct _IdentityRequestClass {
71 GObjectClass parent_class;
74 struct _IdentityRequestPrivate {
75 IdentityManagerApp* parent_app;
76 ReturnIdentityCallback callback;
77 gpointer callback_target;
78 GDestroyNotify callback_target_destroy_notify;
81 struct _IdentityManagerApp {
82 GTypeInstance parent_instance;
83 volatile int ref_count;
84 IdentityManagerAppPrivate * priv;
85 IdentityManagerModel* model;
86 IdCard* default_id_card;
89 struct _IdentityManagerAppClass {
90 GTypeClass parent_class;
91 void (*finalize) (IdentityManagerApp *self);
95 static gpointer identity_request_parent_class = NULL;
97 GType identity_request_get_type (void) G_GNUC_CONST;
98 GType id_card_get_type (void) G_GNUC_CONST;
99 gpointer identity_manager_app_ref (gpointer instance);
100 void identity_manager_app_unref (gpointer instance);
101 GParamSpec* param_spec_identity_manager_app (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
102 void value_set_identity_manager_app (GValue* value, gpointer v_object);
103 void value_take_identity_manager_app (GValue* value, gpointer v_object);
104 gpointer value_get_identity_manager_app (const GValue* value);
105 GType identity_manager_app_get_type (void) G_GNUC_CONST;
106 #define IDENTITY_REQUEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IDENTITY_REQUEST, IdentityRequestPrivate))
108 IDENTITY_REQUEST_DUMMY_PROPERTY
110 static void _g_object_unref0_ (gpointer var);
111 static void _g_slist_free__g_object_unref0_ (GSList* self);
112 IdentityRequest* identity_request_new (IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service);
113 IdentityRequest* identity_request_construct (GType object_type, IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service);
114 IdentityRequest* identity_request_new_default (IdentityManagerApp* app);
115 IdentityRequest* identity_request_construct_default (GType object_type, IdentityManagerApp* app);
116 void identity_request_set_callback (IdentityRequest* self, ReturnIdentityCallback cb, void* cb_target, GDestroyNotify cb_target_destroy_notify);
117 gboolean identity_request_execute (IdentityRequest* self);
118 void identity_manager_app_select_identity (IdentityManagerApp* self, IdentityRequest* request);
119 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card);
120 gchar** id_card_get_services (IdCard* self, int* result_length1);
121 void id_card_set_services (IdCard* self, gchar** value, int value_length1);
122 GType identity_manager_model_get_type (void) G_GNUC_CONST;
123 void identity_manager_model_update_card (IdentityManagerModel* self, IdCard* card);
124 static void identity_request_finalize (GObject* obj);
125 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
126 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
129 static void _g_object_unref0_ (gpointer var) {
130 #line 12 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
131 (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
132 #line 133 "moonshot-identity-request.c"
136 static void _g_slist_free__g_object_unref0_ (GSList* self) {
137 #line 12 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
138 g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
139 #line 12 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
141 #line 142 "moonshot-identity-request.c"
145 static gpointer _identity_manager_app_ref0 (gpointer self) {
146 #line 21 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
147 return self ? identity_manager_app_ref (self) : NULL;
148 #line 149 "moonshot-identity-request.c"
152 IdentityRequest* identity_request_construct (GType object_type, IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service) {
153 IdentityRequest * self = NULL;
154 IdentityManagerApp* _tmp0_;
155 IdentityManagerApp* _tmp1_;
162 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
163 g_return_val_if_fail (app != NULL, NULL);
164 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
165 g_return_val_if_fail (nai != NULL, NULL);
166 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
167 g_return_val_if_fail (password != NULL, NULL);
168 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
169 g_return_val_if_fail (service != NULL, NULL);
170 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
171 self = (IdentityRequest*) g_object_new (object_type, NULL);
172 #line 21 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
174 #line 21 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
175 _tmp1_ = _identity_manager_app_ref0 (_tmp0_);
176 #line 21 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
177 _identity_manager_app_unref0 (self->priv->parent_app);
178 #line 21 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
179 self->priv->parent_app = _tmp1_;
180 #line 22 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
182 #line 22 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
183 _tmp3_ = g_strdup (_tmp2_);
184 #line 22 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
185 _g_free0 (self->nai);
186 #line 22 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
188 #line 23 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
190 #line 23 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
191 _tmp5_ = g_strdup (_tmp4_);
192 #line 23 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
193 _g_free0 (self->password);
194 #line 23 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
195 self->password = _tmp5_;
196 #line 24 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
198 #line 24 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
199 _tmp7_ = g_strdup (_tmp6_);
200 #line 24 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
201 _g_free0 (self->service);
202 #line 24 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
203 self->service = _tmp7_;
204 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
206 #line 207 "moonshot-identity-request.c"
210 IdentityRequest* identity_request_new (IdentityManagerApp* app, const gchar* nai, const gchar* password, const gchar* service) {
211 #line 16 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
212 return identity_request_construct (TYPE_IDENTITY_REQUEST, app, nai, password, service);
213 #line 214 "moonshot-identity-request.c"
217 IdentityRequest* identity_request_construct_default (GType object_type, IdentityManagerApp* app) {
218 IdentityRequest * self = NULL;
219 IdentityManagerApp* _tmp0_;
220 IdentityManagerApp* _tmp1_;
221 #line 27 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
222 g_return_val_if_fail (app != NULL, NULL);
223 #line 27 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
224 self = (IdentityRequest*) g_object_new (object_type, NULL);
225 #line 29 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
227 #line 29 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
228 _tmp1_ = _identity_manager_app_ref0 (_tmp0_);
229 #line 29 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
230 _identity_manager_app_unref0 (self->priv->parent_app);
231 #line 29 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
232 self->priv->parent_app = _tmp1_;
233 #line 30 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
234 self->select_default = TRUE;
235 #line 27 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
237 #line 238 "moonshot-identity-request.c"
241 IdentityRequest* identity_request_new_default (IdentityManagerApp* app) {
242 #line 27 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
243 return identity_request_construct_default (TYPE_IDENTITY_REQUEST, app);
244 #line 245 "moonshot-identity-request.c"
248 void identity_request_set_callback (IdentityRequest* self, ReturnIdentityCallback cb, void* cb_target, GDestroyNotify cb_target_destroy_notify) {
249 ReturnIdentityCallback _tmp0_;
251 GDestroyNotify _tmp0__target_destroy_notify;
252 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
253 g_return_if_fail (self != NULL);
254 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
256 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
257 _tmp0__target = cb_target;
258 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
259 _tmp0__target_destroy_notify = cb_target_destroy_notify;
260 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
261 cb_target_destroy_notify = NULL;
262 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
263 (self->priv->callback_target_destroy_notify == NULL) ? NULL : (self->priv->callback_target_destroy_notify (self->priv->callback_target), NULL);
264 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
265 self->priv->callback = NULL;
266 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
267 self->priv->callback_target = NULL;
268 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
269 self->priv->callback_target_destroy_notify = NULL;
270 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
271 self->priv->callback = _tmp0_;
272 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
273 self->priv->callback_target = _tmp0__target;
274 #line 36 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
275 self->priv->callback_target_destroy_notify = _tmp0__target_destroy_notify;
276 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
277 (cb_target_destroy_notify == NULL) ? NULL : (cb_target_destroy_notify (cb_target), NULL);
278 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
280 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
282 #line 33 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
283 cb_target_destroy_notify = NULL;
284 #line 285 "moonshot-identity-request.c"
288 gboolean identity_request_execute (IdentityRequest* self) {
289 gboolean result = FALSE;
290 IdentityManagerApp* _tmp0_;
291 #line 42 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
292 g_return_val_if_fail (self != NULL, FALSE);
293 #line 43 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
294 _tmp0_ = self->priv->parent_app;
295 #line 43 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
296 identity_manager_app_select_identity (_tmp0_, self);
297 #line 48 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
299 #line 48 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
301 #line 302 "moonshot-identity-request.c"
305 static gpointer _g_object_ref0 (gpointer self) {
306 #line 52 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
307 return self ? g_object_ref (self) : NULL;
308 #line 309 "moonshot-identity-request.c"
312 void identity_request_return_identity (IdentityRequest* self, IdCard* id_card) {
315 gboolean _tmp2_ = FALSE;
316 gboolean _tmp3_ = FALSE;
320 ReturnIdentityCallback _tmp48_;
321 void* _tmp48__target;
322 ReturnIdentityCallback _tmp49_;
323 void* _tmp49__target;
324 #line 51 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
325 g_return_if_fail (self != NULL);
326 #line 52 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
328 #line 52 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
329 _tmp1_ = _g_object_ref0 (_tmp0_);
330 #line 52 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
331 _g_object_unref0 (self->id_card);
332 #line 52 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
333 self->id_card = _tmp1_;
334 #line 53 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
335 self->complete = TRUE;
336 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
338 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
339 if (_tmp4_ != NULL) {
340 #line 341 "moonshot-identity-request.c"
342 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
343 _tmp5_ = self->service;
344 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
345 _tmp3_ = _tmp5_ != NULL;
346 #line 347 "moonshot-identity-request.c"
348 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
350 #line 351 "moonshot-identity-request.c"
352 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
354 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
356 #line 357 "moonshot-identity-request.c"
358 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
359 _tmp7_ = self->service;
360 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
361 _tmp2_ = g_strcmp0 (_tmp7_, "") != 0;
362 #line 363 "moonshot-identity-request.c"
364 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
366 #line 367 "moonshot-identity-request.c"
368 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
370 #line 56 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
372 #line 373 "moonshot-identity-request.c"
373 gboolean duplicate_service;
376 gint _tmp10__length1;
378 gint _tmp11__length1;
380 #line 58 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
381 duplicate_service = FALSE;
382 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
384 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
385 _tmp10_ = id_card_get_services (_tmp9_, &_tmp10__length1);
386 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
388 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
389 _tmp11__length1 = _tmp10__length1;
390 #line 391 "moonshot-identity-request.c"
392 gchar** service_collection = NULL;
393 gint service_collection_length1 = 0;
394 gint _service_collection_size_ = 0;
396 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
397 service_collection = _tmp11_;
398 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
399 service_collection_length1 = _tmp11__length1;
400 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
401 for (service_it = 0; service_it < _tmp11__length1; service_it = service_it + 1) {
402 #line 403 "moonshot-identity-request.c"
404 gchar* service = NULL;
405 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
406 _tmp12_ = g_strdup (service_collection[service_it]);
407 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
409 #line 410 "moonshot-identity-request.c"
411 const gchar* _tmp13_;
412 const gchar* _tmp14_;
413 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
415 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
416 _tmp14_ = self->service;
417 #line 62 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
418 if (g_strcmp0 (_tmp13_, _tmp14_) == 0) {
419 #line 63 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
420 duplicate_service = TRUE;
421 #line 422 "moonshot-identity-request.c"
423 #line 60 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
425 #line 426 "moonshot-identity-request.c"
429 #line 65 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
430 _tmp15_ = duplicate_service;
431 #line 65 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
432 if (_tmp15_ == FALSE) {
433 #line 434 "moonshot-identity-request.c"
436 gint _tmp17__length1;
438 gint _tmp18__length1;
439 gchar** _tmp19_ = NULL;
441 gint services_length1;
442 gint _services_size_;
444 gint _tmp36__length1;
447 gint _tmp38__length1;
449 gint _tmp39__length1;
450 const gchar* _tmp40_;
455 gint _tmp44__length1;
456 IdentityManagerApp* _tmp45_;
457 IdentityManagerModel* _tmp46_;
459 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
461 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
462 _tmp17_ = id_card_get_services (_tmp16_, &_tmp17__length1);
463 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
465 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
466 _tmp18__length1 = _tmp17__length1;
467 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
468 _tmp19_ = g_new0 (gchar*, (_tmp18__length1 + 1) + 1);
469 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
471 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
472 services_length1 = _tmp18__length1 + 1;
473 #line 67 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
474 _services_size_ = services_length1;
475 #line 476 "moonshot-identity-request.c"
478 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
480 #line 481 "moonshot-identity-request.c"
483 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
485 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
487 #line 488 "moonshot-identity-request.c"
492 gint _tmp25__length1;
494 gint _tmp26__length1;
496 gint _tmp27__length1;
500 gint _tmp30__length1;
502 gint _tmp31__length1;
504 const gchar* _tmp33_;
507 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
509 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
511 #line 512 "moonshot-identity-request.c"
513 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
515 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
517 #line 518 "moonshot-identity-request.c"
519 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
521 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
523 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
525 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
526 _tmp25_ = id_card_get_services (_tmp24_, &_tmp25__length1);
527 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
529 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
530 _tmp26__length1 = _tmp25__length1;
531 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
532 if (!(_tmp23_ < _tmp26__length1)) {
533 #line 69 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
535 #line 536 "moonshot-identity-request.c"
537 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
539 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
540 _tmp27__length1 = services_length1;
541 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
543 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
545 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
546 _tmp30_ = id_card_get_services (_tmp29_, &_tmp30__length1);
547 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
549 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
550 _tmp31__length1 = _tmp30__length1;
551 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
553 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
554 _tmp33_ = _tmp31_[_tmp32_];
555 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
556 _tmp34_ = g_strdup (_tmp33_);
557 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
558 _g_free0 (_tmp27_[_tmp28_]);
559 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
560 _tmp27_[_tmp28_] = _tmp34_;
561 #line 70 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
562 _tmp35_ = _tmp27_[_tmp28_];
563 #line 564 "moonshot-identity-request.c"
567 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
569 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
570 _tmp36__length1 = services_length1;
571 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
573 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
574 _tmp38_ = id_card_get_services (_tmp37_, &_tmp38__length1);
575 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
577 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
578 _tmp39__length1 = _tmp38__length1;
579 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
580 _tmp40_ = self->service;
581 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
582 _tmp41_ = g_strdup (_tmp40_);
583 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
584 _g_free0 (_tmp36_[_tmp39__length1]);
585 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
586 _tmp36_[_tmp39__length1] = _tmp41_;
587 #line 72 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
588 _tmp42_ = _tmp36_[_tmp39__length1];
589 #line 73 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
591 #line 73 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
593 #line 73 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
594 _tmp44__length1 = services_length1;
595 #line 73 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
596 id_card_set_services (_tmp43_, _tmp44_, _tmp44__length1);
597 #line 75 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
598 _tmp45_ = self->priv->parent_app;
599 #line 75 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
600 _tmp46_ = _tmp45_->model;
601 #line 75 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
603 #line 75 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
604 identity_manager_model_update_card (_tmp46_, _tmp47_);
605 #line 65 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
606 services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
607 #line 608 "moonshot-identity-request.c"
610 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
611 _tmp48_ = self->priv->callback;
612 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
613 _tmp48__target = self->priv->callback_target;
614 #line 79 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
615 g_return_if_fail (_tmp48_ != NULL);
616 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
617 _tmp49_ = self->priv->callback;
618 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
619 _tmp49__target = self->priv->callback_target;
620 #line 80 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
621 _tmp49_ (self, _tmp49__target);
622 #line 623 "moonshot-identity-request.c"
626 static void identity_request_class_init (IdentityRequestClass * klass) {
627 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
628 identity_request_parent_class = g_type_class_peek_parent (klass);
629 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
630 g_type_class_add_private (klass, sizeof (IdentityRequestPrivate));
631 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
632 G_OBJECT_CLASS (klass)->finalize = identity_request_finalize;
633 #line 634 "moonshot-identity-request.c"
637 static void identity_request_instance_init (IdentityRequest * self) {
638 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
639 self->priv = IDENTITY_REQUEST_GET_PRIVATE (self);
640 #line 4 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
641 self->id_card = NULL;
642 #line 5 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
643 self->complete = FALSE;
644 #line 6 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
645 self->select_default = FALSE;
646 #line 14 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
647 self->priv->callback = NULL;
648 #line 649 "moonshot-identity-request.c"
652 static void identity_request_finalize (GObject* obj) {
653 IdentityRequest * self;
654 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
655 self = IDENTITY_REQUEST (obj);
656 #line 4 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
657 _g_object_unref0 (self->id_card);
658 #line 8 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
659 _identity_manager_app_unref0 (self->priv->parent_app);
660 #line 9 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
661 _g_free0 (self->nai);
662 #line 10 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
663 _g_free0 (self->password);
664 #line 11 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
665 _g_free0 (self->service);
666 #line 12 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
667 __g_slist_free__g_object_unref0_0 (self->candidates);
668 #line 14 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
669 (self->priv->callback_target_destroy_notify == NULL) ? NULL : (self->priv->callback_target_destroy_notify (self->priv->callback_target), NULL);
670 #line 14 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
671 self->priv->callback = NULL;
672 #line 14 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
673 self->priv->callback_target = NULL;
674 #line 14 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
675 self->priv->callback_target_destroy_notify = NULL;
676 #line 3 "/build/slave/packages-full/build/ui/src/moonshot-identity-request.vala"
677 G_OBJECT_CLASS (identity_request_parent_class)->finalize (obj);
678 #line 679 "moonshot-identity-request.c"
682 GType identity_request_get_type (void) {
683 static volatile gsize identity_request_type_id__volatile = 0;
684 if (g_once_init_enter (&identity_request_type_id__volatile)) {
685 static const GTypeInfo g_define_type_info = { sizeof (IdentityRequestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) identity_request_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IdentityRequest), 0, (GInstanceInitFunc) identity_request_instance_init, NULL };
686 GType identity_request_type_id;
687 identity_request_type_id = g_type_register_static (G_TYPE_OBJECT, "IdentityRequest", &g_define_type_info, 0);
688 g_once_init_leave (&identity_request_type_id__volatile, identity_request_type_id);
690 return identity_request_type_id__volatile;
694 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
695 if ((array != NULL) && (destroy_func != NULL)) {
697 for (i = 0; i < array_length; i = i + 1) {
698 if (((gpointer*) array)[i] != NULL) {
699 destroy_func (((gpointer*) array)[i]);
706 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
707 _vala_array_destroy (array, array_length, destroy_func);